[xml] validate while parsing using IO-parser context
- From: "Henke, Markus" <Markus_Henke ordat com>
- To: "'xml gnome org'" <xml gnome org>
- Subject: [xml] validate while parsing using IO-parser context
- Date: Thu, 23 Aug 2001 09:16:26 +0200
Hello,
and sorry to re-post this, but i initialy post it a little off-topic.
Maybe someone can point me at the right way?
-----Original Message-----
From: Daniel Veillard [mailto:veillard redhat com]
Sent: Wednesday, August 22, 2001 11:53 AM
To: Henke, Markus
Cc: 'xml gnome org'
Subject: Re: [xml] xmllint with external DTD
On Wed, Aug 22, 2001 at 11:03:04AM +0200, Henke, Markus wrote:
all to soon i've got a similar problem.
I try to validate a document using an IOParserContext
(program "tstorxml"):
[..]
Document is the same as below, it links to "orpc.dtd". That
file is present
The link is an URI-Reference from your document.
The document you produced has no base and hence libxml is unable to
compute the path to the DTD.
OK, that's clear. Thanks!
Mandatory reading: RFC 2396 (I do not joke, read it !)
I'll do so... I've already had a glance at it.
Now i know at least how less i know about URI's...
in the same directory as the XML document (i can validate
it using xmllint).
I can parse the document, but there's again an error:
Provide a base URI to the document, store it in doc->URL
Hm, maybe i've got something wrong.
I try to validate the document while parsing:
ctxt = xmlCreateIOParserCtxt(<snip/>);
ctxt->validate = 1;
xmlParseDocument(ctxt);
docPtr = ctxt->myDoc;
and it seems that ctxt->myDoc is NULL before parsing, so
ctxt = xmlCreateIOParserCtxt(<snip/>);
ctxt->validate = 1;
ctxt->myDoc->URL = "C:/test/data/Test.xml"
will crash.
Forgive my ignorance, but i'm new to libxml and it seems that i've lack of
some basics.
Ciao, Markus
Daniel
--
Daniel Veillard | Red Hat Network
http://redhat.com/products/network/
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]