RE: About Constructions rules

Subject: RE: About Constructions rules
From: "Didier PH Martin" <martind@xxxxxxxxxxxxx>
Date: Sun, 11 Jul 1999 09:18:20 -0400
Hi Matthias,

Matthias said:
I wondered about that myself sometime ago. And no, query is not implemented.
Its the only missing construct-expression. It may have been left out because
this simplifies certain things. Eg, (current-node) will always be an element
node unless you use query. The style-query-expression can be any expression
returning a node-list, eg something like

(q-element 'footnote (current-node))

returning all footnote elements within the current node. Note that
(current-node) returns the root of the grove withing the
style-query-expression.


Didier says:
You are right Matthias, I discovered after digging in the sources that it is
not implemented. I guess your inference about why it is not implemented is
right because we may end up with any kind of node-list as the result of a
query. In may document talking about construction rules (ref:
http://www.netfolder.com/DSSSL/MarkupRule.htm ) I used as an example the
sgmal-parse as a query epxression. In this case the node returned is a
sml-document type of node. So, the query construct adds more complexity by
forcing us to process any kind of nodes. However this is a quite powerful
construction rule. For instance, the following query construction rule,
would include a sgml-document into a style sheet (this is an example
extracted from the document referred previously)

(query (sgml-parse ("<url>http://www.netfolder.com/doc.sgml";))
   (process-children)
)

This is an easy way to include an external document to be processed into a
style-sheet. I just scratched the surface of this construction rule power.
An other usage I discovered by playing with it on paper is that you can do a
specific query get back a node list and start locally to do some processing
on this node list. This way, we have the concept of local procedure where
you obtain a node-list and do some processing on it with node-list
constructs. Yes indeed a very powerful construct with not much equivalent in
other languages (does it? if yes, I would be interested to listen how other
languages implement the same feature).

PS: for those who want to renew their knowledge or just explore more about
DSSSL, read the document talking about the constrcution rules and give me
some feedback.

ref:  http://www.netfolder.com/DSSSL/MarkupRule.htm

regards
Didier PH Martin
mailto:martind@xxxxxxxxxxxxx
http://www.netfolder.com


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


Current Thread