Subject: Recognizing Sequences (was More XSL Discussion) From: Jonathan Marsh <jmarsh@xxxxxxxxxxxxx> Date: Thu, 26 Feb 1998 09:49:11 -0800 |
| -----Original Message----- | From: Paul Prescod [mailto:papresco@xxxxxxxxxxxxxxxx] | Sent: Thursday, February 26, 1998 7:03 AM| 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, | unless you use one of the hacks that have been already suggested (e.g. | manually trigger the processing of the other A's and surpress their | output elsewhere). I just wanted to break this part of the discussion onto its own thread (since all discussions seem to be occurring on a single thread :-) and to take a shot at presenting the problem a little more concretely. I personally think this is a vital feature. Scenario 1 (modelled after HTML's <DL>): <definition-list> <term>X</term> <definition>1</definition> <term>Y</term> <definition>2</definition> </definition-list> Desired output (HTML): <TABLE> <TR> <TD>X</TD> <TD>1</TD> </TR> <TR> <TD>X</TD> <TD>1</TD> </TR> </TABLE> In this transformation, a simplistic mapping is possible between <definition-list> and <TABLE>, <term> and <TD>, and <definition> and <TD>. There is no simple mapping that results in <TR>. In an ideal world we would go back to our source DTD and group each <term>/<definition> pair in an <item> element. In the real world, this is not possible. Specifying an element sequence that could be mapped into the <TR> is a plausible solution that the XSL WG should explore. Scenario 2 (Paul's scenario above): <farm> <cow>Bessy</cow> <pig>Porky</pig> <pig>Wilbur</pig> <pig>Piglet</pig> </farm> Desired output (HTML): <P>cows: Bessy</P> <P>pigs: Porky Wilbur Piglet</P> This requires a similar mapping of the "sequence" of <pig> elements into a single <P>. This differs from the above example only in that (1) it contains a sequence of identical element types instead of a pattern of different element types, (2) the number of elements in the sequence is not known. Jonathan Marsh phone 425.703.4591 jmarsh@xxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Question: XSL & Dynamic Changes, L. John Junod | Thread | Re: Recognizing Sequences (was More, Henry Thompson |
RE: More XSL Discussion, Jonathan Marsh | Date | Re: More XSL Discussion, Sean Mc Grath |
Month |