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

RE: selecting into an included stylesheet

Subject: RE: selecting into an included stylesheet
From: "Ingersoll, Utah" <Utah.Ingersoll@xxxxxxxxxxxx>
Date: Mon, 30 Jan 2006 15:38:22 -0500
ingersoll utah
Thank you!

I had initially been using the document function with a URI as Michael
suggested but ran into a race condition in the wild (not to mention some
very odd caching).

Dimitre's suggestion of parking the nodeset in a variable before
inclusion works well.

Utah Ingersoll

-----Original Message-----
From: Dimitre Novatchev [mailto:dnovatchev@xxxxxxxxx]
Sent: Monday, January 30, 2006 3:11 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  selecting into an included stylesheet

On 1/31/06, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> If you know the URI of the stylesheet you want to access -- which you
do,
> because you included it -- you can get it using the document()
function just
> like any other XML document. (That's all that document('') is doing).

A more user-friendly way that does not require remembering all those
file-names (which, btw could change in time) is to have in every
stylesheet a global variable with easy to remember name:

  <xsl:variable name="vdocThisStylesheet" select="document('')"/>

Then, this document is accessible within every other stylesheet of the
import tree by simply:
             $vdocThisStylesheet


--
Cheers,
Dimitre Novatchev
---------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all.

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.