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?