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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl message

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


Subject: Re: Fw: UBL validation


[jon.bosak@sun.com:]

| Well, this is certainly strange.  We get no errors from XML Spy,
| MSV, or SQC, but we get 41 errors from XSV.
| 
| Can any of our XSD gurus help us out with this?

The answer is revealed in this correspondence between Norm Walsh
and Kohsuke Kawaguchi (thanks, guys!):

/=================================================================
| Date: Wed, 07 Apr 2004 13:30:55 -0700
| From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi@Sun.COM>
| Subject: Re: UBL validation puzzle
| To: Norman Walsh <Norman.Walsh@Sun.COM>, Jon.Bosak@Sun.COM
| 
| > With a couple of minutes of exploration, I do find it odd that
| > UBL-CoreComponentTypes-1.0.xsd includes the annotation:
| > 
| >   <xsd:complexType name="AmountType">
| >     <xsd:annotation>
| >       <xsd:documentation>
| >         <ccts:Component>
| >           <ccts:CategoryCode>CCT</ccts:CategoryCode>
| >           <ccts:DictionaryEntryName>Amount. Type</ccts:DictionaryEntryName>
| >           ...
| > 
| > where ccts is bound to urn:oasis:names:tc:ubl:CoreComponentParameters:1:0
| > but UBL-CoreComponentParameters-1.0.xsd does not declare a CategoryCode
| > element. In fact 
| > 
| >   $ grep -l CategoryCode */*.xsd
| >   common/UBL-CoreComponentTypes-1.0.xsd
| > 
| > suggests that CategoryCode isn't declared anywhere. Maybe MSV et. al. don't
| > attempt to validate annotations?
| 
| Those annotations are read when schemas are being parsed, and at that
| point no schema was introduced for the
| urn:oasis:names:tc:ubl:CoreComponentParameters:1:0 namespace (the URI
| for the ccts prefix.)
| 
| So I think a conforming schema processor should *not* report an error
| for this. elements like <ccts:Component> should be laxly validated.
| 
| BTW, I find it strange that <ccts:Component> is listed as
| <xs:documentation>, it seems to me that this is more suitable as a
| <xs:appinfo>.

[Note from the chair: We have already beaten this subject to
death, and I don't want to hear any more about it!]

| To properly check correctness of XML Schema, I really recommend
| using Xerces.  XML Spy, MSV, and XSV are by no means a conforming
| processor, and they should be used only to check if a document is
| correctly written (against a schema), not to check if a schema is
| correctly written.
| 
| I'll run it against Xerces and report the result.
| 
| regards,
| --
| Kohsuke Kawaguchi
| Sun Microsystems                   kohsuke.kawaguchi@sun.com
\=================================================================

Kohsuke subsequently reported that our current schemas are OK with
xerces.  So that's four against one.

Conclusion: Our current schemas are technically valid (because
conforming processors are supposed to use lax mode in validating
annotations), so there's nothing here that should slow down the
people who are building the UBL pieces dependent on finished
schemas.  That said, however, there does appear to be something
slightly wonky in the CoreComponentParameters module.

Norm's intuition leads him to suspect that an element name
previously used is not used now and the annotation was not
properly updated to reflect this.  My hunch based on Norm's
intuition is that this has something to do with the specification
of UBLAmountType in UBL-SpecialisedDatatypes-1.0.xsd.  If my hunch
is right, it will be because it stood on the shoulders of
giants. :-)

So: Let's proceed, but perhaps Tim and Stephen can take a look at
this...

Jon




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