|
Subject: Re: [xsl] Grouping by character runs (and keeping element structure) From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 31 Jul 2006 14:33:26 -0400 |
Continuing my grouping issues:
XSLT2 handles grouping on a node level quite conveniently. However, adding structure to legacy, rather flat content (i.e.: character runs) still poses challenges in grouping....
A worst-case scenario of course would be:
__ EXAMPLE 3 __
<p><ul><b>Note</b> <i>#4</i>: Don't tumble dry your pet</ul>.</p>
TASK: Group the leading paragraph text "Note #4:" including any contained markup using <marker> to a child of <p> so that the result looks like:
<p><marker><ul><b>Note</b> <i>#4</i>:</ul></marker> <ul>Don't tumble dry your pet</ul>.</p>
SOLUTION: Same problems as in EXAMPLE 2, but additionally note that the <ul> element must be split/duplicated so that <marker> can be a child of <p>, yet retains the full formatting info in form of the contained element structure.
Is there a certain pattern on how to tackle these kind of problems in XSLT, or is the language just not the tool of choice for this kind of transformation?
Cheers, Wendell
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Grouping by character run, David Carlisle | Thread | [xsl] Is it possible to create xsl:, Nick Glenister |
| RE: [xsl] Transformation assistance, cknell | Date | Re: [xsl] Param redirection, Steve |
| Month |