"Msxml2.FreeThreadedDOMDocument.4.0" and transformNode()

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello everyone,
Im currently encountering a problem with a quite basic XSLT transformation using "Msxml2.FreeThreadedDOMDocument.4.0" as XSL processor.
Here is my XSL :
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform <br/>
<xsl:template match="/ <br/>
<html><head><title>OPENING</title></head><body bgcolor="#CCFFCC <xsl:apply-templates /></body></html><br/>
</xsl:template><br/>
<xsl:template match="node() <br/>
<li class="node <br/>
<xsl:value-of select="name()" /><br/>
<br/>
<br/>
<xsl:apply-templates select="@*|node()"/> <br/>
<br/>
</xsl:template><br/>
<xsl:template match="@* <br/>
<li class="attr <br/>
<xsl:value-of select="name()" /><xsl:value-of select="."/><br/>
<br/>
</xsl:template><br/>
</xsl:stylesheet>
The purpose is to transform any XML to a HTML list.
For exemple :
<?xml version="1.0" encoding="UTF-8"?><br/>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"<br/>
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd <br/>
<?altova_sps http://www.altova.com/sps/Template/Publishing/docbook.sps?><br/>
<book><br/>
<bookinfo><br/>
<title>Book Title</title><br/>
<author><br/>
<firstname>Author First Name</firstname><br/>
<surname>Author Last Name</surname><br/>
</author><br/>
<publisher><br/>
<publishername>Publisher Name</publishername><br/>
</publisher><br/>
<isbn>ISBN#</isbn><br/>
<copyright><br/>
<year>Copyright Year</year><br/>
</copyright><br/>
</bookinfo><br/>
<part><br/>
<title>Part Title</title><br/>
<chapter><br/>
<title>Chapter Title</title><br/>
<sect1><br/>
<title>Section1 Title</title><br/>
<para>Text</para><br/>
</sect1><br/>
</chapter><br/>
</part><br/>
</book>
after transformation with my XSL editor (xml spy 2008):
In XML :
<html><br/>
<head><br/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8 <br/>
<title>OPENING</title><br/>
</head><br/>
<body bgcolor="#CCFFCC <br/>
<li class="node altova_sps<br/>
<br/>
<br/>
<li class="node book<br/>
<br/>
<li class="node bookinfo<br/>
<br/>
<li class="node title<br/>
<br/>
<li class="node <br/>
<br/>
<br/>
<br/>
<li class="node author<br/>
<br/>
<li class="node firstname<br/>
<br/>
<li class="node <br/>
<br/>
<br/>
<br/>
<li class="node surname<br/>
<br/>
<li class="node <br/>
<br/>
<br/>
<br/>
<br/>
<li class="node publisher<br/>
<br/>
<li class="node publishername<br/>
<br/>
<li class="node <br/>
<br/>
<br/>
<br/>
<br/>
<li class="node isbn<br/>
<br/>
<li class="node <br/>
<br/>
<br/>
<br/>
<li class="node copyright<br/>
<br/>
<li class="node year<br/>
<br/>
<li class="node <br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<li class="node part<br/>
<br/>
<li class="node title<br/>
<br/>
<li class="node <br/>
<br/>
<br/>
<br/>
<li class="node chapter<br/>
<br/>
<li class="node title<br/>
<br/>
<li class="node <br/>
<br/>
<br/>
<br/>
<li class="node sect1<br/>
<br/>
<li class="node title<br/>
<br/>
<li class="node <br/>
<br/>
<br/>
<br/>
<li class="node para<br/>
<br/>
<li class="node <br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</body><br/>
</html>
HTML visualisation:

altova_sps


book

bookinfo

title





author

firstname





surname






publisher

publishername






isbn





copyright

year







part

title





chapter

title





sect1

title





para










<br/>

With "Msxml2.FreeThreadedDOMDocument.4.0" , I only get :
<html><br/>
<head><br/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8 <br/>
<title>OPENING</title><br/>
</head><br/>
<body bgcolor="#CCFFCC <br/>
<br/>
<br/>
</body><br/>
</html>
Do you have any idea what the problem may be?
Thanks
<br/>

View the full article
 
Back
Top