[jdom-interest] grammar not found

Dushyandan Kanagaratnam dushyk at securepay.com.au
Mon Jul 2 19:13:39 PDT 2001


Hi all,

I am a Java developer who is new to XML. I constructed a simple XML and XSD
(Schema) to test with JDOM and XML Parser. I am using Xerces 1.4.1 XML
parser from apache (which is supposed to support XML Schema).

XML:

<?xml version="1.0"?>

<DataValidationRules xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"
		     xmlns="http://www.securepay.com.au"
                     xsi:schemaLocation="http://www.securepay.com.au
ValidationRules.xsd">

XML Test
</DataValidationRules>

XSD:

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3c.org/2001/XMLSchema"
	    targetNamespace="http://www.jdom.org"
            xmlns="http://www.jdom.org"
            elementFormDefault="qualified">

<xsd:element name="DataValidationRules" type="string" />
</xsd:schema>

when the document is parsed I am following 2 things happen:
1. I get 'http://www.securepay.com.au grammar not found' message.
2. An Exception org.jdom.JDOMException: Error on line 5 of document
file:/D:/Software/EBPSystem/EBPS_BSP/ValidationRules1.xml: Element type
"DataValidationRules" must be declared is thrown.

Regards,

-Dushy-




More information about the jdom-interest mailing list