Re: XML Schema Validation

Thank you for your interest.

I think that the error is generated during the import of BaseTypes.xsd 
(the error message says this) not for the double inclusion.
Note that I' ve succesfully validated my XML file commenting every 
reference to apr4 and ca namespaces in RichiestaSAIA.xsd, so the fact 
that BaseTypes.xsd is included
more than once shouldn't be a problem.

In addtion to this using
- XML Spy (http://www.altova.com/)
- XML-Beans (http://xmlbeans.apache.org/)
everything works fine, my XML file is validated (with the uncommented 
xsd, the original ones).

My image attached could help.

Andrea Nucci


Michael Kay wrote:
> libxml2 seems to be objecting to the fact that BaseTypes.xsd is included
> more than once (into both RipostaMacroTypes.xsd and
> RichiestaMacroTypes.xsd). The schema spec is pretty vague in this kind of
> area, for reasonable reasons: if the two includes used different URIs, it
> would be hard for the processor to work out that they were actually two
> includes of the same file, and if they were different files, then they would
> contain conflicting definitions. But I would have expected any reasonable
> processor to allow this case. Raise it with the supplier.
>
> As it happens, Saxon hits a different problem with this schema. It objects
> incorrectly to
>
> 			<xs:enumeration value="3 ">
>
> on line 1748 of BaseTypes.xsd, saying that it violates maxLength="1". (It
> doesn't, in fact, because whiteSpace is set to collapse). Another bug bites
> the dust.
>
> Michael Kay
> http://www.saxonica.com/
>  
>
>   
>> -----Original Message-----
>> From: xmlschema-dev-request@w3.org 
>> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Andrea Nucci
>> Sent: 10 January 2007 12:42
>> To: xmlschema-dev@w3.org
>> Subject: XML Schema Validation
>>
>> I'm using the xml schema and the xml file (Nascita.xml) here attached.
>>
>> I've tried to validate the xml file using the W3C Schema Validator
>> (http://www.w3.org/2001/03/webdata/xsv) and libxml 2.6.26
>> (http://www.xmlsoft.org)
>>
>> The results are different:
>> - the W3C Schema Validator validates my file
>> - libxml2 validator returns "The schema document 
>> 'BaseTypes.xsd' cannot be imported, since it was already 
>> included or redefined"
>>
>> Anyone can help me to understand why this happens? And how to 
>> solve or avoid my problem...
>> Thank you in advance.
>>
>> --
>> Andrea Nucci
>> Ancitel S.p.A.
>>
>> Tel. 06.7887336
>> nucci@ancitel.it
>>
>> http://www.ancitel.it
>>
>>
>>     
>
>   


-- 
Andrea Nucci
Ancitel S.p.A.

Tel. 06.7887336
nucci@ancitel.it

http://www.ancitel.it

Received on Wednesday, 10 January 2007 16:02:07 UTC