xsl-list
[Top] [All Lists]

[xsl] filtering data

2006-10-26 10:34:42
Hi:

I am passing two paramters to my style sheet param1 and param2. These values are also present as elements on the XML.

For example:

<xsl:param param1/>
<xsl:param param2/>

param1 and param2 are also elements on the schema with a root element <paramroot>.

Param1 can have values val1, val2, val3.
Param2 can have values pval1, pval2, pval3.

Now the XML looks like this:

<root>
<step1>
<text><para>Step1</para></text>
<paramroot>
        <sparam1>val1</param1>
    <sparam2>pval3</param2>

</paramroot>
</step1>

<step1>
<text><para>Another Step1</para></text>
<paramroot>
<sparam1>val2</param1>
<sparam2>pval1</param2>
</paramroot>

<step2>
<text><para>Step2</para></text>
<paramroot>
<sparam1>val2</param1>
<sparam2>pval1</param2>
</paramroot>

</step2>
</step1>
</root>


The issue I am having is, I have declared the two parameters on top of the style sheet. Now the value of these two parameters should be compared with the value of param1 and param2 inside step1 and step2 and only that step whose values macth the paramters should be displayed.

For example if $param1=val2 and $param2=pval1, it matches step2 and only that step should be displayed. So the output should have only:

Step2.

Can anybody help me resolve this? I have tried passing paramters inside the steps to check the values but I always get all the steps displayed.

Thank you for your help.

_________________________________________________________________
Find a local pizza place, music store, museum and more?then map the best route! http://local.live.com?FORM=MGA001


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

<Prev in Thread] Current Thread [Next in Thread>