xsl-list
[Top] [All Lists]

Re: Obtaining xml node value and using it as variable

2005-10-04 08:25:29
On 10/4/05, geoff hopkins <geoffhopkins123(_at_)yahoo(_dot_)com> 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
"<foo><node>1</node></foo>"

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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--