You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Matthias Jung <ma...@xtradyne.com> on 2004/01/07 14:19:45 UTC

Problem with XMLSchema validation

Hi all,

I'd like to validate an XML document against XMLSchema containing xsi 
type informations defined by XML Schema version 1999.
For example please see the XML at the end of this message.

Xerces does not realize the namespace "http://www.w3.org/1999/XMLSchema" 
and reports validation errors.
I also tried to preparse and use XMLSchema1999.xsd (and further 
imported/included schema definitions), but did not get to preparse.


Are the known issues with XMLSchema 1999 validation?
Or is there any way or workaround to do schema validation with this kind 
of XML?


Thanks in advance

Matthias



Here the XML/SOAP:

<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
         xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
         xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
         xmlns:xsd="http://www.w3.org/1999/XMLSchema">
     <SOAP-ENV:Body>
         <ns1:getAllSOAPServices mlns:ns1="urn:xmethodsServicesManager">
	    <arg1 xsi:type="xsd:string">test</arg1>
	</ns1:getAllSOAPServices>
     </SOAP-ENV:Body>
</SOAP-ENV:Envelope>



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


Re: Problem with XMLSchema validation

Posted by Michael Glavassevich <mr...@apache.org>.
Hi Matthias,

The 1999 namespace is for earlier drafts of XML Schema. Xerces supports
the W3C recommendation [1] of XML Schema only.

[1] http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/

On Wed, 7 Jan 2004, Matthias Jung wrote:

> Are the known issues with XMLSchema 1999 validation?
> Or is there any way or workaround to do schema validation with this kind
> of XML?
>
>
> Thanks in advance
>
> Matthias

---------------------------
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

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


Re: Problem with XMLSchema validation

Posted by Matthias Jung <ma...@xtradyne.com>.
Hi Gareth,

yes I have (preparsed) a Schema definition to validate the XML example 
against. Schema validation works fine if the XML instance uses xsi type 
definitions from 2001 Schema. Only XML instances using 1999 schema fail.
Unfortunately there are some SOAP platforms like SOAP-Lite or 
BEAWL6.0(!) creating XML referencing to the old schema definitions.

If Xerces does only support W3C recommendation it is clear why the 
validation fails. I guessed that but hoped for a undocumented option or 
workaround.

Both, thanks for the quick reply

Matthias



Gareth Reakes wrote:
> Hi,
> 
> 
>>I'd like to validate an XML document against XMLSchema containing xsi 
>>type informations defined by XML Schema version 1999.
> 
> 
> I don't see an actual XML Schema here. Are you using an entity resolver 
> of some kind or do you want to validate things without an actual schema 
> document?
> 
> 


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


Re: Problem with XMLSchema validation

Posted by Gareth Reakes <ga...@decisionsoft.com>.
Hi,

> I'd like to validate an XML document against XMLSchema containing xsi 
> type informations defined by XML Schema version 1999.

I don't see an actual XML Schema here. Are you using an entity resolver 
of some kind or do you want to validate things without an actual schema 
document?


-- 
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




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