[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Understanding Identity Transformations
Tempore 23:56:58, die 02/11/2005 AD, hinc in
xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Karl Stubsjoen <kstubs@xxxxxxxxx>:
Seems like this is pretty standard: Since <xsl:apply-templates/> is an abbreviation for <xsl:apply-templates select="node()"/>, and attributes occur first in document order, the two consecutive 'apply-templates' of the first simple do exactly the same as the one 'apply-templates' in sample 2. As for the extra '/' in the second sample, I don't think it is necessary. Yes indeed, it will strip off attributes BUT also text nodes, comments, processing instructions...Then, understanding what is happening, is the following sample true that this will strip an XML doc of all attribute elements? (only elements will remain) And finally, when I identity transform the following my document i quadrupled in size, but I though I was following standard practices from previous example. Ahh, I think I understand what is going on in SAMPLE_004 (please confirm) I am basically applying templates for all nodes twice Not entirely true. You first apply templates to all child element nodes. And then you apply all child node (including again the elements)
|
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
|