xsl-list
[Top] [All Lists]

[xsl] group-starting-with drops child text nodes - workaround?

2010-06-15 12:40:42
Hello,

It seems that using the grouping method "group-starting-with" will cause child 
text nodes of the element that starts each group to be omitted from the 
resulting populations. eg, group-starting-with="subtitle":

<subtitle/>
text
    <b>bolded text</b>
more text
<subtitle/>
...

results in a population that looks like:

<subtitle/>
    <b>bolded text</b>


I believe this is the expected behavior. If so, does anyone know of a 
workaround? ie, a way to somehow preserve the child text?

For example, my first thought was to wrap the child text nodes in <p>s before 
performing the grouping, but of course this caused linebreaks to appear between 
the child text nodes and following inline elements (in the example above, 
linebreaks would appear between "text", "bolded text", and "more text").

My ultimate objective is create hierarchy (in the example, for <subtitle> to be 
the parent of all nodes between each subtitle). Is there a better way?

Thanks

Tim



      

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>