I am attaching the code for a standalone.  As I mentioned in the
original mail, yes this code works, it has been tested on linux and mac
as well. I guess I should have just given you the code to start with. I
was surprised this was specific to sgi as well.  Maybe it has more to do
with how it configures on sgi, I don't know.

This tarball has a source file, and an example dtd and the xml file that
uses it in separate directores.  The purpose of this code is that I want
the xml files to be relocatable, but always validate against a known
dtd.

You will need to set an environment variable before running this to
point to the directory contained in this tarball, (wherever you untar
it)

export PATH_TO_DTD={wherever you untar it/xml-test/dtdlocation}

Then run it with the xml file as argument.

./tst-cat volume-rendering.srn

There is no makefile, it is a single .cc file Compile lines for linux
and sgi are commented at the top of the .cc file.

I will try the CVS version as well.

--mc


On Thu, 2006-02-23 at 17:01 -0500, Daniel Veillard wrote:
> On Thu, Feb 23, 2006 at 10:56:20AM -0700, Martin Cole wrote:
> > I ran into this because of a failure on this platform finding a dtd from
> > my catalog entry.  (works on other platforms)
> > 
> > I do the following and fail on this platform:
> 
>   I doubt it's platform specific. Did you tried on Linux ?
> 
> >   xmlInitializeCatalog();
> >   xmlCatalogAdd(BAD_CAST "public", BAD_CAST "-//SCIRun/Network DTD, 
> >             BAD_CAST "path to the dtd file");
> 
>   
> >   /* create a parser context */
> >   ctxt = xmlNewParserCtxt();
> >   if (ctxt == 0) {
> >     std::cerr << "ComponentNode.cc: Failed to allocate parser context
> > \n";
> >     return -1;
> >   }
> >   /* parse the file, activating the DTD validation option */
> >   doc = xmlCtxtReadFile( ctxt, argv[1], 0, (XML_PARSE_DTDATTR | 
> >                                             XML_PARSE_DTDVALID) );
> > 
> 
>   the code ain't a standalone application, I won't try it.
> 
> > So i ran the regressions (whose output follows). It looks like the
> > regexp xpath tests fail which is likely why validation fails.
> 
>   no it's completely unrelated, and fixed in CVS.
> 
> > Any suggestions for where I should go from here?
> 
>   Your code may just not work.
> 
> Daniel
> 

Attachment: xml-test.tgz
Description: application/compressed-tar

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to