This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

trouble using name() property


I'm having a great deal of trouble getting the name of an element.  I've
been lurking on this list for a while, and have read through the FAQ, but
can't seem to get any of the suggested solutions to work for me.  I'm
using msxml, version 2.0.  Can anyone lend a hand in diagnosing the error in
the code shown below?
(which works fine for me if I take the "<xsl:value-of select="name()" />"
line out ...)
Thanks very much,
Amanda Birmingham

**************************
the XSL, in its entirety:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<xsl:template match="/">
 <xsl:apply-templates select="//EVENT" />
</xsl:template>

<xsl:template match="EVENT">
 here
 <xsl:value-of select="name()" />
</xsl:template>
</xsl:stylesheet>

****************************

The ASP I am using (containing the test XML string I'm trying to transform):
<%@Language = VBScript%>
<%
response.buffer = true
response.expiresAbsolute = now() - 1
%>
<%
 'load the xml
 set xml = Server.CreateObject("Microsoft.XMLDOM")
 xml.async = false
 xml.loadxml("<?xml version='1.0'?><EVENT>hi</EVENT>")

 'load the xsl
 set xsl = Server.CreateObject("Microsoft.XMLDOM")
 xsl.async = false
 xsl.load(Server.MapPath("nodenametest.xsl"))

 'transform and write out
 outputstring = xml.transformNode(xsl)
 response.write outputstring
%>

******************************
Result  of  running the above asp page, as displayed on my browser (IE5):

error '80004005'
Unspecified error

/elity-pages/tests/nodenametest.asp, line 18

[this is the line with the xml.transformNode(xsl) call in it.]




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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]