[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Newbie question cont--transformation chokes on img tag

Subject: Newbie question cont--transformation chokes on img tag
From: Grant-Kathryn@xxxxxxxxxxxxxxxxx
Date: Fri, 24 May 2002 14:29:34 -0700
xsl img tag
Hi all,

I've come across a new glitch in transforming my xhtml file.  It was doing
fine until I added an img tag (right before </body>)--then the
transformation resulted in a blank screen.  Files appear below.  Can anyone
tell me why this is happening and how to fix it?  

By the way, when I run the transformation at the command line using msxsl,
the image tag is converted to <img src="image85.gif"></img>.  But that
shouldn't be a problem, should it?  Also, when I view the xhtml file in the
browser before transformation, the image shows up fine.

Thanks in advance,
Kathryn

--------------------xhtml file-------------------------------
<?xml version="1.0" encoding="UTF-8"?>

<!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" xml:lang="en">

<head>
<title>Testing Title</title>
</head>
<body>
	<div class="mgronly">
		<p>The first paragraph applies only to managers.</p>
	</div>
	<div class="both">
		<p>Paragraph 2 applies to both investigators and
managers.</p>
		<p>The third paragraph to both.</p>
	</div>
	<div class="mgronly">
		<p>The last paragraph applies only to managers.</p>
	</div>

<img src="image85.gif" />

</body>
</html>
-------------------end xhtml file-----------------------------

---------------------xsl file---------------------------------
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xhtml="http://www.w3.org/1999/xhtml"
    version="1.0">

<xsl:output method="xml" encoding="UTF-8"/>

	<xsl:template match="*|@*|text()|comment()">
		<xsl:copy>
			<xsl:apply-templates
select="*|@*|text()|comment()"/>
		</xsl:copy>
	</xsl:template>

	<xsl:template match="xhtml:div[@class='mgronly']"/>

</xsl:stylesheet>
--------------------- end xsl file------------------------------

On the outside chance the problem is with msxml, here's the transformation
code I'm using:

<script type="text/javascript">
var xml = new ActiveXObject("MSXML2.DOMDocument")
xml.async = false
xml.load("test-xhtml.htm")

var xsl = new ActiveXObject("MSXML2.DOMDocument")
xsl.async = false
xsl.load("test-xhtml-investigator.xsl")

document.write(xml.transformNode(xsl))
</script>


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.