- From: Tom Preston <tpreston@amadeusboston.com>
- Date: Wed, 5 Dec 2001 16:59:37 -0500
- To: "XMLSchema (E-mail)" <xmlschema-dev@w3.org>
1) Xerces-j gives this error for docs that XSV thinks are fine:
Error: org.xml.sax.SAXParseException: Document root element "htmlEditor",
must
match DOCTYPE root "null".
Error: org.xml.sax.SAXParseException: Document is invalid: no grammar
found.
What is this problem?
Here is the doc set (which XSV thinks is fine):
XML IS:
-----------
<htmlEditor
xmlns="http://www.emilygraham.com/java/other/Editor"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.emilygraham.com/java/other/Editor
http://www.emilygraham.com/java/other/editor.xsd">
<updateTime></updateTime>
<fields>
<field columnName="nickname">
<shortDesc>Short Desc</shortDesc>
<htmlType name="select">
<name>firstName</name>
<value>lastName</value>
</htmlType>
<allowNull>adfsa</allowNull>
<defaultVal>Blueberry</defaultVal>
</field>
</fields>
</htmlEditor>
----------
XSD IS:
----------
<schema targetNamespace="http://www.emilygraham.com/java/other/Editor"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:e="http://www.emilygraham.com/java/other/Editor"
elementFormDefault="qualified">
<annotation>
<documentation xml:lang="en">
Editor document definition defines an html based editor
</documentation>
</annotation>
<element name="htmlEditor" type="e:HtmlEditorType"/>
<element name="updateTime" type="dateTime"/>
<complexType name="HtmlEditorType">
<sequence>
<element ref="e:updateTime" minOccurs="1" maxOccurs="1" />
<element name="fields" type="e:Fields" minOccurs="1" maxOccurs="1" />
</sequence>
</complexType>
<complexType name="Fields">
<sequence>
<element name="field" minOccurs="1" maxOccurs="unbounded">
<complexType>
<sequence>
<element name="shortDesc" type="string" minOccurs="1"
maxOccurs="1"/>
<element name="htmlType" type="e:HtmlTypeType" minOccurs="1"
maxOccurs="1"/>
<element name="allowNull" type="boolean" minOccurs="1"
maxOccurs="1" />
<element name="defaultVal" type="string"/>
</sequence>
<attribute name="columnName" type="string" use="required"/>
</complexType>
</element>
</sequence>
</complexType>
<complexType name="HtmlTypeType">
<sequence>
<element name="name" type="string" />
<element name="value" type="string" />
</sequence>
<attribute name="name" type="e:HtmlNameType" use="required"/>
</complexType>
<simpleType name="HtmlNameType">
<restriction base="NMTOKEN">
<enumeration value="select"/>
<enumeration value="text"/>
</restriction>
</simpleType>
</schema>
------------
2) When i attept to force external validation with this line of code:
parser.setProperty
("http://apache.org/xml/properties/schema/external-schemaLocation",
"http://www.emilygraham.com/java/other/editor.xsd");
I get this exception:
org.xml.sax.SAXNotRecognizedException:
http://apache.org/xml/properties/schema/external-schemaLocation
Does anyone know why this would happen?
--------
3) Does anyone know where I can get a set of very simple documents that will
pass MANY different validations. Just one example would be nice.
Thanks
Tom
Received on Wednesday, 5 December 2001 16:59:25 UTC