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

Re: XML schema help for an XML document

From: Mukul Gandhi <gandhi.mukul@gmail.com>
Date: Mon, 28 Apr 2008 21:56:22 +0530
Message-ID: <7870f82e0804280926x222d91by7f4fd8d145132f71@mail.gmail.com>
To: "Manikandan Thangavelu" <Manikandan_T1@verifone.com>
Cc: xmlschema-dev@w3.org
Re: XML schema help for an XML document

I think, this is not possible in the current XSD language.

Though as a workaround, you can consider treating the attributes in
question as elements. Then you can use xs:choice instruction to get
the behaviour you are asking for.

for e.g., as following:

<xs:element name="Menuitem">
  <xs:complexType>
    <xs:choice>
      <xs:element name="ApplicationPath" type="xs:string"/>
      <xs:element name="ID" type="xs:string"/>
    </xs:choice>
    <xs:attribute name="name" type="xs:string" />
    <xs:attribute name="Description" type="xs:string" />
  </xs:complexType>
</xs:element>

I am not sure, if XML Schema language 1.1 will allow the provision you
are asking for.

On 4/28/08, Manikandan Thangavelu <Manikandan_T1@verifone.com> wrote:
>
> Hi All,
>
> Any updates on this question? I am in a kind of urgency and i am new bie to
> XML schema.
> Any help will be very much appreciated.
>
> Thanks and Regards
> Manikandan


-- 
Regards,
Mukul Gandhi
Received on Monday, 28 April 2008 16:26:56 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.