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.

I've found that setting "parserCtxt->loadsubset" to zero (provided that
"parserCtxt" is an "xmlParserCtxt") seems to work for me.
I wonder if direct access of the "xmlParserCtxt" member is the supposed
way to do such things, or is there a better way / API for it?


The new xmlReadxxx() APIs allows to both set the base and parser 
options. I will write the docs as soon as I have time, you can check
the archives from last month about them, I explained how they worked.
The xmllint.c code has also been updated to use those, look at it.

Daniel

-- 
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]