Subject: [xsl] Newbie - Trying to read in a value with XSL ... From: Melissa Mussitsch <melissa.mussitsch@xxxxxxxxx> Date: Wed, 3 Jan 2001 12:03:24 -0500 |
Hi, I know very little about XSL and even XML for that matter. My company purchased a product which uses the XSL functionality from the version http://www.w3.org/TR/WD-xsl. I need to make a modification and am having trouble. Basically I'm trying to pass a variable from my asp page to the XSL page, but since I'm using this older version, I can't utilize the xsl:param object (to my knowledge). I decided that I would create a new node on the asp side and refer to that node on the xsl side. My code on the asp side is as follows: dim styleFile styleFile = Server.MapPath("web_leads_survey.xsl") ' Load the XML dim source set source = Server.CreateObject("Microsoft.XMLDOM") source.async = false source.loadxml( sXML ) Set root = source.documentElement 'I keep playing with different node types here trying to get them to work ... tried element, text, comment Set newNode = source.createNode (8, "PAGE_FROM", "") newNode.nodevalue = "YES" root.appendChild(newNode) ' Load the XSL dim style set style = Server.CreateObject("Microsoft.XMLDOM") style.async = false style.load(styleFile) Response.Write(source.transformNode(style)) This is working properly - I get a node of name #comment with value "YES". My problem is referring to that node and value from XSL. The code I tried is below: <tr> <xsl:for-each select="/" > <td> <xsl:value-of select="."/> </td> </xsl:for-each> </tr> As you can see it's not much - but the pattern matching is not working. When I try the node type of text, I get a concatenated list of all values (too many), with element I get nothing and with comment I get nothing. I tried using the <xsl:template match ...> which I've seen in many examples but this generates an error message, perhaps because of my version. Can anyone help - I've been working on this for a day and a half and really only have examples in internet doc searches to go on? Thanks Melissa melissa.mussitsch@xxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XLinking question, Jiri Jirat | Thread | RE: [xsl] Newbie - Trying to read i, Weakliem, Gordon |
RE: Re: [xsl] for-each loops: arit, Mazza, Glen | Date | Re: [xsl] for-each loops: arithmet, David Carlisle |
Month |