[jdom-interest] More Schema Validation

John Muhlestein jmuhlestein at i-link.net
Thu Jun 14 11:17:17 PDT 2001


I am in the process of converting xml validation from DTD's to Schema and I
am coming up with an error which has me stumped.

XML:

<?xml version="1.0" standalone="yes" ?>
<b2b xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="whlsl3.xsd">
<!--lots-o-content-->...
</b2b>

XMLSchema:

<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns:xsd="http:/www.w3.org/2001/XMLSchema">

<xsd:element name="b2b">
  <xsd:complexType>
    <xsd:sequence>
      <!--more definition--> ...
    </xsd:sequence>
  </xsd:complexType>
</xsd:element>

ERROR:

**Parsing Error**
  Line: 2
  URI: .../whlsl3.xml
  Message: Element type "b2b" must be declared
Error in parsing: Error encountered

I have actually tried this with the code from Brett's book for
SAXParserDemo.java before running it through JDOM.  Any suggestions



More information about the jdom-interest mailing list