DOCTYPE, ENTITY in Schema instance doc

Hi,
I apologize if this kind of question has already
been asked and answered. I've been unable to find
an explanation or example on the Web; my trial-and-
error experiments have failed. The basic problem is
that I must use a set of ENTITY character codepoint
definitions in a Schema instance document.

I'm in the process of migrating an app from DTD to
Schema. My four schema files validate okay with the
Xerces-J2 validation engine, and my sample instance
doc validates okay with XSV and Xerces *iff* I comment
out my DOCTYPE statement in the instance doc. I must,
however, use a file of Unicode Private Use Area
character entities in the instance doc (declaring
the characters as Schema elements is not a viable
option in this case).

In the main schema there is just one global element,
called "NeumesXML". My understanding is that this
element must be namespace-qualified in the instance
doc (I get a validation error otherwise). Therefore,
I am declaring in the instance doc the following,

<nxm:NeumesXML
xmlns:nxm="http://purl.oclc.org/NEUMES/ref/NeumesXML_main"
xmlns:nxw="http://purl.oclc.org/NEUMES/ref/NeumesXML_west"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://purl.oclc.org/NEUMES/ref/NeumesXML_main
http://purl.oclc.org/NEUMES/ref/NeumesXML_main.xsd
http://purl.oclc.org/NEUMES/ref/NeumesXML_west
http://purl.oclc.org/NEUMES/ref/NeumesXML_west.xsd"
>
... [instance data] ...
</nxm:NeumesXML>

Thus qualifying "NeumesXML", then, requires me also to
qualify "NeumesXML" in the DOCTYPE declaration that
precedes the "<nxm:NeumesXML ...>" tag, above (else
I get an error). And so, I have,

<!DOCTYPE nxm:NeumesXML [
<!ENTITY % NEUMES SYSTEM
"http://purl.oclc.org/NEUMES/ref/NEUMES_symbolic.xml">
%NEUMES;
]>

Unfortunately, this also generates errors, and I have
tried unsuccessfully to add clauses to the DOCTYPE
statement in order to make clear what "nxm:NeumesXML"
refers to. I hope someone will help me with this.

In case they're relevant, here follows some of the
declarations from the schema (which apparently are
causing *no* validity errors re the schema, per se).

<!DOCTYPE schema [
<!-- *********** NEUMES Unicode[tm] Codepoint
Declarations: *********** -->
<!ENTITY % NEUMES SYSTEM
"http://purl.oclc.org/NEUMES/ref/NEUMES_symbolic.xml">
%NEUMES;
]>
<xsd:schema
targetNamespace="http://purl.oclc.org/NEUMES/ref/NeumesXML_main"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.oclc.org/NEUMES/ref/NeumesXML_main"
elementFormDefault="unqualified"
attributeFormDefault="unqualified"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://purl.oclc.org/NEUMES/ref/NeumesXML_obd
http://purl.oclc.org/NEUMES/ref/NeumesXML_obd.xsd"
xmlns:obd="http://purl.oclc.org/NEUMES/ref/NeumesXML_obd">
<xsd:element name="NeumesXML">
...
</xsd:element>
...
</xsd:schema>

Many thanks in advance,
- L. Barton

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

Received on Friday, 9 January 2004 12:11:33 UTC