Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: doesn't make sense #2..could you? doesn't make sense #2..could you?To: NULL Date: 10/12/2007 9:54:00 PM
Hi,
I am trying to understand the difference ....xsl...hum..
This is A.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/hello-world/greeting">
<div><xsl:value-of select="."/></div>
</xsl:template>
</xsl:stylesheet>
This is B.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/hello-world">
<div><xsl:value-of select="greeting/text()"/></div>
</xsl:template>
</xsl:stylesheet>
I tested these two xsl with this xml.
This is A.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="A.xsl"?>
<hello-world>
<greeting>Hello, World!</greeting>
<greeter>An XSLT Programmer</greeter>
</hello-world>
This is B.XML
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="B.xsl"?>
<hello-world>
<greeting>Hello, World!</greeting>
<greeter>An XSLT Programmer</greeter>
</hello-world>
It produce different results in IE7.
A.XML output
Hello, World!
An XSLT Programmer
B.XML output
Hello, World!
It looks to me that two xsl should produce
same output.....hum...
Can anybody explain this?
Since I am a beginner,
I would like to understand the difference exactly...
Thanks in advance.
..........................................TJ
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
