• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

ouput not displayed

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why is the output not getting displayed.The output should be Joe Smith.
Can anyone please explain the template match in details.I am using ie6 as the testing browser.I also have jaxp and IBM'S XML4J.How do i use
to test these xsl stylesheets.
xml file :
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="testxsl.xsl"?>
<source>
<employee>
<firstName>Joe</firstName>
<surname>Smith</surname>
</employee>
</source>
-------------------------------------------------------------
xsl file :
<?xml version='1.0' encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="employee">
<b>
<xsl:value-of select="."/>
</b>
</xsl:template>
<xsl:template match="surname">
<i>
<xsl:value-of select="."/>
</i>
</xsl:template>

</xsl:stylesheet>
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please use processors like saxon OR Xalan to learn XSLT and for testing your stylesheets.
Saxon has a command line version too.
you just need to do
saxon <xml-file> <xsl-file>
and it would work.
BTW Saxon is considered to be the best when it comes to adopting the latest XSL spec.
You can use xalanj from
xml.apache.org
Avoid IE for rendering/ learning and it will save you precious time!
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Clyde,
The only template that worked for me in IE 5.5 is -
<xsl:template match="employee">
<b>
employee
</b>
</xsl:template>
'xml in a nutshell' says (page 108) - "IE5 and IE5.5 support their own custom version of XSLT, based on a very early working draft of the XSLT specification. They do _not_ support XSLT 1.0. ... Despite superficial similarities, these two languages are not compatible."
Cheers,
Dan
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Clyde,
try this in your xsl file..
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Vidya
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
“A stylesheet written for IE5 uses the http://www.w3.org/TR/WD-xsl namespace, whereas a stylesheet designed for standard-compliant XSLT processors uses the http://www.w3.org/1999/XSL/Transform namespace.” (‘xml in a nutshell’ page #108).
Cheers,
Dan
 
Do Re Mi Fa So La Tiny Ad
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic