[jdom-interest] Schema validation

Peter H.M. Jacobs peter.jacobs at corp.sun.com
Tue Jun 12 15:04:56 PDT 2001


Hello,

I just started with XML and seem to have problems validating my XML message.

Java file :

            parser = new
org.jdom.input.DOMBuilder("org.jdom.adapters.XercesDOMAdapter",true);

XML Instance :

<hercules:schedule
   xmlns:hercules="http://www.sun.com/iforce/hercules"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema"
   xsi:schemaLocation="http://www.sun.com/iforce/hercules
file:C:/development/hercules/com/sun/hercules/xml/Schedule.xsd">

XML Schema :

<xsd:schema targetNamespace="http://www.sun.com/iforce/hercules"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:hercules="http://www.sun.com/iforce/hercules">

Error :

org.jdom.JDOMException: Error in building from stream: Error on line 9 of
XML document: General Schema Error: Grammar with uri 2:
http://www.sun.com/iforce/hercules , can not found.

Is there anyone who can help me??

Regards,

Peter Jacobs











More information about the jdom-interest mailing list