Re: [xml] Post validation

On Mon, Jun 14, 2004 at 11:40:09PM +1000, Steve Ball wrote:
Hi All,

Before I dive in and attempt to (re-)invent the wheel, I'll seek advice 
on how to go about a task that is currently causing me difficulties.

In my library I parse an XML document using the xmlTextReader 
interface.  In some circumstances I then want to validate the document, 
using a call to xmlValidateDocument.  If the document has specified its 
DTD using an external ID (actually a SYSTEM identifier) that is a 
relative URL, validation fails because the relative URL cannot be 
resolved.  This is because xmlValidateDocument calls 
xmlParseDTD(ExternalID, SystemID) but it does not pass a base URI for 
resolving the relative URL.

  The right fix seems to simply compose the system id with the base of
the document and pass the result to xmlParseDTD in xmlValidateDocument.

  Can you make a bugzilla report ?


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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