473,385 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

xforms doesn't returned correctly

13
Hi.
I’m new to XForms society and struggling with a basic concepts. However, I’m trying to transform an xml doc into XForms using XSLT. The browser renders the Xforms just fine but there is no effect to bind element. For instance the third UI control should be rendered as a calendar because its type is xs:date
However, I got a normal input box instead. Also property required= “true()” has no effect.
Any help is much appreciated.
Here is my xml document
<?xml version='1.0'?>
<?xml-stylesheet type="text/xsl" href="stylesheet101.xsl"?>
<data>
<name> Name </name>
<id > User id </id>
<gender> Sex </gender>
<age> Date of Birth </age>
</data>
And here is my xslt stylesheet
<?xml version='1.0'?>
<xsl:stylesheet version="2.0" xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xforms="http://www.w3.org/2002/xforms/cr" xmlns:xmml="http://www.xmml.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<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.dtd" />


<xsl:template match="/">

<html >
<head> <title>Title comes here </title>
<xforms:model>
<xforms:submission action="URL" method="post" />

<xforms:instance>
<xsl:apply-templates select="data" />
</xforms:instance>
<xforms:bind nodeset="data/id" required="true()" type="xs:integer"/>
<xforms:bind nodeset="data/name" required="true()" />
<xforms:bind nodeset="data/age" required="true()" type="xs:date"/>
</xforms:model>
</head>
<body>

<p>
<xforms:input ref="data/id" style="width:100pt"> <xforms:label> <xsl:value-of select="data/id" /> </xforms:label> </xforms:input>
</p>
<p>
<xforms:input ref="data/name" style="width:100pt"> <xforms:label> <xsl:value-of select="data/name" /> </xforms:label> </xforms:input>
</p>
<p>
<xforms:input ref="age" style="width:100pt"> <xforms:label> <xsl:value-of select="data/age" /> </xforms:label> </xforms:input>
</p>
<p> <xforms:submit> <xforms:label> Click here to submit </xforms:label> </xforms:submit> </p>

</body>
</html>
</xsl:template>


<xsl:template match="data">
<xsl:copy>
<xsl:copy-of select="data/id"/>
<xsl:copy-of select="data/name"/>
<xsl:copy-of select="data/age"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Jan 17 '08 #1
2 1446
jkmyoung
2,057 Expert 2GB
Have you tried true as opposed to true() ?

Which XForms interpreter are you using?
Jan 17 '08 #2
li72
13
hi. it is invalid to use true instead of true=(). however i use saxon for transformaton.
Have you tried true as opposed to true() ?

Which XForms interpreter are you using?
Jan 17 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jonathan | last post by:
Does anyone know if it's possible to do the following: I currently have an XML schema set up, part of which includes an enumerated datatype (based on string) giving a list of values that I want...
2
by: Will | last post by:
I have been having problems validating an XForms document against the XForms schema located at http://www.w3.org/MarkUp/Forms/2002/XForms-Schema.xsd. I have reduced the XForm to its bare bones...
2
by: donaldevans_net | last post by:
I have a site that works well with others browsers. I'm getting complaints about IE5.2.3 that my layers are over lapping. I used XFORMS in my programming can you help me?
0
by: arti | last post by:
Hi all. I have a problem/question with XForms. I have 2 instnace in my document, instance1 and instance2. <xforms:instance xmlns="" id=instance1"> .... </xforms:instance> <xforms:instance...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
9
by: jazzslider | last post by:
I have a headache. I've done a LOT of research lately into XForms, and I am thoroughly convinced that a good implementation of this technology would help me immensely in converting my...
7
by: ClarkePeters | last post by:
Can anyone tell me why my CSS style sheet isn't styling my xhtml (using xforms)? I'm using firefox 1.5.0.8 with the xforms extension. Here is the xhtml, it's only a single text area for input. ...
1
by: spark86 | last post by:
I currently have an xform where I'm trying to have the user input first and last name and then when it submits it goes to a file with the path first_last.xml. Here is what I have currently: ...
0
by: li72 | last post by:
As you can see in binding part, the node<age /> should be returned as a calendar or any form of date picker instead of an input box. In addition, none null values submission is not achieving. I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.