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

RE: Including a document

Subject: RE: Including a document
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Wed, 27 Jun 2001 17:12:13 +0100
document twice same uri xsl
>   The reason I am not interested in calling document() twice,
> is because
> every time document is called, "B.xml" is read, parsed etc.
> and suppose
> if B.xml is a very large file, doing it twice seems a waste
> of resources.

The processor shouldn't do that: if you call document() twice with the same
URI, it's obliged to return the same root node each time (so
count(document('A.xml')|document('A.xml')) is guaranteed to be 1).

But it's not a bad idea to put the call on document in a global variable
anyway:

<xsl:variable name="B.xml" select="document('B.xml')"/>

and then you can replace your calls on document('B.xml') with a reference to
$B.xml

Mike Kay
Software AG


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.