Re: passing parameters to xsl stylesheets
Thanks a lot Xmlize,I tried it an it works very fine. I've also tried this and it works too:
FYI: Note that there's a large difference between the two.
1. The first one (yours, with note[to = $toto]/to) selects all 'to' nodes where the contents is equal to the value of $toto:
$toto = 'Tove'
will select: <to>Tove</to>
2. The second one (from mozer, with *[local-name()=$toto]) will select all children nodes where the name of the node is equal to the value of $toto:
$toto = 'from'
will select: <from>Jani</from>
and, of course, you select only the 'to' nodes with a parent 'note', whereas mozer selects all children from node 'note' that match the name in $toto.
Cheers, -- Abel Braaksma
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format