xsl dynamic filtering

S

sai krishna

I am having a static xml document and would like to extract a portion
of the xml and display it using xsl, but the condition on which to
filter the xml document is dynamic in nature, Is there a way to
generate dynamic xpath expressions and use them in xsl file ?
 
M

Martin Honnen

sai said:
I am having a static xml document and would like to extract a portion
of the xml and display it using xsl, but the condition on which to
filter the xml document is dynamic in nature, Is there a way to
generate dynamic xpath expressions and use them in xsl file ?

You can define global parameters in the stylesheet which can be set
before a transformation is run e.g.
<xsl:param name="parameterName" />
and then use e.g.
$paramName
when you want to access the parameter value.
How you set the parameter before a transformation depends on the API the
XSLT processor exposes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top