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".

  1. why so?
  2. 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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -