parser problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • adanpradan

    #1

    parser problem


    Hello,

    we have created two files sample.xml and sample.xsl

    The code in sample.xml


    <?xml version="1.0"?>
    <department>
    <dept-name>
    Department of Magical Implications
    </dept-name>
    <address>
    10 Hogwarts Castle
    </address>
    <person type="chair">
    <name>Albus Dumbledore</name>
    </person>
    <person type="prof">
    <name>Severus Snape</name>
    <interests>poti ons</interests>
    </person>
    <person type="prof">
    <name>Minerva McGonagall</name>
    <house>Gryffind or</house>
    </person>
    </department>

    The code in sample.xsl
    <xsl:transfor m
    xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
    version="1.0"
    xmlns:saxon="ht tp://icl.com/saxon"
    exclude-result-prefixes="saxon "[color=blue]
    >[/color]
    <xsl:template match="departme nt">
    <HTML>
    <BODY>
    <xsl:apply-templates select="dept-name" />

    <xsl:apply-templates select="person" >
    <xsl:sort select="name" order="ascendin g" />
    </xsl:apply-templates>

    </BODY>
    </HTML>
    </xsl:template>
    <xsl:template match="dept-name">
    <h1>
    <xsl:value-of select="."/>
    </h1>
    </xsl:template><
    <xsl:template match="person">

    <xsl:value-of select="name"/>

    </xsl:template>
    <xsl:template match="person[(@type='chair')]">

    <xsl:value-of select="name"/>
    (Chair)

    </xsl:template>
    </xsl:transform>
    parser used : saxon 5.5.1
    Error generated on execution: Exception in thread "main
    java.lang.NoCla ssDefFoundError : com/icl/saxon/Stylesheet. Kindly not
    that we have not installed JDK 1.2 because the java executables ar
    available in saxon.

    Regards,
    Manoj B

    adanpradan
    -----------------------------------------------------------------------
    Posted via http://www.forum4designers.co
    -----------------------------------------------------------------------
    View this thread: http://www.forum4designers.com/message44018.htm

Working...