RE: A question about an example at http://www.w3.org/TR/xforms/mo del.html 6.3.6

Thanks for your feedback. The example, was incomplete, and the XSLT was also
incorrect. The example will be corrected in the next public draft, and so
will the XSLT if time permits. Thank you again.
 

---------------------------------------------------------------------- 
Linda Bucsay Welsh < mailto:linda@intel.com <mailto:linda@intel.com> > 
Web Standards & Architecture Team (WSAT) 
Intel Architecture Labs 
503.264.4987 - Desk 
503.799.7091 - Cell 
503.264.3375 - Fax 
---------------------------------------------------------------------- 

-----Original Message-----
From: Simon [mailto:chi@intumit.com]
Sent: Friday, January 26, 2001 11:32 PM
To: www-forms@w3.org
Subject: A question about an example at
http://www.w3.org/TR/xforms/model.html 6.3.6


There is an example in the page http://www.w3.org/TR/xforms/model.html
<http://www.w3.org/TR/xforms/model.html>  6.3.6, like below

Example Simple Syntax:


<xfm:switch name="address">

  <xfm:case name="us" condition="property::locale is 'US'" >

    <xfm:string name="street"/>

    <xfm:string name="city"/>

    <xfm:string name="state"/>

    <xfm:string name="zip"/>

  </xfm:case>

  <xfm:case name="uk" condition="property::locale is 'UK'" >

    <xfm:string name="street"/>

    <xfm:string name="town"/>

    <xfm:string name="county"/>

    <xfm:string name="postcode"/>

  </xfm:case>

  <xfm:case name="default">

    <xfm:string name="street"/>

    <xfm:string name="town"/>

    <xfm:string name="county"/>

    <xfm:string name="postcode"/>

  </xfm:case>

</xfm:switch>

Example Equivalent Schema Syntax:


<xsd:element name="address">

  <xsd:complexType>

    <xsd:choice>

      <xsd:sequence">

        <xsd:element name="street"   type="xfm:string"/>

        <xsd:element name="city"     type="xfm:string"/>

        <xsd:element name="state"    type="xfm:string"/>

        <xsd:element name="zip"      type="xfm:string"/>

      </xsd:sequence>

      <xsd:sequence>

        <xsd:element name="street"   type="xfm:string"/>

        <xsd:element name="town"     type="xfm:string"/>

        <xsd:element name="county"   type="xfm:string"/>

        <xsd:element name="postcode" type="xfm:string"/>

      </xsd:sequence>

      <xsd:sequence>

        <xsd:element name="street"   type="xfm:string"/>

        <xsd:element name="town"     type="xfm:string"/>

        <xsd:element name="county"   type="xfm:string"/>

        <xsd:element name="postcode" type="xfm:string"/>

      </xsd:sequence>

    </xsd:choice>

  </xsd:complexType>

</xsd:element>

 
I think maybe the Schema Syntax is wrong. Due to the XSLT in Appendix B, it
should be
 


<xsd:element name="address">

  <xsd:complexType>

    <xsd:choice>

      <xsd:sequence xfm:name="us" xfm:condition="property::locale is 'US'" >

        <xsd:element name="street"   type="xfm:string"/>

        <xsd:element name="city"     type="xfm:string"/>

        <xsd:element name="state"    type="xfm:string"/>

        <xsd:element name="zip"      type="xfm:string"/>

      </xsd:sequence>

      <xsd:sequence xfm:name="uk" xfm:condition="property::locale is 'UK'" >

        <xsd:element name="street"   type="xfm:string"/>

        <xsd:element name="town"     type="xfm:string"/>

        <xsd:element name="county"   type="xfm:string"/>

        <xsd:element name="postcode" type="xfm:string"/>

      </xsd:sequence>

      <xsd:sequence xfm:name="default" >

        <xsd:element name="street"   type="xfm:string"/>

        <xsd:element name="town"     type="xfm:string"/>

        <xsd:element name="county"   type="xfm:string"/>

        <xsd:element name="postcode" type="xfm:string"/>

      </xsd:sequence>

    </xsd:choice>

  </xsd:complexType>

</xsd:element>

But I'm not sure, could anybody teach me?
 
 - Chi-Yang Chang

Received on Sunday, 28 January 2001 16:07:25 UTC