Hello,
i want to modify xml by using xforms tag in xslt and process all to cocoon,
anybody can help me?
Now i can't recover info from xml file:
.xml
<?xml version='1.0' encoding="UTF-8"?>
<LoginData
xmlns="C:/cocoo-Standalone/webapp/LoginData.xml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events" >
<title>A simple XForms Login Example</title>
<Name>Giacomo</Name>
<Password>Poli</Password>
</LoginData>
.xslt
<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet
version="1.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="http://www.w3.org/2002/xforms"
xmlns:xmml="C:/cocoo-Standalone/webapp/"
>
<xsl:output method="xml"
indent="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<xsl:template match="/">
<html>
<link href="SimpleLogin.css" rel="stylesheet" type="text/css"/>
<head>
<title><xsl:value-of select="LoginData/title" /></title>
<xforms:model>
<xforms:submission action="LoginData.xml" method="post" replace="instance"/>
<xforms:instance>
<xsl:apply-templates select="LoginData" />
</xforms:instance>
</xforms:model>
</head>
<body>
<xsl:comment>The values of the ref attributes are XPath expressions binding to
the XForms model.</xsl:comment>
<xforms:input ref="LoginData/Name" >
<xforms:label>Enter your name:</xforms:label>
</xforms:input>
<xforms:secret ref="LoginData/Password" style="width:100pt">
<xforms:label>Enter your password:</xforms:label>
</xforms:secret>
<p/>
<xforms:submit>
<xforms:label>Login by clicking here</xforms:label>
</xforms:submit>
</body>
</html>
</xsl:template>
<xsl:template match="xmml:LoginData">
<!-- The values of the select attributes are XPath expressions addressing the
source XML document. -->
<xsl:copy>
<xsl:copy-of select="/xmml:LoginData/xmml:Name" />
<xsl:copy-of select="/xmml:LoginData/xmml:Password" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
I attach the result!!
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--