You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Michael Rafael Glavassevich <mr...@engmail.uwaterloo.ca> on 2003/05/21 04:58:18 UTC
Re: SAX Parser & DOCTYPE statement
Hello Anthony,
If you specify a public ID in the doctype declaration, you also need to
specify a system ID. Have a look
at the XML rec: http://www.w3.org/TR/REC-xml#NT-ExternalID. You can make
the system ID an empty string. It just cannot be null. Keep in mind that
the system ID is a URI, and thus it doesn't necessarily have to point to
the location of your DTD. It is just an identifier. You can invent your
own scheme such as jar://my.dtd, and register your own EntityResolver
which understands how to read 'jar' URIs. So if that serves your purpose,
you don't need a public ID.
Hope that helps.
-----------------------------
Michael Glavassevich
mrglavas@engmail.uwaterloo.ca
4B Computer Engineering
University of Waterloo
On Tue, 20 May 2003, Anthony Rabaa wrote:
> Hello,
>
> Is it possible to have only the public identifier specified in the
> DOCTYPE statement? My goal is to use the public identifier to load the
> DTD from a JAR so having the SYSTEM identifier means using a dummy DTD.
> I'm using the SAXParser object to validate the documents.
> --
> Anthony Rabaa
> Software Developer & Network Administrator
> AMCon Research Inc.
> Ottawa, Ontario, Canada
> http://www.amconresearch.net
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org For
> additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org