Re: XML deterministic content model issue

On Wednesday 05 June 2002 01:34 pm, Hallam-Baker, Phillip wrote:
> 	In particular I get an error when I attempt to add <any
> namespace="##other"> to the KeyBinding list, 'Content model must be
> deterministic'.
> 	The problem is that there is a ref to ds:KeyInfo in the sequence
> list. This should not be a problem strictly speaking since it is a
> sequence and the item immediately preceeding <any> is an xkms element and
> thus in a different namespace. However Visual Studio complaineth.

This is the same problem I encountered in [1] and, evidently, Visual Studio 
is correct to complain according to the schema spec.  Typically, I end up 
doing something ugly like this:

   <complexType name="KeyBindingType">
      <sequence>
         <element ref="xkms:Status"/>
         <element ref="xkms:PassPhrase" minOccurs="0"/>
         <element ref="xkms:ProcessInfo" minOccurs="0"/>
         <element ref="xkms:ValidityInterval" minOccurs="0"/>
         <element ref="xkms:KeyUsage" minOccurs="0" maxOccurs="3"/>
         <element ref="xkms:UseKeyWith" minOccurs="0"
          maxOccurs="unbounded"/>
         <element ref="xkms:Reason" minOccurs="0" maxOccurs="unbounded"/>
         <any namespace="##other"/>         
         <!-- <element ref="ds:KeyInfo" minOccurs="0"/> -->
      </sequence>
      <attribute name="ID" type="ID" use="optional"/>
   </complexType>

[1] http://lists.w3.org/Archives/Public/xmlschema-dev/2002Apr/0005.html

Received on Wednesday, 5 June 2002 13:54:29 UTC