I am trying some XSLT transformations and barely know what I'm doing. =) That being said, I have had some luck, but am having a problem (mostly with understanding) something specific.
First off, I am using ASP (and the MS XML object: Server.CreateObject("Microsoft.XMLDOM"
) to process *part* of an SMIL document into HTML. The first thing I'm doing in ASP is grabbing a particular node and its subtree (because I don't want the whole document). I'm accomplishing this with the following code:
This gives me this SMIL node:
Then I use this code to transform the document and print it ou:
And all is lovely, for the most part. Here's the XSL:
The problem is I can actually accomplish the omission of the input type="group" tag and the button, but I can't seem to get the match of "/" to match the document root. I thought it *had* to match this no matter what, but I don't seem to be seeing that HELLO WORLD.
Any ideas would be . . . most helpful. TIA! Monte Kalisch
Brainbench MVP for ASP
Anti-Spam Email: montek at montekcs dot com
First off, I am using ASP (and the MS XML object: Server.CreateObject("Microsoft.XMLDOM"
Code:
Set oNodeList = xmlDoc.getElementsByTagName("say")
set oPanel = oNodeList(panel) 'To get a particular "say" panel
Code:
<say end="submit">
<p>
To begin with, how likely are you to <font color="#ff0000"><b>visit Internet sites</b></font>?
</p>
<input type="group" name="int" title="Internet Visitation"/>
<input type="radio" name="int" value="1"/>Regularly<br/>
<input type="radio" name="int" value="2"/>Occasionally<br/>
<input type="radio" name="int" value="3"/>Seldom<br/>
<input type="radio" name="int" value="4"/>Never<br/>
<input type="radio" name="int" value="5"/>Don't Know<br/>
<p>
<input type="submit"/>
</p>
</say>
Then I use this code to transform the document and print it ou:
Code:
set xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load(Server.MapPath("script.xsl"))
Response.Write oPanel.transformNode(xsl)
And all is lovely, for the most part. Here's the XSL:
Code:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="[URL unfurl="true"]http://www.w3.org/TR/WD-xsl">[/URL]
<xsl:template match="/">
<hr /> <h1>HELLO WORLD</h1>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="* | text() | @*">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="input[@type = 'group']">
<h1>INPUT TYPE = GROUP OMITTED</h1>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="input[@type = 'submit']">
<h1>BUTTON</h1>
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
The problem is I can actually accomplish the omission of the input type="group" tag and the button, but I can't seem to get the match of "/" to match the document root. I thought it *had* to match this no matter what, but I don't seem to be seeing that HELLO WORLD.
Any ideas would be . . . most helpful. TIA! Monte Kalisch
Brainbench MVP for ASP
Anti-Spam Email: montek at montekcs dot com