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 Tim Cronin <ti...@13-colonies.com> on 2003/06/11 22:56:48 UTC

RE: Problem with xml schema

see http://xml.apache.org/xerces2-j/faq-dom.html#faq-4

for better information...
it's xalan but it also relates to xerces as well
see http://xml.apache.org/xalan-j/faq.html#faq-N100CB

>  -----Original Message-----
> From: 	SHAY [mailto:shayb@rafael.co.il] 
> Sent:	Wednesday, June 11, 2003 4:27 PM
> To:	xerces-j-user@xml.apache.org
> Subject:	Problem with xml schema
> 
> Hello,
> 
> I’m encountering a problem in parsing an XML document using the J2SE 1.4
> DocumentBuilderFactory (Which should support JAXP 1.2).
> Background:
> I have created a well-formed XML document that is validated successfully
> against a W3C Schema (Located on the same machine). Successful validation
> is performed by the XML processor of Internet Explorer. So far so good…
> But, when I try to parse the document using the factory of J2SE 1.4 (JAXP
> 1.2 compatible), the ErrorHandler reports that each element (Starting from
> the root) is not declared. For some reason the parser cannot relate the
> schema to the instance document.
> The instance document is o.k. for sure, so how can I resolve this problem?
> 
> Thanks
> Shay.
> 
> 
>  << File: ATT07751.txt >> 

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


Re: Problem with xml schema

Posted by "K. Venugopal" <k....@sun.com>.
Hi SHAY ,

Also set the below mentioned properties.

        dbf.setNamespaceAware(true);      
        dbf.setAttribute(
        "http://java.sun.com/xml/jaxp/properties/schemaLanguage",
        "http://www.w3.org/2001/XMLSchema");


Regards
venu



Tim Cronin wrote:

>see http://xml.apache.org/xerces2-j/faq-dom.html#faq-4
>
>for better information...
>it's xalan but it also relates to xerces as well
>see http://xml.apache.org/xalan-j/faq.html#faq-N100CB
>
>  
>
>> -----Original Message-----
>>From: 	SHAY [mailto:shayb@rafael.co.il] 
>>Sent:	Wednesday, June 11, 2003 4:27 PM
>>To:	xerces-j-user@xml.apache.org
>>Subject:	Problem with xml schema
>>
>>Hello,
>>
>>I’m encountering a problem in parsing an XML document using the J2SE 1.4
>>DocumentBuilderFactory (Which should support JAXP 1.2).
>>Background:
>>I have created a well-formed XML document that is validated successfully
>>against a W3C Schema (Located on the same machine). Successful validation
>>is performed by the XML processor of Internet Explorer. So far so good…
>>But, when I try to parse the document using the factory of J2SE 1.4 (JAXP
>>1.2 compatible), the ErrorHandler reports that each element (Starting from
>>the root) is not declared. For some reason the parser cannot relate the
>>schema to the instance document.
>>The instance document is o.k. for sure, so how can I resolve this problem?
>>
>>Thanks
>>Shay.
>>
>>
>> << File: ATT07751.txt >> 
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>
>  
>