Subject: Re: passing array-like information to XSLT - msg#00003
List: mozilla.devel.layout.xslt
Alex Iskold wrote:
We have an XML document which looks like this:
<items>
<item>
<item>
...
</items>
We are currently transforming this document using XSLT in Mozilla and
now need to pass additional information, namely the keys for each item.
It does not seem like we can pass an array as an argument to the stylesheet,
it also does not seem like we can pass more than one XML document.
You can have secondary XML input documents by using the XSLT document
function <
http://www.w3.org/TR/xslt#document>. And with Mozilla you can
pass in an XML document as a parameter to the transformation.
--
Martin Honnen
http://JavaScript.FAQTs.com/
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
passing array-like information to XSLT
Hi we have the following problem.
We have an XML document which looks like this:
<items>
<item>
<item>
...
</items>
We are currently transforming this document using XSLT in Mozilla and
now need to pass additional information, namely the keys for each item.
It does not seem like we can pass an array as an argument to the stylesheet,
it also does not seem like we can pass more than one XML document.
So it looks like our options are:
1) Create new XML document and stick the key information in each item
2) Pass the keys as a string and split them inside XSLT
Is there a cleaner way of doing this?
Thank you,
Alex
--
alex iskold
founder & cto
http://www.adaptiveblue.com
Next Message by Date:
click to view message preview
Re: passing array-like information to XSLT
Alex Iskold wrote:
We have an XML document which looks like this:
<items>
<item>
<item>
...
</items>
We are currently transforming this document using XSLT in Mozilla and
now need to pass additional information, namely the keys for each item.
It does not seem like we can pass an array as an argument to the stylesheet,
Depends on how you're doing the transform and on the version of Firefox
you're using, 1.5 and 2.0 (Gecko 1.8 and up) should allow nodelists and
arrays of nodes as values for parameters through setParameter. See
http://developer.mozilla.org/en/docs/The_XSLT/JavaScript_Interface_in_Gecko:Setting_Parameters
and https://bugzilla.mozilla.org/attachment.cgi?id=191485
Peter
Previous Message by Thread:
click to view message preview
passing array-like information to XSLT
Hi we have the following problem.
We have an XML document which looks like this:
<items>
<item>
<item>
...
</items>
We are currently transforming this document using XSLT in Mozilla and
now need to pass additional information, namely the keys for each item.
It does not seem like we can pass an array as an argument to the stylesheet,
it also does not seem like we can pass more than one XML document.
So it looks like our options are:
1) Create new XML document and stick the key information in each item
2) Pass the keys as a string and split them inside XSLT
Is there a cleaner way of doing this?
Thank you,
Alex
--
alex iskold
founder & cto
http://www.adaptiveblue.com
Next Message by Thread:
click to view message preview
Re: passing array-like information to XSLT
Alex Iskold wrote:
We have an XML document which looks like this:
<items>
<item>
<item>
...
</items>
We are currently transforming this document using XSLT in Mozilla and
now need to pass additional information, namely the keys for each item.
It does not seem like we can pass an array as an argument to the stylesheet,
Depends on how you're doing the transform and on the version of Firefox
you're using, 1.5 and 2.0 (Gecko 1.8 and up) should allow nodelists and
arrays of nodes as values for parameters through setParameter. See
http://developer.mozilla.org/en/docs/The_XSLT/JavaScript_Interface_in_Gecko:Setting_Parameters
and https://bugzilla.mozilla.org/attachment.cgi?id=191485
Peter