XSL - getting error

N

Navanee

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:stylesheet 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
 
M

Martin Honnen

Navanee wrote:

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:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="name"> First name tag found </xsl:template>
</xml:stylesheet>

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,244
Members
46,838
Latest member
KandiceChi

Latest Threads

Top