- From: Tony Fletcher <tony_fletcher@btopenworld.com>
- Date: Sat, 17 Sep 2005 13:12:02 +0100
- To: "'Nickolas Kavantzas'" <nickolas.kavantzas@oracle.com>
- Cc: <public-ws-chor@w3.org>
- Message-ID: <000001c5bb81$04b0d440$6501a8c0@corp.choreology.com>
Dear Nick, 1) It is the (in)famous 'unique particle attribution' error. I am using XMLSpy 2005 R3 (under the W3C licence). I think that older versions of XMLSpy tend not to flag this error. I have also tried Stylus Studio Professional 6 R2 and Oxygen 6.1 and they all agree on the presence of this problem with the current schema. Elements from a different namespace could correspond to the 'any' in tSequence which is in its base of tExtensibleElements or from the 'any' which is one of the possible choices for activity. As I mentioned before one straightforward fix that is fairly minimal and works is to wrap the 'any' in tExtensibleElements in an 'CDLExtension' element (or some such name of your liking) as below (slightly more compact version than my original attempt. <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" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence minOccurs="0" maxOccurs="unbounded"> <any processContents="lax"/> </sequence> </complexType> </element> </sequence> <anyAttribute namespace="##other" processContents="lax"/> </complexType> 2) By the way the second problem I pointed out with the full example in section 6.2.3 does not exist. Due to a quirk of 'cut and paste' in Word I had included a version of the example that had been deleted (by Charlton)! Will need to clean up the Word version at some point! The example checks out against my revised schema but the package start tag should really look something like as follows to help validators find the schema: <package xmlns:xsi=" <http://www.w3.org/2001/XMLSchema-instance> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" <http://www.w3.org/2005/08/ws-chor/cdl> http://www.w3.org/2005/08/ws-chor/cdl <http://www.w3.org/2005/08/ws-chor/cdl.xsd> http://www.w3.org/2005/08/ws-chor/cdl.xsd" xmlns:tns=" <http://www.example.com/ConsumerRetailerChoreographysample> http://www.example.com/ConsumerRetailerChoreographysample" xmlns:cdl=" <http://www.w3.org/2005/08/ws-chor/cdl> http://www.w3.org/2005/08/ws-chor/cdl" xmlns:rns=" <http://www.example.com/ConsumerRetailerChoreographyIFsample> http://www.example.com/ConsumerRetailerChoreographyIFsample" xmlns:xsd=" <http://www.w3.org/2001/XMLSchema> http://www.w3.org/2001/XMLSchema" xmlns=" <http://www.w3.org/2005/08/ws-chor/cdl> http://www.w3.org/2005/08/ws-chor/cdl" targetNamespace=" <http://www.example.com/ConsumerRetailerChoreographysample> http://www.example.com/ConsumerRetailerChoreographysample" name="ConsumerRetailerChoreography" version="1.0"> 3) The above does not actually work at present as there does not seem to be anything at http://www.w3.org/2005/08/ws-chor/cdl.xsd I wonder if the schema could be put up either at this URL or some other so that checks can be done (and this reference made correct or corrected in the document). 4) Again in the example in 6.2.3 the cdl: prefix seems to be redundant. Removing the line xmlns:cdl=" <http://www.w3.org/2005/08/ws-chor/cdl> http://www.w3.org/2005/08/ws-chor/cdl" and replace "cdl:" with nothing through the remainder of the example works equally well and simplifies the example a little. 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) -----Original Message----- From: Nickolas Kavantzas [mailto:nickolas.kavantzas@oracle.com] Sent: 16 September 2005 03:28 To: Tony Fletcher Cc: public-ws-chor@w3.org Subject: Re: Checking the CDL schema What exactly XMLSpy gives you as an error? I've just run 'Check Well Formedness' and 'Validate' under the XML tab on this schema and things are OK. -- Nick ----- Original Message ----- From: Tony Fletcher <mailto:tony_fletcher@btopenworld.com> To: public-ws-chor@w3.org Sent: Thursday, September 15, 2005 6:01 PM Subject: 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 Saturday, 17 September 2005 12:12:12 UTC