XSL - getting error

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

    XSL - getting error

    Hi,

    I am have a xml file with the following structure. (emp.xml)
    <?xml version="1.0" ?>
    <employee>
    <name>Navanee </name>
    <age>24</age>
    <sex>Male</sex>
    <city>Madurai </city>
    <new>Test New </new>
    </employee>

    I also have a .xsl file that reads data from the above xml. The
    structure of the .xsl file is as follows: (try.xsl)
    <?xml version="1.0"?>
    <xml:styleshe et version="1.0"
    xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
    <xsl:template match="name"> First name tag found </xsl:template>
    </xml:stylesheet>

    i tried to execute using xt.exe:
    c:> xt emp.xml try.xsl

    I am getting this error:
    file:/c:/try.xsl:3: expected action not xsl:template

    Please tell me where I have made mistake

    Regards,
    Navanee

  • Martin Honnen

    #2
    Re: XSL - getting error



    Navanee wrote:

    [color=blue]
    > I also have a .xsl file that reads data from the above xml. The
    > structure of the .xsl file is as follows: (try.xsl)
    > <?xml version="1.0"?>
    > <xml:styleshe et version="1.0"
    > xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
    > <xsl:template match="name"> First name tag found </xsl:template>
    > </xml:stylesheet>[/color]

    That should at least be
    <xsl:styleshe et
    xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:template match="name"> First name tag found </xsl:template>
    </xsl:stylesheet>



    --

    Martin Honnen

    Comment

    • Navanee

      #3
      Re: XSL - getting error

      Thanks a lot. Your answer is right. :)

      Comment

      Working...