Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does node()|@* mean XSLT?

Tags:

xml

xslt

I have seen this being used in this contect:

<xsl:template match="node()|@*">
<xsl:copy>
  <xsl:apply-templates select="node()|@*"/>
</xsl:copy>

Can anyone explain that the "node()|@*" means?

like image 673
mmkd Avatar asked Mar 08 '12 15:03

mmkd


People also ask

What does node () mean in XSLT?

1. Well, more precisely, node() means child::node(), and @* means attribute::*, so it is matching all children and attributes of the context node. (It doesn't match document nodes or namespace nodes).

What does the abbreviation XSL mean?

XSL (eXtensible Stylesheet Language) is a styling language for XML.

What is XTT XSLT?

A second step called XML To Text (XTT) uses a similar approach to convert XML documents to text. It converts documents from XML to text formats such as comma separated values (CSV), fixed width or other text formats.

What is XSLT explain with an example?

XSLT is a transformation language for XML. That means, using XSLT, you could generate any sort of other document from an XML document. For example, you could take XML data output from a database into some graphics.


1 Answers

This is called the identity transform. The node()|@* is matching all child nodes (node() is all text,element,processing instructions,comments) and attributes (@*) of the current context.

like image 132
Daniel Haley Avatar answered Sep 23 '22 21:09

Daniel Haley