Subject: Re: [xsl] small grouping task From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Thu, 26 Feb 2009 15:32:12 -0500 |
Thanks Ken for the help.
Now I know what specs I need to add. Your second xsl example comes close, you almost read my mind. I will try to add the rest of the requirements succinctly.
I am using Saxon and a xsl 2.0 solution is great.
> 2), the other making the assumption that each list item is all of the content (except <br/>) that follows each <input/>
Correct. But the first <br/> Not more.
Another valid assumption is, After the <br/>
Other things to make work are. -a- There are random text and tags between the '<p class="problem">' and the first <input>...<br/> pair.
-b- There are text and tags after that last <input>... <br/> pair and the closing </p>
Those need to be preserved.
In your second xsl, the "-a-" items were removed from the output. And the "-b-" items were wrapped with the last </li> and </ul>. The last </li></ul> needs to end sooner.
Note my new source a few more tags
... desired output. Only the <input>.....<br/> pairs are altered
<input> test1 <br/> test2 <input> test3 <br/>
<p class="problem"> <input> test1 <br/> test2 <br/> <br/> <input> test3 <br/> <br/> <input> test4 </p>
-- XQuery/XSLT training in Prague, CZ 2009-03 http://www.xmlprague.cz Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] small grouping task, Fred Christian | Thread | Re: [xsl] small grouping task, Fred Christian |
Re: [xsl] small grouping task, Fred Christian | Date | Re: [xsl] small grouping task, Fred Christian |
Month |