Hi Talha,
The class dom.Counter is meant to process xml files, not schema documents.
Try making a valid instance document of blah.xsd and passing that as an
argument to dom.Counter -- it will report any errors with blah.xsd, too.
If you just want to validate the schema, you could use dom.ASBuilder, but
that's deprecated so I wouldn't suggest using it for anything important.
I'm not sure what the non-deprecated way to validate schemas is.
Cheers,
Peter McCracken/Toronto/IBM
Talha Aftab
<[EMAIL PROTECTED] To: [EMAIL PROTECTED]
om> cc:
Subject: Namespaces
06/18/2003 10:14
PM
Please respond to
xerces-j-user
We are having a problem validating a schema that
includes another schema. We are having problems with
namespaces in general.
We are not able to validate the following xml schema
using Xerces 2.4.0:
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v5 rel. 3(http://www.xmlspy.com) by R Chamb (Home)
-->
<!--Generated by Turbo XML 2.3.1.100. Conforms to w3c
http://www.w3.org/2001/XMLSchema-->
<xsd:schema
targetNamespace="http://www.LegalXML.org/ns/courtdocument20b"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.LegalXML.org/ns/courtdocument20b"
xml:jxdd="http://www.it.ojp.gov/jxdd/prerelease/3.0.0.0"
version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/XMLSchema
c:\june1\XMLSchema.xsd" >
<xsd:import
namespace="http://www.it.ojp.gov/jxdd/prerelease/3.0.0.0"
schemaLocation="c:\june1\jxdds.xsd"/>
<xsd:group name="DocumentBody">
<xsd:annotation>
<xsd:documentation>The
"DocumentBody" element
group is a reusable "module" that defines the elements
and content models for marking up the text contents of
the body of a court document. </xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:choice maxOccurs="unbounded">
<xsd:element ref
="ParagraphGroup"/>
<xsd:element ref
="Paragraph"/>
</xsd:choice>
<xsd:element ref="MachineData"
minOccurs="0"/>
</xsd:sequence>
</xsd:group>
</xsd:schema>
The following is the error message:
C:\june1>java dom.Counter -n -v -s blah.xsd
[Error] blah.xsd:6:18: cvc-elt.1: Cannot find the
declaration of element 'xsd:sc
hema'.
blah.xsd: 681;30;0 ms (10 elems, 13 attrs, 0 spaces,
223 chars)
We think that there is some problem with the
namespaces!
Thanks.
Talha
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]