logo       
Google Custom Search

Related Msgs: audio.musicbrai...    enbd.general/20...    ietf.idr/2002-0...    java.ant-contri...    gnu.make.genera...    qplus.devel/200...    video.freevo.cv...    os.netbsd.ports...    yellowdog.gener...    xfree86.cvs/200...    search.nutch.us...    freedesktop.xse...    programming.swi...    capabilities.ge...    telephony.pbx.a...    mail.sylpheed.c...    db.firebase.por...    boot-loaders.u-...    recreation.radi...    netbsd.bugs/200...    web.zope.plone....    user-groups.lin...   

Re: Parsing misbehavior using DTD grammar pool: msg#00099

Subject: Re: Parsing misbehavior using DTD grammar pool
Michael Glavassevich wrote:

Hi Ben,

Xerces' DTD grammar caching mechanism currently assumes that the entire
grammar exists in an external subset. This is one of its limitations. I
believe currently if you've preparsed a DTD grammar the internal subset is
completely ignored. If you're caching passively (letting the parser fill
the grammar pool as it reads grammars) then an internal subset of an
instance document may end up in the cached grammar if it's the first time
the parser's seen the DOCTYPE, applying it to subsequent documents of that
type. Muddled in this FAQ [1] is a call for feedback about including
support for internal declarations, though I'm not aware of anyone
expressing interest yet.

[1] http://xml.apache.org/xerces2-j/faq-grammars.html#faq-2

So in other words if a document has an internal subset the grammar pool is not consulted? (As opposed to, the grammar pool is consulted, thereby giving the wrong answer.)

As the FAQ suggests, one's knee-jerk reaction would be, "it would be better if internal declarations were somehow incorporated into the grammar that's been cached." I love the word "somehow" in that sentence. It's an interesting engineering problem how one can both precompile a DTD and defer evaluation of its parameter entities, esp. in the presence of conditional include/ignore.

Bob Foster
http://xmlbuddy.com/



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>