Subject: Re: [xsl] Grouping help From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 22 Jul 2022 17:56:51 -0000 |
On 22.07.2022 19:15, rick@xxxxxxxxxxxxxx wrote: > > > I have a flat file that I am trying to add some hierarchy to. Here is > an example of the input: > > > My output is not quite right: > Is what follows below the wanted result? Or only the one your code creates? It is not clear what the desired result is and what the criteria are. > <?xml version="1.0" encoding="UTF-8"?> > > <task> > > B B <pretopic lbl="A."> > > B B B B B <title>General</title> > > B B B B B <list1> > > B B B B B B B B <l1item lbl="(1)">This task gives...</l1item> > > B B B B B B B B <list2> > > B B B B B B B B B B B <l2item lbl="(a)">Replace the water...</l2item> > > B B B B B B B B </list2> > > B B B B B </list1> > > B B </pretopic> > > B B <pretopic lbl="B."> > > B B B B B <title>References</title> > > B B </pretopic> > > B B <pretopic lbl="C."> > > <title>Tools/Equipment</title> > > B B B B B <note type="note" position="1">NOTE:</note> > > B B B B B <note type="note" position="2">When more than one...</note> > > B B B B B <effectivity>Effective on:</effectivity> > > B B B B B <effectivity>Effective on:</effectivity> > > B B </pretopic> > > B B <pretopic lbl="D."> > > B B B B B <title>Consumable Materials</title> > > B B </pretopic> > > B B <pretopic lbl="E."> > > B B B B B <title>Location Zones</title> > > B B </pretopic> > > B B <pretopic lbl="F."> > > B B B B B <title>Procedure</title> > > B B B B B <list1> > > B B B B B B B B <l1item lbl="(1)">Do a check...</l1item> > > B B B B B B B B <l1item lbl="(2)">Repair or replace...</l1item> > > B B B B B B B B <l1item lbl="(3)">Do this task...</l1item> > > B B B B B B B B <l1item lbl="(4)">Do a check...</l1item> > > B B B B B B B B <l1item lbl="(5)">Replace the sealant...</l1item> > > B B B B B B B B <l1item lbl="(6)">Do a check of...</l1item> > > B B B B B B B B <list2> > > B B B B B B B B B B B <l2item lbl="(a)">Replace the water...</l2item> > > B B B B B B B B </list2> > > B B B B B </list1> > > B B </pretopic> > > </task>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Grouping help, rick@xxxxxxxxxxxxxx | Thread | Re: [xsl] Grouping help, Dimitre Novatchev dn |
Re: [xsl] XPath expression that ret, Michael Kay mike@xxx | Date | Re: [xsl] Grouping help, Dimitre Novatchev dn |
Month |