[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Where Clause and XDT:Untyped Issues

Michael Kay mike at saxonica.com
Mon Feb 4 07:44:18 PST 2008


  Where Clause and XDT:Untyped Issues
> 
>    To make sure I am on the same page as you are, are you 
> talking about the compare() function in XQuery? 

I was talking about the eq operator, but you could use compare() if you
prefer. Or even "=". Something like

id('010003-031') eq id('010003-057')

if those are two ads you believe to be duplicates.

Oh - I've just noticed your ID values aren't valid ID values - an ID can't
start with a digit. So change that to

//ad[@xml:id='010003-031'] eq //ad[@xml:id='010003-057']

> If I use 
> this, would this not mean that I have to know the exact head 
> element to call when I am executing the XQuery?

You're comparing whether <ad> elements are duplicates, not whether their
<head> elements are duplicates. Is that perhaps the source of your
confusion?
> 
>    As for the error you raised, I tried running the XQuery by 
> using declare boundary-space strip at the prolog section of 
> the XQuery, but it returned me with still two of the same 
> result for every single set that it has found. For the minor 
> differences, could there be others other than whitespace 
> differences within the source?

There could be all kind of things, for example a capital Latin A in one
versus a capital Cyrillic A in the other would not readily show up when
viewed on the screen. OK, perhaps that's unlikely - but I've no way of
knowing that. That's why I asked you to run the test.

Michael Kay
http://www.saxonica.com/



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-2007 All Rights Reserved.