Posted By

greystate on 07/05/06


Tagged

template xslt


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

greystate
fukami
enajenkins
gelogenic


Built-in templates in XSLT


 / Published in: XML
 

You need to know about [the presence of] these to understand the processing of an XSLT stylesheet.

  1. <!-- Element or root node: Process children -->
  2. <xsl:template match="* | /">
  3. <xsl:apply-templates />
  4. </xsl:template>
  5.  
  6. <!-- Element or root in specific mode: Process children in that mode -->
  7. <xsl:template match="* | /" mode="m">
  8. <xsl:apply-templates mode="m" />
  9. </xsl:template>
  10.  
  11. <!-- Text or attribute node: Output value -->
  12. <xsl:template match="text() | @*">
  13. <xsl:value-of select="." />
  14. </xsl:template>
  15.  
  16. <!-- PI or comment node: Hide from result -->
  17. <xsl:template match="processing-instruction() | comment()" />

Report this snippet  

You need to login to post a comment.