Didn't get any response on this the first time, perhaps to be slightly more
clear, when parsing:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en">

<head>
<title>A</title>
</head>

<body>A</body>
</html>

my entity resolver will receive calls to resolve:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
xhtml-lat1.ent
xhtml-symbol.ent
...

For the subsequent requests, I need these to resolve to:

http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent
http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent

etc.

Without being given access to the base URI, there are situations under which
this is impossible to resolve correctly.  I would therefore like to change
the EntityResolver to pass the base URI in.  DOMEntityResolver includes the
base URI:

class DOMEntityResolver {
virtual DOMInputSource *�
resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId,
const XMLCh *const baseURI)=0;
}

however the default entity resolver is declared as:

class EntityResolver {
virtual InputSource *�
resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId)=0;
}
�
I would make these situations consistent, and pass the baseURI parameter to
the default entity resolver.  Objections/comments?

Thanks,

Mark

> -----Original Message-----
> From: Mark Weaver [mailto:[EMAIL PROTECTED]
> Sent: 22 March 2003 15:15
> To: Xerces-C-Dev
> Subject: EntityResolver doesn't receive the baseURI
>
>
> From an EntityResolver, I can't see anyway of getting the base
> URI of the URI that is passed in for resolution.  In some
> instances I can store it (e.g. I can do this for the document),
> but if the document references a DTD which has imports, then I
> can't sensibly resolve these.  Is this simply an oversight?  It
> looks like a reasonably simple change to make, so I am happy to
> do this unless I've missed some other way of getting the
> information I need.
>
> Thanks,
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to