Your event.xsd file contains a prefix (sen:) that is
not mapped to any URI. The parser will not be able to
resolve the prefix to a URI, and you will get errors of
undefined declarations. I have modified your event.xsd
file and ran it against the latest nightly build
and event.xml was parsed successfully by the parser.
I would recommend that you download the latest release
(Xerces 1.5.1) which contained some memory leaks/bug fixes.
Regards,
Khaled
Chris wrote:
I have included the schema and xml file that I am using in the
validation. I have found that there is a problem when trying to validate
the xml when a schema type references itself, like the CategoryType does.
I did not find any references in the Schema lang. that forbids me doing
this. So, I figured I would send it to you guys and see if you know about
this problem and figure out if it is my problem or yours!Here is the output I get when I run the command: SAX2Print event.xml
<?xml version="1.0" encoding="LATIN1"?>
<event xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="event.xsd">
<category name="stockmarket">
<subcategory name="stocks">Error at file /corliss/personal/homework/thesis/event.xml, line 6, char 44
Message: Unknown element 'subcategory'Error at file /corliss/personal/homework/thesis/event.xml, line 6, char 44
Message: Attribute '{}name' is not declared for element 'subcategory'
<subcategory name="technology">Error at file /corliss/personal/homework/thesis/event.xml, line 7, char 54
Message: Unknown element 'attribute'Error at file /corliss/personal/homework/thesis/event.xml, line 7, char 54
Message: Attribute '{}name' is not declared for element 'attribute'Error at file /corliss/personal/homework/thesis/event.xml, line 7, char 54
Message: Attribute '{}type' is not declared for element 'attribute'
<attribute name="name" type="string">STK</attribute>Error at file /corliss/personal/homework/thesis/event.xml, line 8, char 38
Message: Unknown element 'record'Error at file /corliss/personal/homework/thesis/event.xml, line 8, char 38
Message: Attribute '{}name' is not declared for element 'record'
<record name="price">Error at file /corliss/personal/homework/thesis/event.xml, line 9, char 58
Message: Unknown element 'attribute'Fatal Error at file /corliss/personal/homework/thesis/event.xml, line 9,
char 58 Message: The attribute 'name' is already used in element
'attribute'If I take out the subcategory tags in the xml then everything works fine.
Thanks for any help,
Chris Corliss------------------------------------------------------------------------
Name: event.xsd
event.xsd Type: Plain Text (TEXT/PLAIN)
Encoding: quoted-printableName: event.xml
event.xml Type: Plain Text (TEXT/PLAIN)
Encoding: quoted-printable------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'> <xs:annotation> <xs:documentation xml:lang="en"> Event for Siena Event Notifcation System. Copyright 2001 Unviersity of Colorado. All rights reserved. </xs:documentation> </xs:annotation> <xs:element name="event"> <xs:complexType> <xs:sequence> <xs:element name="category" type="CategoryType"/> <xs:element name="timestamp" type="TimeStampType" minOccurs='0'/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="CategoryType"> <xs:sequence> <xs:element name="subcategory" type="SubCategoryType" minOccurs='0' maxOccurs="unbounded"/> <xs:element name="attribute" type="attribute" minOccurs='0' maxOccurs="unbounded"/> <xs:element name="record" type="record" minOccurs='0' maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xs:string"/> </xs:complexType> <xs:complexType name="SubCategoryType"> <xs:sequence> <xs:element name="subcategory" type="SubCategoryType" minOccurs='0' maxOccurs="unbounded"/> <xs:element name="attribute" type="attribute" minOccurs='0' maxOccurs="unbounded"/> <xs:element name="record" type="record" minOccurs='0' maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xs:string"/> </xs:complexType> <xs:complexType name="attribute"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:string"/> <xs:attribute name="type" type="AttributeTypes"/> </xs:extension> </xs:simpleContent> </xs:complexType> <xs:complexType name="record"> <xs:sequence> <xs:element name="attribute" type="attribute" minOccurs='0' maxOccurs="unbounded"/> <xs:element name="record" type="record" minOccurs='0' maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xs:string"/> </xs:complexType> <xs:complexType name="TimeStampType"> <xs:sequence> <xs:element name="time" type="xs:string"/> <xs:element name="day" type="xs:integer"/> <xs:element name="month" type="Months"/> <xs:element name="year" type="xs:integer"/> </xs:sequence> </xs:complexType> <xs:simpleType name="AttributeTypes"> <xs:restriction base="xs:string"> <xs:enumeration value="int"/> <xs:enumeration value="string"/> <xs:enumeration value="char"/> <xs:enumeration value="float"/> <xs:enumeration value="boolean"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="Months"> <xs:restriction base="xs:string"> <xs:enumeration value="Janurary"/> <xs:enumeration value="Feburary"/> <xs:enumeration value="March"/> <xs:enumeration value="April"/> <xs:enumeration value="May"/> <xs:enumeration value="June"/> <xs:enumeration value="July"/> <xs:enumeration value="August"/> <xs:enumeration value="September"/> <xs:enumeration value="October"/> <xs:enumeration value="November"/> <xs:enumeration value="December"/> </xs:restriction> </xs:simpleType> </xs:schema>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
