W3C home > Mailing lists > Public > www-forms@w3.org > March 2003

Namespace prefixes in XForms and discrepant results

From: <AndrewWatt2001@aol.com>
Date: Sat, 8 Mar 2003 14:58:28 EST
Message-ID: <46.365bbe21.2b9ba564@aol.com>
To: xforms@yahoogroups.com, www-forms@w3.org

In exploring very simple uses of namespace prefixed elements I have turned up 
different behaviour from X-Smiles 0.71 and the Novell XForms Preview.

I will present the longest version of the code, then suggest how it be 
selectively modified to illustrate different namespace scenarios and will 
briefly describe each set of the results on X-Smiles and Novell respectively.

The code isn't complete. At this stage I am simply comparing output from the 
two XForms processors.

Here is the code:

<?xml version="1.0"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 lang="en" xml:lang="en">
 <link href="SimpleLogin.css" rel="stylesheet" type="text/css"></link>

<title>Simple XForms Login Example</title>
 <xforms:submission localfile="DumpData.xml" method="postxml"/>
 <xforms:instance xmlns=""
  <Name>Your Name</Name>
  <Password>Your password</Password>
  <xmml:Name >Your QName</xmml:Name>
<body xmlns:xmml="http://rubbish"> 
 <xforms:input ref="/LoginData/xmml:Name">
  <xforms:label>Enter your name:</xforms:label>
 <xforms:secret ref="/LoginData/Password" style="width:100pt">
  <xforms:label>Enter your password:</xforms:label>
 <xforms:label>Login by clicking here</xforms:label>

The SimpleLogin.css file is here:
body { font-style: normal; font-weight: 500; background-color: #EEEEFF; 
color: red;}
input, secret {width: 200pt; color:black; background-color: #FFFFFF; 
label {color:red}

With the above XHTML the results are as follows:
X-Smiles - gives an input binding failed error
Novell - displays but doesn't find the text inside <xmml:Name>

If the xmlns:xmml="http://rubbish" namespace declaration on <body> is 
X-Smiles - works
Novell - usually works (the text in the first <xforms:input> sometimes 
doesn't display but is there if you click on it)

If the xmlns:xmml="http://www.xmml.com" on <html> is removed:
X-Smiles: java.langNullPointerException
Novell: two error messages re failing to bind xmml

If the binding expressions on <xforms:input> are modified to remove the 
namespace prefixes from xmml:Name and xmml:Password then the original form 
"works" despite the fact that the namespace declarations for unprefixed 
elements are different in the two locations.

When prefixed element nodes with different namespace declarations (original 
code above) are processed then X-Smiles fails and Novell produces a sort of 
half-way house.

I hope I have explained that clearly enough for readers to follow.


What should be displayed for each of these four variants on this pretty 
simple code?

Andrew Watt
Received on Saturday, 8 March 2003 14:58:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:08 UTC