W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2004

Re: DOCTYPE, ENTITY in Schema instance doc

From: George Cristian Bina <george@sync.ro>
Date: Fri, 9 Jan 2004 21:59:03 +0200
Message-ID: <009c01c3d6eb$091251c0$41409cd9@notebook>
To: "Wyatt Barton" <hiddenharvest@yahoo.com>, <xmlschema-dev@w3.org>

You can use the http://java.sun.com/xml/jaxp/properties/schemaLanguage
property to instruct the parser to validate against the XML schema only. See
http://java.sun.com/xml/jaxp/change-requests-11.html for details.

Best Regards,
 George
-------------------------------------------------------
George Cristian Bina mailto:george@oxygenxml.com
<oXygen/> XML Editor - http://www.oxygenxml.com/


----- Original Message -----
From: "Wyatt Barton" <hiddenharvest@yahoo.com>
To: <xmlschema-dev@w3.org>
Sent: Friday, January 09, 2004 5:59 PM
Subject: 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 15:02:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:41 GMT