Subject: Re: [xsl] Grouping? From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 20 Oct 2020 06:14:07 -0000 |
Greetings,
I have an issue that I think is a grouping problem but I just can't seem to figure it out. I have no code to show as I'm that lost on this. Using XSLT 2.0 with Oxygen 18.1.
I have the following XML that needs to transform to a comma delimited text file. See text after the XML. Any assistance to get me in the right direction is appreciated.
XML:
<work_package id="M2183892350419"> B B <eqpcond> B B B B B <targetfile id="O1012492350419"/> B B </eqpcond> B B <eqpcond> B B B B B <targetfile id="O1003092350419"> B B B B B B B B <targetfile id="O1012492350419"/> B B B B B B B B <targetfile id="O1000492350419"/> B B B B B B B B <targetfile id="O1002492350419"> B B B B B B B B B B B <targetfile id="O1012492350419"/> B B B B B B B B B B B <targetfile id="O1000192350418"/> B B B B B B B B B B B <targetfile id="O1000192350416"/> B B B B B B B B B B B <targetfile id="O1000192350417"/> B B B B B B B B B B B <targetfile id="O1000192350415"/> B B B B B B B B B B B <targetfile id="O1000192350414"/> B B B B B B B B </targetfile> B B B B B </targetfile> B B </eqpcond> B B <eqpcond> B B B B B <targetfile id="M2184292350419"> B B B B B B B B <targetfile id="O1012492350419"/> B B B B B B B B <targetfile id="M2171392350419"> B B B B B B B B B B B <targetfile id="O1012492350419"/> B B B B B B B B B B B <targetfile id="M2171492350419"> B B B B B B B B B B B B B B <targetfile id="O1012492350419"/> B B B B B B B B B B B B B B <targetfile id="M2171292350419"/> B B B B B B B B B B B </targetfile> B B B B B B B B B B B <targetfile id="M2171192350419"> B B B B B B B B B B B B B B <targetfile id="O1012492350419"/> B B B B B B B B B B B </targetfile> B B B B B B B B </targetfile> B B B B B B B B <targetfile id="M2183992350419"> B B B B B B B B B B B <targetfile id="O1012492350419"/> B B B B B B B B B B B <targetfile id="O1003092350419"> B B B B B B B B B B B B B B <targetfile id="O1012492350419"/> B B B B B B B B B B B B B B <targetfile id="O1000492350419"/> B B B B B B B B B B B B B B <targetfile id="O1002492350419"/> B B B B B B B B B B B </targetfile> B B B B B B B B B B B <targetfile id="O1011492350417"> B B B B B B B B B B B B B B <targetfile id="O1012492350419"/> B B B B B B B B B B B </targetfile> B B B B B B B B </targetfile> B B B B B B B B <targetfile id="M2007992350419"> B B B B B B B B B B B <targetfile id="O1012492350419"/> B B B B B B B B B B B <targetfile id="O1003092350419"> B B B B B B B B B B B B B B <targetfile id="O1012492350419"/> B B B B B B B B B B B B B B <targetfile id="O1000492350419"/> B B B B B B B B B B B B B B <targetfile id="O1002492350419"/> B B B B B B B B B B B </targetfile> B B B B B B B B </targetfile> </targetfile></eqpcond></work_package>
Desired output:
M2183892350419,O1012492350419 M2183892350419,O1003092350419 M2183892350419,,O1012492350419,O1000492350419,O1002492350419 M2183892350419,,,O1012492350419,O1000192350418,O1000192350416,O1000192350417
M2183892350419,M2184292350419 M2183892350419,,O1012492350419,M2171392350419 M2183892350419,,,O1012492350419,M2171492350419 M2183892350419,,,,O1012492350419,M2171292350419 M2183892350419,,,M2171192350419 M2183892350419,,,,O1012492350419 M2183892350419,,M2183992350419 M2183892350419,,,O1012492350419,O1003092350419 M2183892350419,,,,O1012492350419,O1000492350419,O1002492350419 M2183892350419,,,O1011492350417 M2183892350419,,,,O1012492350419 M2183892350419,,M2007992350419 M2183892350419,,,O1012492350419,O1003092350419 M2183892350419,,,,O1012492350419,O1000492350419,O1002492350419
Consider to explain in plain English how the nested data from the XML is mapped to lines in the CSV, I am not sure how to infer that from one example with rather longish and kind of cryptic sample data.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Grouping?, Charlie0 charlieo0@x | Thread | Re: [xsl] Grouping?, Liam R. E. Quin liam |
[xsl] Grouping?, Charlie0 charlieo0@x | Date | Re: [xsl] Grouping?, Liam R. E. Quin liam |
Month |