RE: Chapter 2.4 Inconsistencies

These are two fragments that apparantly are not a part of the same document even though they logically refer to the same sample problem. One assumes the default namespace is XForms while the other does not. That accounts for why one fragment contains the "xforms" prefix and the other does not.
 
If you put
 xmlns:my="http://commerce.example.com/payment
on the root element it should resolve "my:payment"
 
Some people like the examples to be all consistent. I tend to like them mixed up a little to see different implementations and make me really understand what is going on. However, if the fragments are based upon the same sample problem, then I agree it makes sense to keep them consistent.
 
P.S. Please stop posting "remove me" and "unsubscribe" commands to this list. See http://www.w3.org/Mail/Request for instructions. 
 

-----Original Message-----
From: Calbazana, Al [mailto:ACalbazana@epotec.com]
Sent: Tuesday, June 25, 2002 10:32 PM
To: 'www-forms@w3.org'
Subject: RE: Chapter 2.4 Inconsistencies



Hello,

 

I am just taking another peek at the XForms draft after some time away and noticed something confusing in the 2.4 sample.  I see that it has also confused others, but I am still not clear on how this namespacing works.  Can someone give a little explanation (I've read the posts in the list concerning these but I am still not clear)?

 

Sample instance data reads:

 

<xforms:model>

  <xforms:instance>

    <payment as="credit" xmlns="http://commerce.example.com/payment">

      <cc/>

      <exp/>

    </payment>

  </xforms:instance>

  <xforms:submitInfo action="http://example.com/submit" method="post"/>

</xforms:model>

 

UI Control reads:

 

    <group xmlns="http://www.w3.org/2002/01/xforms" ref="my:payment">

      <selectOne ref="@as">

        <caption>Select Payment Method</caption>

        <choices>

            ....

 

How are these namespaces to be resolved?

 

Thanks!

 

Alejandro

Received on Wednesday, 26 June 2002 15:03:20 UTC