Altova Mailing List Archives

Re: [xsl] Obtaining xml node value and using it as variable

From: Jon Gorman <jonathan.gorman@--------->
Date: 10/4/2005 3:26:00 PM
On 10/4/05, geoff hopkins <geoffhopkins123@xxxxxxxxx> wrote:

> hope I have explained this well enough...?!?

To be blunt, not really.

This could be interpreted in two ways:

1) "I need to get a value from a node and store it in a variable/parameter"

with the easy answer of "well, use xsl:varaible or xsl:parameter".

2) (the more likely case)  "I want to be able to execute a
command-line parameter into the stylesheet

Which has a couple of flavors of it's own.

i)  You actually want to pass a node set in (not a node's value)

ie (picking a roughly Xalan sytanx just for a quick example):

  xsltprocess -IN foo.xml -XSL trans.xsl -OUT bar.xml -PARAM

-- there should be something in the archives about this

ii) You want to specifiy a node within the document via a XPATH string

xsltprocess -IN foo.xml -XSL trans.xsl -OUT bar.xml -PARAM "//ul/li/foo[1]"

-- might be something in the archives about this

I'm sure there's more ways to interpret your one-sentence description
of the problem that I haven't thought of.  Perhaps an example of what
you want to do would help.

Jon Gorman


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 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.