W3C home > Mailing lists > Public > public-xsd-databinding@w3.org > June 2006

ISSUE-48: collection with local elements defined by reference

From: <paul.downey@bt.com>
Date: Tue, 13 Jun 2006 14:52:30 +0100
Message-ID: <2A7793353757DB4392DF4DFBBC95225504BFEA99@I2KM11-UKBR.domain1.systemhost.net>
To: <public-xsd-databinding@w3.org>

here's an xmlspec snippit as an example pattern for ISSUE-48:

"""
      <div2 id="pattern-ElementReference" class="pattern"><head>Element Reference</head>
        <glist>
            <label>URI</label>
            <def><eg class="URI">http://www.w3.org/2002/ws/databinding/patterns/6/05/ElementReference</eg></def>
            <label>Definition</label>
            <def>-</def>

            <label>Examples</label>
            <def>
              <example id="eg-element-ElementReference" class="schemaexample">
                <head>Contact</head>
                <glist>
                    <def><eg xml:space="preserve" class="instanceexample"><![CDATA[
<xs:element name="elementReference" type="ex:ElementReference"/>

<xs:element name="name" type="xs:string"/>
<xs:element name="address" type="xs:string" />
<xs:element name="telephone" type="xs:string" />

<xs:complexType name="ElementReference">
  <xs:sequence> 
    <xs:element ref="ex:name"/>
    <xs:element ref="ex:address"/>
    <xs:element ref="ex:telephone"/>
  </xs:sequence>
</xs:complexType>
          ]]></eg></def>
                    <label>Instance:</label>
                    <def><eg xml:space="preserve" class="instanceexample"><![CDATA[
<ex:elementReference>
    <ex:name>Benn</ex:name> 
    <ex:address>52, Festive Road</ex:address>
    <ex:telephone>+44 207 946 0001</ex:telephone>
</ex:elementReference>
]]></eg></def>
                </glist>
              </example>
            </def>
        </glist>
      </div2>

"""

I'll refine this into a format so others can more easily submit
patterns - it's a little prone to errors as it stands :-/

Paul
Received on Tuesday, 13 June 2006 13:52:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 18:20:37 GMT