W
werD
Hello,
Im wondering about using xml to store relational data. It works well
with .net but im having some trouble with the xsl/xpath.
Lets say that I have an xml like
<data>
<files>
<file categoryid="1" name-"a file"/>
</files>
<filecategories>
<category id="1" name="System Tools"/>
</filecategories>
</data>
how would i do a relational xpath query like a join?
ive tried something like this but its not working to well
<xsl:for-each select="/data/file">
<xsl:value-of select="//category[@id=@categoryid]/@name" />
</xsl:for-each>
ive been reading about using an axis like ancestor::filecategories but
im not seeing an axis which would get the sibling of an ancestor
Im wondering about using xml to store relational data. It works well
with .net but im having some trouble with the xsl/xpath.
Lets say that I have an xml like
<data>
<files>
<file categoryid="1" name-"a file"/>
</files>
<filecategories>
<category id="1" name="System Tools"/>
</filecategories>
</data>
how would i do a relational xpath query like a join?
ive tried something like this but its not working to well
<xsl:for-each select="/data/file">
<xsl:value-of select="//category[@id=@categoryid]/@name" />
</xsl:for-each>
ive been reading about using an axis like ancestor::filecategories but
im not seeing an axis which would get the sibling of an ancestor