Re: some basic questions

Subject: Re: some basic questions
From: Chris Maden <crism@xxxxxxx>
Date: Fri, 10 Apr 1998 19:26:44 -0400
[Gregg Reynolds]
> I hadn't really looked into the query-construction-rule before your
> note sent me scurrying to my copy of the standard.  Now I can
> categorically state: hmmmm.  Very interesting.  One could for
> example emulate element-construction-rules using
> query-construction-rules, no?

Yes.

(element FOO
	 (empty-sosofo))

is equivalent to

(query (node-list-filter (lambda (snl)
			   (equal? (gi snl)
				   "FOO"))
			 (descendants (tree-root)))
       (empty-sosofo))

> I have always thought of DSSSL as providing two distinct models of
> producing output, one based on queries (just like RDBMS processing)
> and the other input-driven ("events" in the input text stream
> "triggering" the "handlers" registered via construction-rules).  But
> the query-construction-rule really kinda sorta unifies these two
> models.  Again I say: hmmmm.  What remains murky to me is how the
> query-construction-rule is triggered.  I'll quote here from Chris
> Maden's response to your note:
> 
> "The times I've wished for the query feature, it's been to match
> non- element nodes, like processing instructions and sdata
> entities."
> 
> Though I understand how the query-expression of a
> query-construction-rule might select such non-element nodes, I don't
> see how the rule gets triggered in the first place.  I think I've
> made the assumption that element nodes (ie the tree? or is it the
> grove?) drive the selection, but now looking in the standard I don't
> see any language that necessarily implies that model.  I'm looking
> in 12.4.1, p 174.  Can anybody shed some light on this?

The DSSSL Standard leaves the actual processing model up to an
individual application; one can imagine a processor transforming a
grove into a flow object tree by randomly picking a node, finding the
most specific applicable construction rule, and obeying it.

I think that it would be possible to determine if a query expression
would return the current node without actually processing the entire
expression.  For this example, every element is going to be part of
the descendants of the tree-root, so only the procedure needs to be
applied as a test.  I don't know if the full query expression language
could be implement back-asswards this way or not, though.

So you can think of DSSSL's operational model as being driven either
by the data or by the rules; it's not as binary as I think you think.

-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
  • RE: some basic questions, (continued)
    • Reynolds, Gregg - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id LAA12075Fri, 10 Apr 1998 11:28:43 -0400 (EDT)
    • W. Eliot Kimber - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id MAA13136Fri, 10 Apr 1998 12:46:56 -0400 (EDT)
      • Chris Maden - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id NAA13581Fri, 10 Apr 1998 13:11:02 -0400 (EDT)
    • Reynolds, Gregg - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id SAA17954Fri, 10 Apr 1998 18:55:23 -0400 (EDT)
      • Chris Maden - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id TAA18307Fri, 10 Apr 1998 19:28:41 -0400 (EDT) <=
        • Gregg Reynolds - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id JAA04988Mon, 13 Apr 1998 09:59:55 -0400 (EDT)