XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
XML Schema and the Unique Particle Attribution (UPA) rule

Hi,

 

I would like to create an XML Schema for the content model like:

 

<M>

  <type>type1</type>

  <… several elements specific to type1 …>

</M>

 

<M>

  <type>type2</type>

  <… several elements specific to type2 …>

</M>

 

Etc

 

I was playing with a XML Schema like:

 

  <xs:complexType name="upa_test">

    <xs:choice>

      <xs:sequence>

        <xs:element name="type" type="xs:string" fixed="type1" />

        <xs:element name="B" type="xs:string"/>

      </xs:sequence>

      <xs:sequence>

        <xs:element name="type" type="xs:string" fixed="type2" />

        <xs:element name="C" type="xs:string"/>

      </xs:sequence>

    </xs:choice>

  </xs:complexType>

 

But the processor I am using rejects this Schema saying it violates the UPA rule. Shouldn’t the processor be able to uniquely determine the particle based on the element’s type and/or value? Can someone suggest an alternate XML Schema that would not violate the UPA rule?

 

Changing the content model to introduce an intermediate level for <type1>, <type2>, etc would work, but I can’t make this change as it would break backward compatibility.

 

Thanks

Azariah

 



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


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS