|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Using Union Operator without Duplicate RecordsFlorent Georges lists at fgeorges.orgSun Dec 30 05:30:06 PST 2007
Alice Wei wrote: > The code below works great, but is it possible to > shorten the "for" clause so that it looks something like > for $project in doc("resume_2.xml")//author > without using the XML embedded inside to shorten the code? Just replace the hard-coded XML element with doc(...): ... for $a in distinct-values( doc('...')//author[@type = ('co-author', 'Faculty')] ) ... Not tested. If your input is quite well structured, you can maybe avoid the use of the // operator, which can be very not effective. Regards, --drkm _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr
|
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
|






