Re: [xsl] Use of xsl:document

Subject: Re: [xsl] Use of xsl:document
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 22 Jun 2006 11:58:38 +0100
> Should I be using the xsl:document function instead?
there is no _function_ called xsl:document.
there is an xsl:document element (instruction). this has a different
function it _generates_ a document node rather than selecting one.
So the relationship between 
select="document(...) and <xsl:document is like teh relationship between
select="abc" and <xsl:element  name="abc"
one selects existing nodes from input documents, the other generates new
nodes.

> Is there any use for the xsl:document function other than the fact it allows 
> validation?

Not a lot as (for XSLT1 compatibility) a document node is implictly
generated whenever you use xsl:variable with content (and no as
attribute) so there are not many times that you need to explictly
generate a document node with xsl:document.

David


________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread