Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


doesn't make sense #2..could you?

From: TJ@-----------.---------.---
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent