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]
RE: [ebxml-dev] Possible error in ebXML MSG 2.0 xsd=?UTF-8?Q?schema=3F?=

The CAM toolset on SourceForge lets you do exactly that. 
Build a compatible schema sub-set compatible with the main schema - for use in WSDL and tooling.
Use the CAM editor to ingest the original schema - mark up those pieces you want to exclude - then have editor automatically compress the schema and generate the new XSD for you.   Then you can also build realistic test case XML examples that conform to your use model along with html documentation.
The tutorial and helpful resources are linked to here:
Enjoy, DW
-------- Original Message --------
Subject: RE: [ebxml-dev] Possible error in ebXML MSG 2.0 xsd schema?
From: Torsten Kirschner <torsten.kirschner@sandbox.no>
Date: Thu, October 02, 2008 4:27 am
To: Ebxml-dev <ebxml-dev@lists.ebxml.org>

In general it would be nice if OASIS XML schemas could be handled more easily with said XML-binding tools like JAXB or whatever it’s called in .NET etc.

From: Stephen Green [mailto:stephengreenubl@gmail.com]
Sent: 2. oktober 2008 10:23
To: Ebxml-dev
Subject: Fwd: [ebxml-dev] Possible error in ebXML MSG 2.0 xsd schema?



This clearly does look like an 'ambiguous', 'non-deterministic' error.


If the parser sees the optional elements preceding the 'any' extension point, how

is it to know whether what it is seeing is one of those elements (which it has to

parse/valldate strictly) or part of the lax 'any' (which it isn't supposed to parse/

validate strictly)? This would naturally require throwing the said error exception.

2008/10/2 Johannes Gustafsson <johannes@inexchange.se>


Hello and thanks for your reply.


I tried your link. However if I enable the "Check as complete schema" option I get another result. According to the help, this option is needed to check the Schema constraints.


Direct link: http://www.w3.org/2001/03/webdata/xsv?docAddrs=http%3A%2F%2Fwww.oasis-open.org%2Fcommittees%2Febxml-msg%2Fschema%2Fmsg-header-2_0.xsd&independent=on&style=xsl#


This is what I get:


Schema representation errors

Detected during instance validation


http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd:123:3: Invalid: non-deterministic content model for type None: {Wildcard: ##other, lax}/{http://www.w3.org/2000/09/xmldsig#%7D%3AReference






From: David RR Webber (XML) [mailto:david@drrw.info]
Sent: den 1 oktober 2008 19:05
To: Johannes Gustafsson
Cc: ebxml-dev@lists.ebxml.org
Subject: RE: [ebxml-dev] Possible error in ebXML MSG 2.0 xsd schema?




Microsoft .NET and Altova do certain things differently - and may share the same tooling since Altova is MS platform tool.


When I check with this:



Then I get report below.


Thanks, DW

Schema validating with XSV 3.1-1 of 2007/12/11 16:20:05

· Target: http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd
   (Real name: http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd
    Length: 10510 bytes
    Last Modified: Fri, 07 Jul 2006 17:26:57 GMT
    Server: Apache)

· docElt: {http://www.w3.org/2001/XMLSchema}schema

· Validation was strict, starting with type [Anonymous]

· The schema(s) used for schema-validation had no errors

· No schema-validity problems were found in the target



-------- Original Message --------
Subject: [ebxml-dev] Possible error in ebXML MSG 2.0 xsd schema?
From: "Johannes Gustafsson" <johannes@inexchange.se>
Date: Wed, October 01, 2008 10:52 am
To: <ebxml-dev@lists.ebxml.org>



I am trying to validate incoming soap-envelopes using .NET to see if they conform to this schema:




However, I get errors when trying to load the schema. I use this code to load and compile the schema (in C#):


      XmlSchemaSet schemaSet = new XmlSchemaSet();


      XmlReaderSettings settings = new XmlReaderSettings();

      settings.ProhibitDtd = false;


      schemaSet.Add(@"http://www.w3.org/2000/09/xmldsig", XmlReader.Create(@"http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd", settings));

      schemaSet.Add(@"http://www.w3.org/XML/1998/namespace", XmlReader.Create(@"http://www.w3.org/2001/03/xml.xsd", settings));

      schemaSet.Add(@"http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", @"http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd");




I get this error:


"Wildcard '##other' allows element 'http://www.w3.org/2000/09/xmldsig#:Reference', and causes the content model to become ambiguous. A content model must be formed such that during validation of an element information item sequence, the particle contained directly, indirectly or implicitly therein with which to attempt to validate each item in the sequence in turn can be uniquely determined without examining the content or attributes of that item, and without any information about the items in the remainder of the sequence."


To rule out a bug I .NET I also tried using Altova:s xml parser (http://www.altova.com/altovaxml.html) with the same result.


The problem lies in line 129 in msg-header-2_0.xsd:


           <!-- ACKNOWLEDGMENT, for use in soap:Header element -->

           <element name="Acknowledgment">



                                            <element ref="tns:Timestamp"/>

                                            <element ref="tns:RefToMessageId"/>

                                            <element ref="tns:From" minOccurs="0"/>

                                            <element ref="ds:Reference" minOccurs="0" maxOccurs="unbounded"/>

           >>>>>>>                          <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>


                                 <attributeGroup ref="tns:headerExtension.grp"/>

                                 <attribute ref="soap:actor"/>




The <any namespace="##other"> tag allows any other element with a namespace other than the target namespace (See http://www.w3.org/TR/xmlschema-0/#ref34). This should mean that the <element ref="ds:Reference"> is not needed since the <any> element includes it.


If I remove the <element ref="ds:Reference"> on line 128 the schema works.


Has anyone else come across this?





Stephen D. Green

SystML, http://www.systml.co.uk/
Tel: +44 (0) 117 9541606
Associate Director
Document Engineering Services

http://www.biblegateway.com/passage/?search=matthew+22:37 .. and voice

Stephen D. Green

SystML, http://www.systml.co.uk
Tel: +44 (0) 117 9541606
Associate Director
Document Engineering Services

http://www.biblegateway.com/passage/?search=matthew+22:37 .. and voice

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