Checking the CDL schema

Dear CDLers,
 
Greetings to you all - and keep up the good work.  Just to show that I am
still lurking (/taking an interest!) and will try to be helpful when I
can....
 
I have extracted the full CDL schema from the 15 Sept 05 editors' version
and run it through XMLSpy, Stylus Studio and Oxygen.  Unfortunately they all
agree that there is a somewhat subtle 'technical' problem with the schema in
its current form.
 
The XML Schema 'any' construct is often used as 'catchall' extension point,
but often is a source of problems as schema validators will throw a 'wobbly'
if the can not always tell when something in an instance document
corresponds to this particular 'any' in the schema or something else.  We
have currently fallen into this trap!
 
In your case all your elements are built on   tExtensibleElements  which
contains  <any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
 
In particular this 'any' of tExtensibleElements used as the basis for
tSequence means that a validator can not tell, in all cases, whether an
element in an instance document corresponds to this any or the one in the
sequence allowed by activity which also includes an 'any' in its choice.
 
One solution that works is to wrap the 'any' in tExtensibleElements in
another element as below:
 
<complexType name="tExtensibleElements">
  <annotation>
   <documentation> This type is extended by other WS-CDL component types to
allow elements
    and attributes from other namespaces to be added. This type also
contains the
    optional description element that is applied to all WS-CDL constructs.
   </documentation>
  </annotation>
  <sequence>
   <element name="description" minOccurs="0">
    <complexType mixed="true">
     <sequence minOccurs="0" maxOccurs="unbounded">
      <any processContents="lax"/>
     </sequence>
     <attribute name="type" type="cdl:tDescriptionType" use="optional"
      default="documentation"/>
    </complexType>
   </element>
   <element name="CDLExtension" type="cdl:CDLExtensionType" minOccurs="0"
    maxOccurs="unbounded"/>
  </sequence>
  <anyAttribute namespace="##other" processContents="lax"/>
 </complexType>

 <complexType name="CDLExtensionType">
  <sequence>
   <any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
  </sequence>
 </complexType>
 
Actually this technique would allow the namespace attribute for the any in
the CDLExtensionType to be changed to  namespace="##any"  if desired.
However, I am sure that there are other solutions as well (and not everyone
regards this type of problem as serious).
 
I have also tried checking the two complete examples against my modified
schema (and the original) and they check out with the exception that the
third informationType (name="badPOAckType") has an attribute of
exceptionType="true" which is (no longer?) allowed by the schema.  Fine with
that attribute removed.
 
 
Best Regards     Tony
A M Fletcher
Tel: +44 (0) 1473 729537   Mobile: +44 (0) 7801 948219
 tony.fletcher@choreology.com    amfletcher@iee.org       (also
tony_fletcher@btopenworld.com)
 
 

Received on Friday, 16 September 2005 01:02:10 UTC