You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by joshy <jo...@mindspring.com> on 2000/10/11 17:21:07 UTC

options

I'm working on an XSL stylesheet to take any arbitrary XML document and
convert it into HTML, sort of a pretty printer to render all of our XML in
a formatted manner for documentation purposes.  I don't care what the
doctype is and it would be great if I could just ignore it (though I would
like to extract the name and print that too). Right now it looks for the
DTD and throws an exception when it can't find it. I've tried using the
following options:

parser.setFeature("http://apache.org/xml/features/continue-after-fatal-error",false);
parser.setFeature("http://xml.org/sax/features/validation",false);
//parser.setFeature("http://apache.org/xml/features/nonvalidating/load-dtd-grammar",false);

but the last one (the one commented out) throws:
org.xml.sax.SAXNotRecognizedException: http://apache.org/xml/features/nonvalidating/load-dtd-grammar

Without this option it appears that the DTD will always be parsed.  Is
there anyother way of doing this?

Also, in a related question. Where are DTDs loaded from? Is it always
relative to the working directory, the dir where the binary resides, or
relative to the XML document? Is there a way to set the base directory for
all DTDs (since this will eventually run in a server environment where
lots of related DTDs will be loaded).

Thanks guys.  Keep up the good work.

- Joshua

-- 
  And in the end 
 the love you take
is equal to the love you make