You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Murray Cumming <mu...@usa.net> on 2001/03/21 00:11:57 UTC

Re: [RE: DTD installation]

Dean Roddey <dr...@portal.com> wrote:
> 1. Wherever you said it would be in the XML files that use it, which can be
> either a fully qualified path or something relative to the document itself.
> 
> 2. Anywhere you want, and use PUBLIC ids in your XML files. Then use an
> entity resolver to point the parser at the actual files at runtime.
> 
> 3. Anywhere you want, and use SYSTEM ids in your XML files. Then use an
> entity resolver to point the parser at the actual files at runtime.

1. is no good here because the XML document is the application's document
(e.g. a Word doc) and the document may be moved to a different directory or to
a different computer which has the app installed somewhere else.

I'm not sure what the difference between 2 and 3 is, but this seems to mean
that I need to hardcode the DTD install path at compile time. Have I
understood this correctly?

Murray Cumming
murrayc@usa.net
www.murrayc.com

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: [RE: DTD installation]

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Murray Cumming" <mu...@usa.net> writes:

> Dean Roddey <dr...@portal.com> wrote:
> > 2. Anywhere you want, and use PUBLIC ids in your XML files. Then use an
> > entity resolver to point the parser at the actual files at runtime.
> > 
> > 3. Anywhere you want, and use SYSTEM ids in your XML files. Then use an
> > entity resolver to point the parser at the actual files at runtime.
> 
> I'm not sure what the difference between 2 and 3 is, but this seems to mean
> that I need to hardcode the DTD install path at compile time. Have I
> understood this correctly?

No, check out the API docs for the EntityResolver class:

http://xml.apache.org/xerces-c/apiDocs/class_EntityResolver.html

If you're using a SAX parser, it's a method you can use to resolve
external ENTITIES (either PUBLIC or SYSTEM). 

One question I have is why is this only in the SAX interface, what
about DOM?

jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org