- From: Bellamkonda, Abishek (VTR) <abishek.bellamkonda-eds@eds.com>
- Date: 05 Dec 2005 15:59:55 -0700
- To: <www-xml-schema-comments@w3.org>
- Message-ID: <7B2ABC7A3E6EA14A8E5DFE152F05F4F10114123E@aumem201.apac.corp.eds.com>
Hi,
I think we need the ability to define possible element
structures and validate XML using XSD. For example, I have the following
XML.
<?xml version="1.0" encoding="utf-8"?>
<Data xmlns="http://tempuri.org/Xml.xsd">
<!-1 St Extraction -->
<Extraction>
<File>
<Name>WEI</Name>
</File>
<File>
<Name>Abi</Name>
</File>
</Extraction>
<!-2 nd Extraction.
I am expecting either above or below.
I should not have Sum in Extraction and file
-->
<Extraction>
<File>
<Sum>3</Sum>
<Name>WEI</Name>
</File>
<File>
<Sum>3</Sum>
<Name>Abi</Name>
</File>
</Extraction>
</Data>
I need to have either 1st or 2nd type of Extraction not both. In short
in my XML I should have sum specified at Extraction level or at File
level not both. How can I do that. Choice seem to restrict and throw an
error 'Elements with the same name and in the same scope must have the
same type. An error occurred at , (28, 10).' I have attached XML and
XSD.
<<Xml.xml>> <<Xml.xsd>> With Regards,
Abi ( Abishek Bellamkonda )
.NET Architect - Multi-Tier Applications
Australia South Application Deliver Unit
e Australia Pty. Ltd.
13/484 St. Kilda Road
Melbourne
Victoria 3004
Australia
Tel: (+61-3) 8866 7243
Fax: (+61-3) 8866 7825
EMail: abishek.bellamkonda-eds@eds.com
Attachments
Received on Monday, 5 December 2005 23:02:24 UTC