Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Obtaining xml node value and using it as variable - 2nd attempt

From: Jon Gorman <jonathan.gorman@--------->
To:
Date: 10/4/2005 7:18:00 PM
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
parameters.

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


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent