|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: More XSL Discussion
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








