XSLT how to merge some lists of parameters
Posted
by buggy1985
on Stack Overflow
See other posts from Stack Overflow
or by buggy1985
Published on 2010-05-12T16:00:59Z
Indexed on
2010/05/12
16:04 UTC
Read the original article
Hit count: 280
Hi,
I have an URL Structure like this:
http://my.domain.com/generated.xml?param1=foo¶m2=bar&xsl=path/to/my.xsl
The generated XML will be transformed using the given XSL Stylesheet. The two other parameters are integrated too like this:
<root>
<params>
<param name="param1">foo</param>
<param name="param2">bar</param>
</param>
...
</root>
Now I want to create with XSLT a link with a new URI that keeps the existing parameters and adds one or multiple new parameters like page=3
or sort=DESC
. If the given parameter already exists, it should be replaced.
I'm not sure how to do this. How to pass multiple (optional) parameters to a template. How to merge two lists of parameters.
Any ideas?
Thanks ;)
© Stack Overflow or respective owner