Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / October 2006

Tip: Looking for answers? Try searching our database.

Processing an aspx xml-variable in xsl

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
djamilabouzid@gmail.com - 15 Oct 2006 20:22 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.