RE: More XSL Discussion

Subject: RE: More XSL Discussion
From: Boris Moore <Boris.Moore@xxxxxxxxxx>
Date: Thu, 26 Feb 1998 17:52:09 +0100
Paul Prescod wrote:
>Norman Walsh wrote:
>> Another possibility is to add more expressive power on the
>> action side.  In other words, let the action side of the
>> <target-element type="li"/> ask which occurance this is and
>> adjust its output accordingly.
>
>That's not good enough:
>
>Consider:
>
> <A><B><A><A><B><A><A><A><B>
>
>Now I want to wrap sequences of more than one A in a paragraph flow
>object. The problem is that by the time the first A's construction rule
>is triggered, it is essentially too late to make the wrapping paragraph,

In work we are doing with client-side dynamic processing and formatting of XML, using our own stylesheet language, (which we hope to evolve towards XSL), we make extensive use of API calls provided by our Stylesheet/Xml Parser allowing, amongst other things to conditionally process elements based on XML context information and data.  

Our XML parser does a completed parse, and conserves the grove in memory, before the Stylesheet construction rules are fired.  The action part of the stylesheet can obtain information about any part of the grove, such as "how many children of element type 'foo' does such and such an element have".  The target element can be specified by an ID attribute value, or by a contextual relationship to another element.  Thus processing performed by the action for a given element can depend, for example, on how many siblings it has of the same element type, which number it is itself in the series of siblings etc.

It seems to me that this kind of 'expressive power on the action side' does indeed allow handling many formatting problems that would otherwise be tricky to resolve.

Regards,

Boris Moore
RivCom
"Publishing Structured Information"


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


Current Thread