AprilWeb
05-16-2010, 01:11 AM
Hi,
I have the following xml, xsl and output from firefox when loading the xml.
The xsl is virtually useless, since it just have the stylesheet tag without any real content. I suppose when I load the xml in firefox, firefox should print the real xml file itself, as if the xsl doesn't exist (<?xml-stylesheet type="text/xsl" href="book.xsl"?>), since there is no real data in it. But instead I get all the text node printed.
Why is that? Is there anyway to avoid all the text node from being printed?
XML:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="book.xsl"?>
<main>
<boulevard>
<block>Panorama Street</block>
<block>Panorama Street</block>
</boulevard>
<parkway>
<thoroughfare name="Whitesburg Drive">
<sidestreet>Bob Wallace Avenue</sidestreet>
<sidestreet>Woodridge Street</sidestreet>
</thoroughfare>
</parkway>
</main>
XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" >
<xsl:output method="text" />
</xsl:stylesheet>
output:
Panorama Street
Panorama Street
Bob Wallace Avenue
Woodridge Street
Thanks,
April
I have the following xml, xsl and output from firefox when loading the xml.
The xsl is virtually useless, since it just have the stylesheet tag without any real content. I suppose when I load the xml in firefox, firefox should print the real xml file itself, as if the xsl doesn't exist (<?xml-stylesheet type="text/xsl" href="book.xsl"?>), since there is no real data in it. But instead I get all the text node printed.
Why is that? Is there anyway to avoid all the text node from being printed?
XML:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="book.xsl"?>
<main>
<boulevard>
<block>Panorama Street</block>
<block>Panorama Street</block>
</boulevard>
<parkway>
<thoroughfare name="Whitesburg Drive">
<sidestreet>Bob Wallace Avenue</sidestreet>
<sidestreet>Woodridge Street</sidestreet>
</thoroughfare>
</parkway>
</main>
XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" >
<xsl:output method="text" />
</xsl:stylesheet>
output:
Panorama Street
Panorama Street
Bob Wallace Avenue
Woodridge Street
Thanks,
April