I am using Firefox 2.0.0.3 on MSWindows.
I have an XML file http://emle.sourceforge.net/emle020000/testb.xml
which invokes an XSLT file http://emle.sourceforge.net/emle020000/testb.xsl
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="testb.xsl" type="text/xsl"?>
<z xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<x/>
</z>
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
method="xml"
encoding="iso-8859-1"
indent="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
/>
<xsl:template match="/z">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script>
.... DEBUG CODE DELETED. ...
</head>
<body onload="init();">
<div>
<xsl:apply-templates select="x" />
</div>
</body>
</html>
</xsl:template>
<xsl:template match="x">
<span>
<svg xmlns="http://www.w3.org/2000/svg" />
</span>
</xsl:template>
</xsl:stylesheet>
The result of the transform is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html
xmlns="http://www.w3.org/1999/xhtml"><head
xmlns="http://www.w3.org/1999/xhtml"><script type="text/javascript">
function init() { lu = function luf(){return
'http://www.w3.org/1999/xhtml';}; var span = document.evaluate("//span",
document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null)
..singleNodeValue; var div = document.evaluate("//xhtml:div", document,
lu, XPathResult.FIRST_ORDERED_NODE_TYPE, null) .singleNodeValue;
alert("span:" + span + " div:" + div); return; } </script></head><body
xmlns="http://www.w3.org/1999/xhtml" onload="init();"<div <span <svg
xmlns="http://www.w3.org/2000/svg"/ </span</div></body></html>The alert
displays span as an Element object and the div as an HTMLDivElement.
What is it about the <xsl:template match="x"that has this effect?
--
C.W.Holeman II | cw***@Julian5Locals.com -5 | http://JulianLocals.com/cwhii
To only a fraction of the human race does God give the privilege of
earning one's bread doing what one would have gladly pursued free, for
passion. I am very thankful. The Mythical Man-Month Epilogue/F.P.Brooks