[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Grouping?
On Tue, 2020-10-20 at 06:15 +0000, Martin Honnen martin.honnen@xxxxxx wrote: > Am 20.10.2020 um 04:40 schrieb Charlie0 charlieo0@xxxxxxxxxxx: [...] Let's see if interleaving input and output helps. > > <work_package id="M2183892350419"> > > B B B <eqpcond> > > B B B B B B <targetfile id="O1012492350419"/> > > B B B </eqpcond> > > B B B <eqpcond> > > B B B B B B <targetfile id="O1003092350419"> M2183892350419,O1012492350419 M2183892350419,O1003092350419 OK, so that's each eqpcond generating its id as output > > B B B B B B B B B <targetfile id="O1012492350419"/> > > B B B B B B B B B <targetfile id="O1000492350419"/> > > B B B B B B B B B <targetfile id="O1002492350419"> M2183892350419,,O1012492350419,O1000492350419,O1002492350419 Why the ,, here? The three targetfile elements have their id attributes on the same line and the parent epcond is omitted (but why?) Here is a result sequence: d,m,c,c c c d,m,ur,m,dr and here is the corresponding input BOOK What would be the output for TELEPHONE? > > 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 <targetfile id="O1000192350418"/> > > B 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 B <targetfile id="O1000192350417"/> > > B 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 B <targetfile id="O1000192350414"/> M2183892350419,,,O1012492350419,O1000192350418,O1000192350416,O10001923 50417 So, ,,, here. Maybe targetfile elements don't include ancestors except the root. But where did the last two go? Maybe all after the first four are ignored? > > B B B B B B B B B </targetfile> > > B B B B B B </targetfile> > > B B B </eqpcond> > > B B B <eqpcond> > > B B B B B B <targetfile id="M2184292350419"> M2183892350419,M2184292350419 > > > > B B B B B B B B B <targetfile id="O1012492350419"/> > > B B B B B B B B B <targetfile id="M2171392350419"> M2183892350419,,O1012492350419,M2171392350419 OK, that's the same pattern as before. > > 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 <targetfile id="M2171492350419"> M2183892350419,,,O1012492350419,M2171492350419 > > B 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 B <targetfile id="M2171292350419"/> M2183892350419,,,,O1012492350419,M2171292350419 OK, output if there are no more siblings So we want output for the first targetfile with content, and (if it is different) the last targetfile in each sequence. The output is the root element's id, followed by a comma, followed by a comma for each ancestor, followed by the id attributes of previous empty taretfile elements and the id of this element, up to a limit of four. I don't think this needs grouping. But i'm not certain i have the rules right. Liam (d,h;d;ur,dr,m,h;u,d,u,d) -- Liam Quin,B https://www.delightfulcomputing.com/ Available for XML/Document/Information Architecture/XSLT/ XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. Barefoot Web-slave, antique illustrations: B http://www.fromoldbooks.org
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|