[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Grouping?

Subject: Re: Grouping?
From: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Oct 2020 07:51:37 -0000
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.