Hi,

(Sedna Terminal Version 3.5.161; WindowsXP SP3)

I'm having an issue with union that I can't seem to see what's wrong. It 
always returns the entire result of both sets of XML but they are 
basically exactly the same.

Another issue I found was that $l_Content2 even though sorted (when I 
view the result XML both $l_Content1 and $l_Content2 are ordered exactly 
the same) is out of order when I want to view just the IDs.

I have two sets of XML in Sedna. One is individual XML docs in a 
collection and the other is the same XML docs but in a single document 
and not in a collection. Sample XML is at bottom of message.

Result of $l_Content1/@id
id="album_505"
id="album_506"
id="album_507"
id="album_508"
id="album_509"
id="album_982"
id="album_2476"
id="album_2591"
id="album_2596"
id="album_2599"
id="album_2874"

Result of $l_Content2/@id
id="album_2476"
id="album_2591"
id="album_2596"
id="album_2599"
id="album_2874"
id="album_505"
id="album_506"
id="album_507"
id="album_508"
id="album_509"
id="album_982"

Am I doing something wrong and is the behaviour of collection versus doc 
different when sorting?

Any help or insight will be appreciated.

Marijan (Mario) Madunic

Steps

Load the docs into Sedna, both the individual XML (into collection) and 
the single large XML doc

Create the indexes
CREATE INDEX "AlbumsByArtist" ON doc("albums")//album BY 
artists/artist/@artistID AS xs:string &
CREATE INDEX "AlbumsByArtistCollection" ON 
collection("c_AlbumsIndividual")/album BY artists/artist/@artistID AS 
xs:string

Run the following XQuery

declare variable $p_Index1 as xs:string := "AlbumsByArtist";
declare variable $p_Value1 as xs:string := "artist_709";
declare variable $p_Index2 as xs:string := "AlbumsByArtistCollection";
declare variable $p_Value2 as xs:string := "artist_709";

let $l_Content1 := for $l_ContentTemp1 in index-scan($p_Index1, 
$p_Value1, "EQ") order by number(substring-after($l_ContentTemp1/@id, 
'album_')) return $l_ContentTemp1
let $l_Content2 := for $l_ContentTemp2 in index-scan($p_Index2, 
$p_Value2, "EQ") order by number(substring-after($l_ContentTemp2/@id, 
'album_')) return $l_ContentTemp2

let $l_Count1 := count($l_Content1)
let $l_Count2 := count($l_Content2)

let $l_UnionContent := $l_Content1 union $l_Content2

let $l_UnionCount := count($l_UnionContent)

return
$l_Content2/@id

--------------------------------------------------------------
<albums>
<album id="album_505" format="CD" releaseYear="1991" country="USA" 
packaging="Jewelcase" playingTime="43:25" rating="5" coverImage="505.jpg">
<title>Laughing Stock</title>
<titleSort>Laughing Stock</titleSort>
<artists>
<artist artistID="artist_709"/>
</artists>
<label>Polydor Records</label>
<genre>
<primaryGenre>Alternative &amp; Punk</primaryGenre>
<subGenre>Ambient/Dream Pop</subGenre>
</genre>
<review>
<p>Virtually ignored upon its initial release, Laughing Stock continues 
to grow in stature and influence by leaps and bounds. Picking up where 
Spirit of Eden left off, the album operates outside of the accepted 
sphere of rock to create music which is both delicate and intense; 
recorded with a large classical ensemble, it defies easy categorization, 
conforming to very few structural precedents - while the gently hypnotic 
"Myrrhman" flirts with ambient textures, the percussive "Ascension Day" 
drifts toward jazz before the two sensibilities converge to create 
something entirely new and different on "New Grass." The epic "After the 
Flood," on the other hand, is an atmospheric whirlpool laced with 
jackhammer guitar feedback and Mark Hollis' remarkably plaintive vocals; 
it flows into "Taphead," perhaps the most evocative, spacious, and 
understated piece on the record. A work of staggering complexity and 
immense beauty, Laughing Stock remains an under-recognized masterpiece, 
and its echoes can be heard throughout much of the finest experimental 
music issued in its wake. - Jason Ankeny</p>
</review>
</album>
<album id="album_506" format="CD" releaseYear="1986" country="USA" 
packaging="Jewelcase" playingTime="45:34" rating="4" 
coverImage="506.jpg" originalpressing="true" compilation="true">
<title>The Colour of Spring</title>
<titleSort>Colour of Spring</titleSort>
<artists>
<artist artistID="artist_709"/>
</artists>
<label>EMI</label>
<genre>
<primaryGenre>Alternative &amp; Punk</primaryGenre>
<subGenre>New Wave</subGenre>
</genre>
<review>
<p>With It's My Life, Talk Talk proved that they could pull off an 
entire album of strong material. With Colour of Spring, they took it one 
step further, moving to a near-concept song cycle, following the 
emotional ups and downs of relationships and pondering life in general. 
Musically, they built on the experimental direction of the previous 
album with interesting rhythms, sweeping orchestration, complex 
arrangements, and even a children's chorus to create an evocative, 
hypnotic groove. Though the songs were catchier on the earlier efforts 
and the ambient experimentation was more fully achieved later on, Colour 
of Spring succeeded in marrying the two ideas into one unique sound for 
their most thoroughly satisfying album. - Chris Woodstra</p>
</review>
</album>
<album id="album_507" format="CD" releaseYear="1984" country="USA" 
packaging="Jewelcase" playingTime="43:26" rating="4" 
coverImage="507.jpg" reissue="true">
<title>It's My Life</title>
<titleSort>It's My Life</titleSort>
<artists>
<artist artistID="artist_709"/>
</artists>
<label>EMI</label>
<genre>
<primaryGenre>Alternative &amp; Punk</primaryGenre>
<subGenre>New Wave</subGenre>
</genre>
<review>
<p>After an unremarkable debut, Talk Talk regrouped and refashioned 
themselves more in the style of sophisto-era Roxy Music while developing 
their own voice. It's My Life shows a great leap in songwriting, the 
band making highly personal statements with a sexy, seductive groove and 
a diversity that transcends the synth-pop tag. Synthesizers still play a 
dominant role, but the music is made far more interesting by mixing 
"real" instruments and challenging world music rhythms seamlessly with 
the technology. Still pulling off the catchy single (like "Dum Dum Girl" 
and the title track, as well as the simply sublime "Does Caroline 
Know?") on It's My Life, Talk Talk also proved themselves capable of 
achieving a cohesive album - a rare feat for the time and an unexpected 
surprise from a band that seemed to be simply a bandwagon-jumper. - 
Chris Woodstra</p>
</review>
</album>
<album id="album_508" format="CD" releaseYear="1988" country="USA" 
packaging="Jewelcase" playingTime="40:52" rating="5" 
coverImage="508.jpg" originalpressing="true">
<title>Spirit of Eden</title>
<titleSort>Spirit of Eden</titleSort>
<artists>
<artist artistID="artist_709"/>
</artists>
<label>EMI</label>
<genre>
<primaryGenre>Alternative &amp; Punk</primaryGenre>
<subGenre>Ambient/Dream Pop</subGenre>
</genre>
<review>
<p>Compare Spirit of Eden with any other previous release in the Talk 
Talk catalog, and it's almost impossible to believe it's the work of the 
same band - exchanging electronics for live, organic sounds and 
rejecting structure in favor of mood and atmosphere, the album is an 
unprecedented breakthrough, a musical and emotional catharsis of immense 
power. Mark Hollis' songs exist far outside of the pop idiom, drawing 
instead on ambient textures, jazz-like arrangements, and avant-garde 
accents; for all of their intricacy and delicate beauty, compositions 
like "Inheritance" and "I Believe in You" also possess an elemental 
strength - Hollis' oblique lyrics speak to themes of loss and redemption 
with understated grace, and his hauntingly poignant vocals evoke 
wrenching spiritual turmoil tempered with unflagging hope. A singular 
musical experience. - Jason Ankeny</p>
</review>
</album>
<album id="album_509" format="2CD" releaseYear="1998" country="USA" 
packaging="Jewelcase" playingTime="142:45" rating="4" 
coverImage="509.jpg" originalpressing="true" compilation="true">
<title>Asides Besides</title>
<titleSort>Asides Besides</titleSort>
<artists>
<artist artistID="artist_709"/>
</artists>
<label>EMI</label>
<genre>
<primaryGenre>Alternative &amp; Punk</primaryGenre>
<subGenre>New Wave</subGenre>
</genre>
<review>
<p>Asides Besides can certainly be seen as a cash-in release to coincide 
with Mark Hollis' first solo release and the reissue of Talk Talk's EMI 
catalog, but rarely does such a calculated industry move result in such 
a treat for fans. Over two discs, Asides Besides essentially ties up all 
of the loose ends for the band. Disc one is probably the least 
essential, bringing out all of the 12" remixes, which are of marginal 
interest, though all are superior to those found on the unauthorized 
History Revisited. Disc two however, reveals no shortage of prime 
rarities beginning with three demos from 1981 ("Talk Talk," "Mirror Man" 
and "Candy"). A handful of singles are included - the not-so-rare 
single, "My Foolish Friend," the ultra-rare "Why Is it So Hard" (from 
the film First Born), the U.S. remix of "Dum Dum Girl," and the edit of 
"Eden" - but the real gems are the B-sides, which are anything but 
"throwaways." In fact, the B-sides are not only in most cases as strong 
as the ones that made it onto the albums, but they also indicate the 
more experimental direction the band would take later on. Asides Besides 
may be of interest only to diehard Talk Talk fans, but for that audience 
this collection is absolutely essential. - Chris Woodstra</p>
</review>
</album>
<album id="album_982" format="CD" releaseYear="1982" country="USA" 
packaging="Jewelcase" playingTime="36:47" rating="3" 
coverImage="982.jpg" reissue="true">
<title>The Party's over</title>
<titleSort>Party's Over, the</titleSort>
<artists>
<artist artistID="artist_709"/>
</artists>
<label>EMI</label>
<genre>
<primaryGenre>Alternative &amp; Punk</primaryGenre>
<subGenre>New Wave</subGenre>
</genre>
<review>
<p>Talk Talk began life as a slavishly derivative, Duran Duran-styled, 
new romantic synth-pop band, as their debut, The Party's Over, clearly 
shows. Much of the album seems to attempt to recreate Duran Duran's 
debut, but even with their most blatant ripoffs, like the single "Talk 
Talk," they do it with a naive charm that makes for some really 
enjoyable music, even if it isn't particularly innovative or 
groundbreaking. - Chris Woodstra</p>
</review>
</album>
<album id="album_2476" format="CD" releaseYear="1982" country="USA" 
packaging="Jewelcase" playingTime="36:47" rating="3" 
coverImage="2476.jpg" reissue="true" reissueYear="1997" remastered="true">
<title>The Party’s Over</title>
<titleSort>Party’s Over, The</titleSort>
<artists>
<artist artistID="artist_709"/>
</artists>
<label>EMI</label>
<genre>
<primaryGenre>Alternative &amp; Punk</primaryGenre>
<subGenre>New Wave</subGenre>
</genre>
<review>
<p>Talk Talk began life as a slavishly derivative, Duran Duran-styled 
new romantic synth pop band, as their debut, The Party's Over, clearly 
shows. Much of the album seems to attempt to recreate Duran Duran's 
debut, but even with their most blatant rip-offs, like the single "Talk 
Talk," they do it with a naïve charm that makes for some really 
enjoyable music, even if it isn't particularly innovative or 
groundbreaking.</p>
</review>
</album>
<album id="album_2591" format="CD" releaseYear="1984" country="USA" 
packaging="Jewelcase" playingTime="43:02" rating="4" 
coverImage="2591.jpg" reissue="true" reissueYear="1997" remastered="true">
<title>It's My Life</title>
<titleSort>It's My Life</titleSort>
<artists>
<artist artistID="artist_709"/>
</artists>
<label>EMI</label>
<genre>
<primaryGenre>Alternative &amp; Punk</primaryGenre>
<subGenre>New Wave</subGenre>
</genre>
<review>
<p>After an unremarkable debut, Talk Talk regrouped and refashioned 
themselves more in the style of sophisto-era Roxy Music while developing 
their own voice. It's My Life shows a great leap in songwriting, the 
band making highly personal statements with a sexy, seductive groove and 
a diversity that transcends the synth pop tag. Synthesizers still play a 
dominant role, but the music is made far more interesting by mixing 
"real" instruments and challenging world music rhythms seamlessly with 
the technology. Still pulling off the catchy single (like "Dum Dum Girl" 
and the title track, as well as the simply sublime "Does Caroline 
Know?") on It's My Life, Talk Talk also proved themselves capable of 
achieving a cohesive album -- a rare feat for the time and an unexpected 
surprise from a band that seemed to be simply a bandwagon-jumper.</p>
</review>
</album>
<album id="album_2596" format="CD" releaseYear="1988" country="USA" 
packaging="Jewelcase" playingTime="41:22" rating="5" 
coverImage="2596.jpg" reissue="true" reissueYear="1997" remastered="true">
<title>Spirit of Eden</title>
<titleSort>Spirit of Eden</titleSort>
<artists>
<artist artistID="artist_709"/>
</artists>
<label>EMI</label>
<genre>
<primaryGenre>Alternative &amp; Punk</primaryGenre>
<subGenre>Post Rock</subGenre>
</genre>
<review>
<p>Compare Spirit of Eden with any other previous release in the Talk 
Talk catalog, and it's almost impossible to believe it's the work of the 
same band -- exchanging electronics for live, organic sounds and 
rejecting structure in favor of mood and atmosphere, the album is an 
unprecedented breakthrough, a musical and emotional catharsis of immense 
power. Mark Hollis' songs exist far outside of the pop idiom, drawing 
instead on ambient textures, jazz-like arrangements, and avant-garde 
accents; for all of their intricacy and delicate beauty, compositions 
like "Inheritance" and "I Believe in You" also possess an elemental 
strength -- Hollis' oblique lyrics speak to themes of loss and 
redemption with understated grace, and his hauntingly poignant vocals 
evoke wrenching spiritual turmoil tempered with unflagging hope. A 
singular musical experience.</p>
</review>
</album>
<album id="album_2599" format="CD" releaseYear="1986" country="USA" 
packaging="" playingTime="45:40" rating="4.5" coverImage="2599.jpg" 
reissue="true" compilation="true" reissueYear="1997" remastered="true">
<title>The Colour of Spring</title>
<titleSort>Colour of Spring, The</titleSort>
<artists>
<artist artistID="artist_709"/>
</artists>
<label>EMI</label>
<genre>
<primaryGenre>Alternative &amp; Punk</primaryGenre>
<subGenre>New Wave</subGenre>
</genre>
<review>
<p>With It's My Life, Talk Talk proved that they could pull off an 
entire album of strong material. With The Colour of Spring, they took it 
one step further, moving to a near-concept song cycle, following the 
emotional ups and downs of relationships and pondering life in general. 
Musically, they built on the experimental direction of the previous 
album with interesting rhythms, sweeping orchestration, complex 
arrangements, and even a children's chorus to create an evocative, 
hypnotic groove. Though the songs were catchier on the earlier efforts 
and the ambient experimentation was more fully achieved later on, The 
Colour of Spring succeeded in marrying the two ideas into one unique 
sound for their most thoroughly satisfying album.</p>
</review>
</album>
<album id="album_2874" format="CD + DVD" releaseYear="1990" 
country="USA" packaging="Jewelcase" playingTime="60:01" rating="4.5" 
coverImage="2874.jpg" reissue="true" compilation="true" reissueYear="2007">
<title>Natural History: the Very Best of Talk Talk</title>
<titleSort>Natural History: the Very Best of Talk Talk</titleSort>
<artists>
<artist artistID="artist_709"/>
</artists>
<label>EMI</label>
<genre>
<primaryGenre>Rock</primaryGenre>
<subGenre>New Wave</subGenre>
</genre>
<review>
<p>During Talk Talk's hiatus following Spirit of Eden, EMI issued a hits 
collection compiling the singles from the first four albums as well as 
the non-LP "My Foolish Friend," a couple of live tracks, and an edit of 
"Desire." Natural History serves as a nice introduction to the band, 
showing it as an effective singles act despite its more recent 
album-concept experiments, and the added rarities make the package a 
necessary addition for fans as well. [The 2007 edition of the collection 
comes packaged with an additional DVD of bonus material and music 
videos.]</p>
</review>
</album>
</albums>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Reply via email to