Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Question on flow

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 4/2/2008 5:42:00 PM

tshad wrote:

> But then what is happening as to the use of "/*" vs "/" vs "REPORT" in my
> first template line.
> 
> Both "/*" and "REPORT" give me the same results.  But if I have "/" and
> <xsl:copy>, I don't get a root tag.  If I do "/" and "<REPORTING> (in place
> of the <xsl:copy>), it works fine with <REPORTING> as my root tag.
> 
> It seems the "/" drops the root node (with copy) and "/*" (with copy) uses 
> the existing root node.
> 
> I assume the reason "/" and <REPORT> work is because "/" is dropping the 
> root (document) node but I am supplying my own.
> 
> <xsl:template match="/">
>   <xsl:copy>
> 
> doesn't work (missing root node)

The root node in the XSLT/XPath model is the document node, it is 
different from the root element.
So
   <xsl:template match="/">
matches the root node and you can copy that if you want but it is 
different from
   <xsl:template match="/*">
which matches the root element.




-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent