Re: More XSL Discussion

Subject: Re: More XSL Discussion
From: Chris Maden <crism@xxxxxxx>
Date: Thu, 26 Feb 1998 11:40:39 -0500
[Sean Mc Grath]
> Now you have me worried! Can you please explain this? Lets say I
> have a really simple stylesheet. One construction rule for title
> elements. That is all - no fancy selects or modes or stuff. Just
> this:
> 
> <xsl>
> <rule>
> <target-element type = "title">
> <DIV>
> <children/>
> </DIV>
> </rule>
> </xsl>
> 
> My document has 10 title elements. If I understand you correctly
> you are saying
> 
> 1) This construction rule might be executed 1000 times
> 2) The order in which the title elements in my document are
> processed is random.
> 
> I don't get it:-(

This is the essence of the difference between scripting and building
flow trees.

In one case, you can say, "For the numbered paragraphs, build a
paragraph flow object containing a literal of the union of the first
ten words and the last ten words; if any words are omitted, place
ellipses between the first and last words."  This will create an
output flow object, and it will create the same one in the same place,
regardless of the processing model.

In the other case, you can say, "For the numbered paragraphs, call
'writeln()'."  This means that whenever the numbered paragraphs are
processed, 'writeln()' will be called.  The function may display to
stdout immediately; it may pop up a dialog box; it may dump to your
Web server's log file.  It will not (inherently) do anything to the
output flow object tree.

This is similar to a distinction between, "For this element, create a
synchronized audio flow object with the sound of a bell," and, "Ring a
bell whenever you process this element."  One is a flow object
construction rule, the other is a side-effect.

-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>


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


Current Thread