[xsl] Newbie - Trying to read in a value with XSL ...

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
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
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"
  ' Load the XSL
  dim style
  set style = Server.CreateObject("Microsoft.XMLDOM")
  style.async = false


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:

<xsl:for-each select="/" >
<xsl:value-of select="."/>

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?


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread