[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Stopping Saxon searching for an external DTD

Subject: Re: Stopping Saxon searching for an external DTD
From: jim smith <jim@xxxxxxxxx>
Date: Mon, 12 Feb 2001 22:03:55 +0000
jim smith studio
jim smith wrote:
 <!DOCTYPE moreovernews SYSTEM
 "http://p.moreover.com/xml_dtds/moreovernews.dtd">

fails when I'm offline, but not when I'm online.

 I'm not actually clear what's going on here. Is Saxon actually
 attempting to grab the DTD or is Java having a problem because it
 thinks the URL should be resolved before proceeding? (In which case,
 why doesn't it crash like a normal Java app on a Mac...)

 As I'm confident that Moreover files are valid, and my XSL doesn't
 care, is there any way to turn this feature off?

DTDs are used for more than just validation. You'll have to get rid of the <!DOCTYPE> altogether. If there is such a declaration, it's going to be examined for an internal and external DTD subset, so that the XML parser can determine default attribute values, resolve entity references, and, if it is a validating parser, do schema validation.


Yes, it makes parsing lightweight XML-with-trivial-DTD tricky offline, but that's a rare occurence. I may be the only person the list who needs this functionality ;-)

My best bet is to s/// the DOCTYPE string out when I grab it with Perl/LWP.


I believe that in the event that the DTD is external, the parser has the
option of ignoring it, but I would bet that the parser you're using does
not fall back when the URI resolver coughs up an exception. You might
check the docs for your XML parser to see if it gives you a way to turn
off resolution of external entities, or perhaps you can override the
resolver with one of your own.. (sorry if I'm not being very helpful..
I've not tried to do this myself)


Indeed it doesn't.

j
--



jim smith
020 7837 0377

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.