|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Pattern Question
> > This should be a relatively easy question but I just want to > confirm what I > am thinking. What is the difference in the following patterns? Is my > assessment of the first two correct? > > > 1. <xsl:template match="/"> =Matches Root Element No, it matches the root node. The root node is not an element. > 2. <xsl:template match="*|@"> =Matches all element nodes or > attributes. Almost, but you meant match="*|@*" > 3. <xsl:template match="@*|node()"> = Not exactly sure how > this pattern > behaves. Appears to match all nodes or child nodes? It matches all nodes except root nodes and namespace nodes. The @* matches attributes; the node() (which is short for child::node()) matches nodes that are children of something, which embraces all elements, text nodes, comments, and processing-instructions. Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








