I hava a bug of XML but i can't find it.
Javascript show error is "Style sheet is null or incorrect XML".
But i sure the path of url is correct.
Don't i ingore something?
Thank you.
XML:
<html>
<body>
<Form name="selectpab">
<script type="text/javascript">
var output1="people name selected!"
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("
http://localhost/TestXml.nsf/People?readviewentries")
// Load XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("
http://localhost/TestXml.nsf/selectpabxsl?openpage")
// Transform
document.write("<h3>Domino Public Address Book</h3>")
document.write("<SELECT multiple NAME='people' size=5>")
document.write(xml.transformNode(xsl))
document.write("</SELECT>")
</script>
<br><input type=button name='action' value='action'onclick=writeback()>
<input type=button name='close' value='close'onclick=window.close()>
</Form>
</body>
</html>
XSL:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<xsl:for-each select="viewentries/viewentry">
<OPTION >
<xsl:attribute name="value">
<xsl:value-of select="entrydata[@name='UserName']/text"/>
</xsl:attribute>
<xsl:value-of select="entrydata[@name='phone']/text"/>
</OPTION>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>