Re: [XForms] Namespace prefixes in XForms and discrepant results

On thinking a little longer the seeming "discrepancy" for the 
non-namespace-prefixed nodes is clear (see 2.3 of XPath 1.0).

But, taking 2.3 of XPath 1.0 into account I expected the following code to 
work, but it doesn't in either X-Smiles (input binding failed error) or 
Novell (fails to retrieve the text in <Name>).

<?xml version="1.0"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html 
 xmlns="http://www.w3.org/1999/xhtml" 
 xmlns:ev="http://www.w3.org/2001/xml-events"
 xmlns:xforms="http://www.w3.org/2002/xforms/cr"
 xmlns:xmml="http://www.xmml.com"
 lang="en" xml:lang="en">
 <link href="SimpleLogin.css" rel="stylesheet" type="text/css"></link>

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

It's late on a Saturday night. Quite possibly I am overlooking something 
obvious. Maybe it will all seem clear on a fresh day. But maybe not. :)

Andrew Watt

Received on Saturday, 8 March 2003 15:23:17 UTC