|
Bernie,
instead of the !DOCTYPE line you must specify the
schema file in the root tag of your xml document file like
this:
<YOURROOTTAG
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:NamespaceSchemaLocation='dtd/book.xsd'>
cheers,
Peter
I'm
just trying to learn that myself!
I'll
post if I get to it soon enough.
Any
other people care to shed some light on this?
Rob
Thanks Rob.
Is it possible to
use a schema instead of a dtd? How would I specify to use a schema in this
xml?
Thanks
Bernie
-----Original
Message----- From: Rob
Finneran [mailto:[EMAIL PROTECTED] Sent: Wednesday,
February 27, 2002 10:06
PM To:
[EMAIL PROTECTED] Subject: RE: xerces 2.0.0 DOCTYPE root
"null" error
<?xml
version="1.0" standalone="no"?> <!DOCTYPE bk:book SYSTEM
"dtd/book.dtd">
-----Original
Message----- From:
Bernhard Lenz [mailto:[EMAIL PROTECTED] Sent: Wednesday,
February 27, 2002 6:48
PM To:
[EMAIL PROTECTED] Subject: xerces 2.0.0 DOCTYPE root
"null" error
I’m trying to
parse the following xml using xerces 2.0.0 with validation and
namespaceaware turned on.
<?xml version="1.0"?>
<!-- both namespace prefixes are available throughout -->
<bk:book xmlns:bk='urn:loc.gov:books'
xmlns:isbn='urn:ISBN:0-395-36341-6'>
<bk:title>Cheaper by the Dozen</bk:title>
<isbn:number>1568491379</isbn:number>
</bk:book>
However I’m
getting the following error:
Document root
element "html", must match DOCTYPE root "null".
Does anybody know
how to handle this error?
Thanks
Bernie
|