Hi,
I want to build an aspx page with three combo box. Each combo
represents data from the database. I have three xml variables that I
build dynamically, let's say: var1, var2 and var3. I pass these
variables from my aspx program to my xsl program. If I put each
variable in a file: for example var1.xml, var2.xml and var3.xml. To
build my combo box from a file (for example var1.xml) like that
<xsl:variable name="combobox1"
select="document('../xml/var1.xml')"/>
this works very good. But I want to bind my variable var1 instead of
the corresponding file var1.xml.
Unfortunately I didn't know how to do it. (I know how to pass a
variable from aspx program to xsl program but I don't know how to open
this variable as an xml data structure.)
Can some one help me please?
Regards,
Djamila.
John Saunders - 16 Oct 2006 18:17 GMT
> Hi,
>
[quoted text clipped - 15 lines]
>
> Can some one help me please?
Take a look at "XsltArgumentList for Stylesheet Parameters and Extension
Objects" in MSDN, at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conXsltArgumentListForStylesheetParametersExtensionObjects.asp.
You can pass a node set or a fragment to the stylesheet. In particular, load
your XML variables into an XmlDocument (I presume that they are strings).
Then create an XPathNavigator on the XmlDocument and pass that as a
parameter to the stylesheet.
John