Hi. everyone
I am new to xslt and Xforms technologies. I am trying to write a very simple xslt stylesheet to transform a very simple xml doc into Xforms doc. (Hello world example)
here are my xml doc and xslt stylesheet could plz tell me what wrong
with my stylesheet.
Remark: X-smiles is used as web browser and it returns an error message when the page is called.
the page is called as: http://localhost:8080/mydoc.xml
both xml do and xslt stylesheet in the same directory
many thanks in advance
here is xml doc:
<?xml version='1.0'?>
<?xml-stylesheet type="text/xsl" href="styleshee t01.xslt"?>
<data>
<Name> Hello World </Name>
</data>
and here is XSLT
<?xml version='1.0'?> <xsl:styleshe et version="2.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xforms="h ttp://www.w3.org/2002/xforms/cr" xmlns:xmml="htt p://www.xmml.com" >
<xsl:output method="xhtml" indent="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d" />
<xsl:template match="/">
<html>
<head>
<title>Title comes here </title>
<xforms:model >
<xforms:submiss ion action="" method="post" id="s"/>
<xforms:instanc e>
<xsl:apply-templates select="data" />
</xforms:instance >
</xforms:model >
</head>
<body>
<xforms:outpu t ref="data/name"/>
</body>
</html>
</xsl:template>
<xsl:template match="data/name">
<xsl:copy>
<xsl:copy-of select="data/name"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>