You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Mi...@aigtrading.com on 2002/08/02 18:08:53 UTC

Xerces XML Schema problem

Hello,

I tried to research this question on the archives but they have been
unavailable for 2 days with disk problems.

I have a W3C schema that validates using at least 2 validity checkers, but
"fails" under Xerces 2.0.2.  Browsing Google groups, I have the impression
that as recently as mid-July 2002 there was an Xerces problem ("bug"?)
whereby it had/has problems reading the Schema of Schemas from W3C, and
therefore is unable to validate my schema, because it cannot get that far.

I have tried two things:

(1) I ran the Apache-supplied Counter.java app against my schema, in which
case I get the following error (I am sending only the first part of a stack
trace):

java <-cp long-list-omitted> Counter -n -np -v -s -f c:\dev\tgML.xsd

[Error] tgML.xsd:2:226: cvc-elt.1: Cannot find the declaration of element
'xs:schema'.

Output:
      c:\tibco\bpm\tgML.xsd: 1552 ms (1328 elems, 2055 attrs, 0 spaces,
6954 chars)

(2) I ran my own application written against Xerces 2.0.2, and using
various flag combinations, which also generated an error, but a different
one:

java <-cp long-list-omitted> com.aigi.bpm.XercesValidator c:\dev\tgML.xsd

org.xml.sax.SAXParseException: st-props-correct.4.1: The type definition is
not a valid restriction with repect to the base type 'xs:anySimpleType'.

Output:
      <none>


I have several questions.

(1)  Is my inference from Google threads correct in that there is a
problem/bug in Xerces whereby it "chokes" on the W3C Schema of Schemas, and
thus is unable to validate a proprietary XML Schema?  If so, is there any
known time framework within which to expect a fix?

(2)  Is there any documentation with regard to the Xerces error-messages,
so as to be able to interpret them for debugging purposes?  Or perhaps a
queryable database within which to look them up?

(3)  Are there any known workarounds for this problem?  I'm not really
familiar with the Xerces extensions but I have seen references to grammars
and other things, and I wonder if they can be used instead of the usual
approach of referencing the SOS inside one's own schema?




 -------------------------------------------------------------------------- 
 Important:  This electronic mail message and any attached files contain    
 information intended for the exclusive use of the individual or entity to  
 whom it is addressed and may contain information that is proprietary,      
 privileged, confidential and/or exempt from disclosure under applicable    
 law.  If you are not the intended recipient, you are hereby notified that  
 any viewing, dissemination, distribution or copying of this communication  
 may be subject to legal restriction or sanction.  Please notify us         
 immediately of any unintended recipients and delete the original message   
 without making any copies.                                                 
 -------------------------------------------------------------------------- 





---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Xerces XML Schema problem

Posted by Eddie Robertsson <er...@allette.com.au>.
Hi Michael,

>I have a W3C schema that validates using at least 2 validity checkers, but
>"fails" under Xerces 2.0.2.  Browsing Google groups, I have the impression
>that as recently as mid-July 2002 there was an Xerces problem ("bug"?)
>whereby it had/has problems reading the Schema of Schemas from W3C, and
>therefore is unable to validate my schema, because it cannot get that far.
>
<snip/>

>(1)  Is my inference from Google threads correct in that there is a
>problem/bug in Xerces whereby it "chokes" on the W3C Schema of Schemas, and
>thus is unable to validate a proprietary XML Schema?  If so, is there any
>known time framework within which to expect a fix?
>
Yes, you are correct. Xerces does have some bugs when it comes to 
validating a schema against the SFS. I know they fixed one issue between 
2.0.1 and 2.0.2 so the W3C XML Schema validation is steadily improving. 
Hopefully it won't be too long until all these issues have been fixed. 
AFAIK there are only two problems left in 2.0.2 with regards to SFS 
validation:

1) Being able to use the xs:anySimpleType in the SFS. It was recently 
decided by the W3C that schema validators should treat the SFS as a 
special case and allow simple types to derive from the xs:anySimpleType.

2) Allow facets on xs:anySimpleType. These two problems are highly 
coupled so when 1) is fixed 2) will probably be fixed as well.

>(2)  Is there any documentation with regard to the Xerces error-messages,
>so as to be able to interpret them for debugging purposes?  Or perhaps a
>queryable database within which to look them up?
>
Don't know...

>(3)  Are there any known workarounds for this problem?  I'm not really
>familiar with the Xerces extensions but I have seen references to grammars
>and other things, and I wonder if they can be used instead of the usual
>approach of referencing the SOS inside one's own schema?
>
You can always modify the SFS and remove the parts that Xerces can't 
handle. In 2.0.2 I think this is simply an issue of removing all the 
simple types that derive from xs:anySimpleType.

Cheers,
/Eddie

>
>
>
>
> -------------------------------------------------------------------------- 
> Important:  This electronic mail message and any attached files contain    
> information intended for the exclusive use of the individual or entity to  
> whom it is addressed and may contain information that is proprietary,      
> privileged, confidential and/or exempt from disclosure under applicable    
> law.  If you are not the intended recipient, you are hereby notified that  
> any viewing, dissemination, distribution or copying of this communication  
> may be subject to legal restriction or sanction.  Please notify us         
> immediately of any unintended recipients and delete the original message   
> without making any copies.                                                 
> -------------------------------------------------------------------------- 
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org