Sorry I called it a function by mistake, I meant the xsl:document element
and I was actually thinking something along the lines of:
<xsl:variable name="Xml" as="document-node()">
<xsl:document>
<xsl:sequence select="document('file.xml')"/>
</xsl:document>
</xsl:variable>
I think you've answered this with your second point.
From: David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Use of xsl:document
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
________________________________________________________________________
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
_________________________________________________________________
Are you using the latest version of MSN Messenger? Download MSN Messenger
7.5 today! http://join.msn.com/messenger/overview
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--