Re: [xsl] Ordered union of sequences

Subject: Re: [xsl] Ordered union of sequences
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Thu, 8 Apr 2010 06:40:03 -0700
On Thu, Apr 8, 2010 at 6:28 AM, Michael MC<ller-Hillebrand
<mmh@xxxxxxxxxxxxx> wrote:
> Hello experts,
>
> I tried hard to come up with a good subject, but maybe I failed. I am
looking for pointers and terms that I can use for further research. The task
at hand, which I plan to solve in XSLT2, is the creation of a combined master
sequence of a number of sequences in a way so the internal order of sequence
items (identified by their name) is preserved (and inconsistencies can be
reported).
>
> There is an arbitrary number of sequences, sometimes containing items with
the same name:
>
> (k, o, p, c, f)
> (d, e, f, g)
> (k, f, z, o)
> (a, b, c, d)
>
> I want to create a master sequence which contains every item once,
preserving the original order.
>
> There are many possibilities for inconsistencies (like above the item "o"
appears before and after "f", which should be detected as an inconsistency)
and obviously there is more than one possible solution. Luckily I am only
interested in one solution, e.g.:
>
> (a, b, k, o, p, c, d, e, f, z, g)


But this is *not* preserving the original order !

You need to define the problem correctly.



--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
I enjoy the massacre of ads. This sentence will slaughter ads without
a messy bloodbath.





>
> The XSLT union operator treats sequences like unordered sets and only solves
the problem of removing duplicates.
>
> BTW, the idea behind this is to create part of an XML Schema from evaluating
document instances.
>
> I am thankful for any pointers,
>
> - Michael MC<ller-Hillebrand
>
> --
> _______________________________________________________________
> Michael MC<ller-Hillebrand: Dokumentation Technology
> Adobe Certified Expert, FrameMaker
> Consulting and Training, FrameScript, XML/XSL, Unicode
> Blog [de]: http://cap-studio.de/

Current Thread