I want to select the IndividualObjects. My instinct would be to for-each through $Individuals/IndividualObject, but that doesn't seemt to work. Here's the tests:
test1<br /> <xsl:for-each select="$Individuals"> This came from the $individuals selector:<xsl:value-of select ="name(.)"/> </xsl:for-each> test2<br /> <xsl:for-each select="$Individuals/child::*"> This came from the child:: selector: <xsl:value-of select ="name(.)"/> </xsl:for-each>
test3<br /> <xsl:for-each select="$Individuals/IndividualObject"> This came from the $Individuals/IndividualObject selector:<xsl:value-of select ="name(.)"/> </xsl:for-each>
test4<br /> <xsl:for-each select="$Individuals//IndividualObject"> This came from the $Individuals//IndividualObject selector:<xsl:value-of select ="name(.)"/> </xsl:for-each>
The output is as follows:
test1 This came from the $individuals selector:IndividualObjects
test2 This came from the child:: selector: IndividualObject
test3 test4
So the xml is coming back correctly, and the nodes are properly parsed. But they're unselectable? I'm baffled. Do you just always use child:: and then compare the element name? I'm using XPathNodeIterator -- should I be using something else?
I must be missing something basic - any input would appreciated.
xslt child nodes only selectable using child::* w/ XPathNodeIterator?
Hi guys,
New to Umbraco, loving it so far, but I've hit a strange issue.
set up an xslt extension and variable $Individuals to query from a remote business layer
<xsl:variable name="Individuals" select="Elements.Extensions:Query('select * from Individual')"/>
XML returns OK (tuncated for brevity):
I want to select the IndividualObjects. My instinct would be to for-each through $Individuals/IndividualObject, but that doesn't seemt to work. Here's the tests:
The output is as follows:
test1
This came from the $individuals selector:IndividualObjects
test2
This came from the child:: selector: IndividualObject
test3
test4
So the xml is coming back correctly, and the nodes are properly parsed. But they're unselectable? I'm baffled. Do you just always use child:: and then compare the element name? I'm using XPathNodeIterator -- should I be using something else?
I must be missing something basic - any input would appreciated.
Thanks, Aaron
is working on a reply...