![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: transformNode() strips some missing tags transformNode() strips some missing tagsTo: NULL Date: 11/7/2006 5:32:00 PM
This is a very simple xsl file:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="UTF-8" />
<xsl:template match="/">
<div id="parent">
<div id="prod">
<div class="title" >
<img>
</img>
</div>
<div id="prod-content" speHei="90" class="stretcher">
<script type="text/javascript">
</script>
</div>
</div>
</div>
</xsl:template>
</xsl:stylesheet>
now in my js:
var doc=new ActiveXObject("Microsoft.XMLDOM");
doc.async="false";
result = xmlElement.transformNode(this.xsl);
alert(result);
once run, the closing tag of the img element is stripped:
<div id="parent">
<div id="prod">
<div class="title" >
<img>
</div>
<div id="prod-content" speHei="90" class="stretcher">
<script type="text/javascript">
</script>
</div>
</div>
</div>
Consequently, running the parser
doc.loadXML(result);
alert("error " + doc.parseError.errorCode + " reason " +
doc.parseError.reason + " line " + doc.parseError.line);
raise an 1072896659
If I replace img by a br tag, it works
Where is the problem ?
Tanks a lot
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
