[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Venetian Blinds vs Garden of Eden patterns for industrysta

  • From: Mukul Gandhi <gandhi.mukul@gmail.com>
  • To: Pete Cordell <petexmldev@codalogic.com>
  • Date: Sat, 30 Oct 2010 06:32:26 +0530

Re:  Venetian Blinds vs Garden of Eden patterns for industrysta
Hi Pete,
    Why can't we use a schema like below for this need (using
elementFormDefault="qualified").

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
                   targetNamespace="http://opportunities.org"
                   elementFormDefault="qualified">

   <xs:element name="availability">
       <xs:complexType>
           <xs:sequence>
              <xs:element name="from" type="DATE" />
              <xs:element name="to" type="DATE" />
              <xs:element name="person" type="PERSON" />
           </xs:sequence>
       </xs:complexType>
   </xs:element>

   <xs:complexType name="DATE">
        <xs:sequence>
            <xs:element name="day" type="xs:int" />
            <xs:element name="month" type="xs:int" />
            <xs:element name="year" type="xs:int" />
        </xs:sequence>
   </xs:complexType>

   <xs:complexType name="PERSON">
       <xs:sequence>
            <xs:element name="name" type="xs:string" />
            <xs:element name="height" type="xs:int" />
       </xs:sequence>
   </xs:complexType>

</xs:schema>

On Fri, Oct 29, 2010 at 2:08 AM, Pete Cordell <petexmldev@codalogic.com> wrote:
> It would be cleaner if the XML instance used elementFormDefault="unqualified" and looked like:
>
> <availability xmlns="http://opportunities.org" >
>   <from>
>       <day>21</day>
>       <month>12</month>
>       <year>2012</month>
>   </from>
>   <to>
>       <day>24</day>
>       <month>12</month>
>       <year>2012</month>
>   </to>
>   <person>
>       <name>Janice</name>
>       <height>185</height>
>   </person>
> </availability>
>
> So how would you attack the problem of the above?




-- 
Regards,
Mukul Gandhi


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.