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

Re: Obtaining xml node value and using it as variable

Subject: Re: Obtaining xml node value and using it as variable - 2nd attempt
From: Jon Gorman <jonathan.gorman@xxxxxxxxx>
Date: Tue, 4 Oct 2005 14:17:42 -0500
xml node values
On 10/4/05, geoff hopkins <geoffhopkins123@xxxxxxxxx> wrote:
> reading back I can understand the criticism.
> I have one xml document (constants.xml) that contains
> a list of constants.
> I want to get node values from this xml
> (constants.xml) document when processing the source
> xml document with a xsl script to get these parameters
> to be used to parse the source xml doc.
> i.e. not pass as a command line parameter but for the
> xslt script to be able to obtain paramters from a
> external xml document.

Ummm, somewhat better.  Still not really completely clear.  Some
snippets of the actual constrants file might help some.

So now there is either two cases: 1) constants.xml is an xsl
stylesheet as well, or 2) it contains some xml that need to be in

case 1) Have you looked at xsl:import?  Is that causing you problems?

case 2) Have you checked out document()?  That will allow you do to
something like:

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

<xsl:parameter name="foo" select="$contants/constant" />

Another option of course is to do something similar to process the
stylesheets and produce a new stylesheet with information from
constants inserted into the newly generated stylesheet, but a lot of
times this is overkill.

Jon Gorman

Current Thread


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.
First Name
Last Name
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.