Re: About Constructions rules

Subject: Re: About Constructions rules
From: Chris Maden <crism@xxxxxxxxxxx>
Date: Thu, 15 Jul 1999 15:00:40 -0400 (EDT)
Didier said, but I missed it:

> > In the Construction rules document, I'll update the document to
> > reflect the original intents of the spec designers by describing
> > the query construction rule as a dynamically constructed pattern
> > match expression. I have now to find a good example showing that
> > using a "query" construction is in some context is better than the
> > "element" construction rule. I have to admit that I lack some
> > imagination for the example and that some help would be
> > appreciated. Does someone as any idea?

Here's where I wish I had them now: In mixed content, my documents may
have processing instructions that I need to find.  I also need to
catch and handle certain characters and entities, for ligatures,
"smart" quotes, and characters that my output format can't handle.

But here's why, as I understand it, James didn't implement the query
construction rule: You can run the query against the entire document,
but that means you can't start processing the document until you've
parsed the entire thing.  Jade's current architecture allows parsing
to begin almost immediately, in most cases.  But the alternative is to
evaluate every query construction rule's pattern against every node
(meaning every single data character, etc.), which is prohibitively
slow.  As I found out a few months ago, Jade is optimized to treat
sequences of characters as monolithic, and when it has to break that
optimization, by treating each character as a single node, performance
goes to hell.  I'm not sure that there's a way around that.

-Chris
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread