OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xml-dev] W3C XML Schema is more than "close by default) (Re: [xml-dev] annotations outside validation)



Eric van der Vlist <vdv@dyomedea.com> writes:

<snip/>

> If your target namespace is ns1 and you have:
> 
> <xs:element name="foo">
>   <xs:complexType>
>    <xs:sequence>
>     <xs:element ref="ns1:bar"/>
>     <xs:element ref="ns2:bar"/>
>    </xs:sequence>
>   </xs:complexType>
> </xs:element>
> 
> <note for="the happy W3C XML Schema illetrates">
> 
> This is a simple content model allowing:
> 
> <ns1:foo>
>   <ns1:bar/>
>   <ns2:bar/>
> </ns1:foo>
> 
> </note>
> 
> you can't add any longer a wildcard (at least you can't immediatly
> after or before ns2:bar) in the sequence since you can't specify in
> a wildcard that you accept any namespace except those defined nor
> even that you accept any namespace except ns1 and ns2.

True, but that (negating multiple namespaces) is a feature we nearly
added just before going to REC, and probably will add in 1.1.

> The closest choice which you have (any namespace except the target)
> cannot be used either since it would accept ns2 and break the Unique
> Particle Attribution rule.

Not so.  The following is fine:

<xs:element name="foo">
   <xs:complexType>
    <xs:sequence>
     <xs:element ref="ns1:bar"/>
     <xs:element ref="ns2:bar"/>
     <xs:any namespace="##other"/>
    </xs:sequence>
   </xs:complexType>
 </xs:element>

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/