Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Multiple elements whose name att is the same: Help [SEC=UNCLASSIFIED]

From: <Nicholas.Ardlie@--.---.-->
To: <aureliocalegari@-------.--->, <xmlschema-dev@--.--->
Date: 5/18/2007 11:53:00 PM
There are a number of ways to tackle this problem,

Have a look at http://www.xfront.com/VariableContentContainers.html for =
some
guidelines on a few approaches.

 

Regards,

Nick.

 

-----Original Message-----
From: xmlschema-dev-request@w... [mailto:xmlschema-dev-request@w...] =
On
Behalf Of Aurelio Calegari
Sent: Friday, 18 May 2007 3:48 AM
To: xmlschema-dev@w...
Subject: Multiple elements whose name att is the same: Help

 

Hello,

 

I'm having a problem to validate the following XSD:

 

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema
<http://www.w3.org/2001/XMLSchema> ">
 <xs:element name="TransmittalList">
  <xs:complexType>
   <xs:sequence>
    <xs:element name="PublishInformation" =
type="PublishInformationType" />
    <xs:element name="FixInformation" type="FixInformationType" />
    <xs:element name="ProductInformation" =
type="ProductInformationType" />
    <xs:element name="FixAttributes" type="FixAttributesType" />
    <xs:element name="Relation" type="RelationTypeDef" =
minOccurs="0"
maxOccurs="unbounded" />
    <xs:element name="File" type="FixFileTypeDef" minOccurs="1" =
maxOccurs="1"
/>
    <xs:element name="File" type="StackedFixFileTypeDef" =
minOccurs="0"
maxOccurs="1" />
    <xs:element name="File" type="MetaFileTypeDef" minOccurs="0"
maxOccurs="unbounded" />
   </xs:sequence>
  </xs:complexType>
 </xs:element>

(...)

 

 

As you can see, I have three entries for name="File". I have an XSD =
validator
that says it violates the "Unique Particle Attribution
<http://www.w3.org/TR/xmlschema-1/#cos-nonambig> ". I understand it =
appears
to be wrong (the repeating entries above) but I would need to recieve =
xml
that would have <File> entries with different content. I also tryed:

 

<xs:sequence>
 <xs:element name="PublishInformation" type="PublishInformationType" =
/>
 <xs:element name="FixInformation" type="FixInformationType" />
 <xs:element name="ProductInformation" type="ProductInformationType" =
/>
 <xs:element name="FixAttributes" type="FixAttributesType" />
 <xs:element name="Relation" type="RelationTypeDef" minOccurs="0"
maxOccurs="unbounded" />
 <xs:element name="File" type="FixFileTypeDef" minOccurs="1" =
maxOccurs="1" />
 <xs:choice>
  <xs:sequence>
   <xs:element name="File" type="MetaFileTypeDef" minOccurs="0"
maxOccurs="unbounded" />
  </xs:sequence>
  <xs:sequence>
   <xs:element name="File" type="StackedFixFileTypeDef" =
minOccurs="1"
maxOccurs="1" />
   <xs:element name="File" type="MetaFileTypeDef" minOccurs="0"
maxOccurs="unbounded" />
  </xs:sequence>
 </xs:choice>
</xs:sequence>

 

and a number of other combinations and I cannot succesfully validate a =
xml
document which contain more than a file type. Any suggestions on the =
model?

 

Thanks very much in advance

 

Aurelio

 



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent