M
Matt
Is it possible to traverse the values of children of an element, and
no need to specify
the children's element names in XSLT element?
The XML file can be
<bio>
<skills>
<languages>
<language>XML</language>
<language>Java</language>
</languages>
<databases>
<database>Oracle</database>
</databases>
</skills>
</bio>
Approach #1: This will just append all data in a sequence of strings,
not good
<UL>
<xsl:for-each select="/bio/skills">
<LI><xsl:value-of select="."/></LI>
</xsl:for-each>
</UL>
Approach #2: correct approach, but it's tedious to specify all element
names that
need to traverse
<UL>
<xsl:for-each select="/resume/skills">
<xsl:for-each select="languages/language">
<LI><xsl:value-of select="."/></LI>
</xsl:for-each>
<xsl:for-each select="databases/database">
<LI><xsl:value-of select="."/></LI>
</xsl:for-each>
</xsl:for-each>
</UL>
any ideas? please advise. thanks!!
no need to specify
the children's element names in XSLT element?
The XML file can be
<bio>
<skills>
<languages>
<language>XML</language>
<language>Java</language>
</languages>
<databases>
<database>Oracle</database>
</databases>
</skills>
</bio>
Approach #1: This will just append all data in a sequence of strings,
not good
<UL>
<xsl:for-each select="/bio/skills">
<LI><xsl:value-of select="."/></LI>
</xsl:for-each>
</UL>
Approach #2: correct approach, but it's tedious to specify all element
names that
need to traverse
<UL>
<xsl:for-each select="/resume/skills">
<xsl:for-each select="languages/language">
<LI><xsl:value-of select="."/></LI>
</xsl:for-each>
<xsl:for-each select="databases/database">
<LI><xsl:value-of select="."/></LI>
</xsl:for-each>
</xsl:for-each>
</UL>
any ideas? please advise. thanks!!