How to instruct XSLT to apply template only on children? -
when applyng xslt:
<xsl:template match="e"> <xsl:value-of select="@name"/> </xsl:template>
to xml:
<root> <e name="1"/> <la> <e name="bla"/> </la> </root>
i both "1" , "bla".
- why so?
- how can make sure xslt applied direct children of root?
did try match="root/e"
? if want match nodes in context, need provide context in rule, otherwise nodes matching node name apply rule.
Comments
Post a Comment