RE: [xml] Ignore external subset



Hello,

-----Original Message-----
From: Daniel Veillard [mailto:veillard redhat com]
Sent: Thursday, October 23, 2003 6:08 PM
To: Keim, Markus
Cc: libxml2 mailing List (E-Mail)
Subject: Re: [xml] Ignore external subset


On Thu, Oct 23, 2003 at 04:11:50PM +0200, Keim, Markus wrote:
Hello all,

i want to parse memory blocks using "xmlParseDocument" with a
pre-build parser context (special I/O callbacks since we're using
an abstraction layer for all I/O and memory related tasks).
Obvious there is no base path for the documents, although 
they possibly
include relative references to external DTD subsets.
So i want to ignore the external subsets while parsing and 
validate the
documents subsequently after providing a base path.

  How can you expect to "validate" without fetching the external
subset if there is one ? I cannot understand such a requirement.

Hum, i *don't* want to validate while parsing.
On the contrary, i want to completely ignore the external subset,
even if it's present, just parse in the document.
Precise: The documents are contained in memory blocks that
are provided from our OS abstraction layer (therefore i
access them via an I/O parser context with read callbacks that
use APIs from that layer).
While parsing i *can't* determine a base path for that documents,
so, if "parseCtxt->loadsubset" is true (the default), the
parser complains about that he can't load the external subset
(and for sure he's right) and fails.
But i'm able to provide a base path after parsing (don't ask why,
it's a long and sad story...).
Using an own external entity loader, i want to validate the
document subsequently.
Well, as i said, setting "parseCtxt->loadsubset" to false
works for me, i just want to know if it's the appropriate
way to do so.
 
<cut/>

Daniel

Thanx & Ciao, Markus

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  
http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]