[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Use of xsl:document

Subject: Re: Use of xsl:document
From: "tom tom" <tomxsllist@xxxxxxxxxxx>
Date: Thu, 22 Jun 2006 12:15:21 +0100
xsl document
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@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  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 ________________________________________________________________________


_________________________________________________________________
Are you using the latest version of MSN Messenger? Download MSN Messenger 7.5 today! http://join.msn.com/messenger/overview


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.