declare variable $pageSize := 250; let $table := collection("xAce.dbo.singles")/singles let $groupCount := xs:integer(fn:ceiling(count($table) div $pageSize)) for $g in 1 to $groupCount let $group := $table[fn:position() gt ($g - 1) * $pageSize and fn:position() le $g * $pageSize] return (ddtek:serialize-to-url( { for $singles1 in $group return { for $Titles in collection("xAce.dbo.Title")/Title where $Titles/autoID = $singles1/autoID return { if( $Titles/TI ) then { $Titles/TI/text() } else () } { if( $Titles/FT ) then { $Titles/FT/text() } else () } { if( $Titles/Orig ) then { $Titles/Orig/text() } else () } { if( $Titles/Gister ) then { $Titles/Gister/text() } else () } { if( $Titles/Lambda ) then { $Titles/Lambda/text() } else () } { if( $Titles/Systran5 ) then { $Titles/Systran5/text() } else () } { if( $Titles/Sigma ) then { $Titles/Sigma/text() } else () } } { if( $singles1/ThesisType ) then {$singles1/ThesisType/text()}else () } { if( $singles1/PNS ) then {$singles1/PNS/text()}else () } { if( $singles1/SO ) then {$singles1/SO/text()}else () } { if( $singles1/SE ) then {$singles1/SE/text()}else () } { if( $singles1/PD ) then {$singles1/PD/text()}else () } { if( $singles1/PY ) then {$singles1/PY/text()}else () } { if( $singles1/PUBM ) then {$singles1/PUBM/text()}else () } { if( $singles1/DA ) then {$singles1/DA/text()}else () } { if( $singles1/DEP ) then {$singles1/DEP/text()}else () } { if( $singles1/EDAT ) then {$singles1/EDAT/text()}else () } { if( $singles1/MHDA ) then {$singles1/MHDA/text()}else () } { let $PHSTs := collection("xAce.dbo.PHST")/PHST[$singles1/autoID=autoID]return if ($PHSTs) then {for $PHST in $PHSTs return {$PHST/PHST/text()}}else () } { if( $singles1/LR ) then {$singles1/LR/text()}else () } { if( $singles1/PST ) then {$singles1/PST/text()}else () } { if( $singles1/STAT ) then {$singles1/STAT/text()}else () } { if( $singles1/VL ) then {$singles1/VL/text()}else () } { if( $singles1/IS ) then {$singles1/IS/text()}else () } { if( $singles1/SU ) then {$singles1/SU/text()}else () } { if( $singles1/SI ) then {$singles1/SI/text()}else () } { if( $singles1/BP ) then {$singles1/BP/text()}else () } { if( $singles1/EP ) then {$singles1/EP/text()}else () } { if( $singles1/PS ) then {$singles1/PS/text()}else () } { let $Authors := collection("xAce.dbo.Authors")/Authors[$singles1/autoID = autoID] return if($Authors) then { for $Author in $Authors return if($Author/AU or $Author/AF or $Author/BAU or $Author/Orig) then { if( $Author/AU ) then {$Author/AU/text()}else () } { if( $Author/AF ) then {$Author/AF/text()}else () } { if( $Author/BAU ) then {$Author/BAU/text()}else () } { if( $Author/C1 ) then {$Author/C1/text()}else () } { if( $Author/EM ) then {$Author/EM/text()}else () } { if( $Author/Orig ) then {$Author/Orig/text()}else () } { if( $Author/Gister ) then {$Author/Gister/text()}else () } { if( $Author/Lambda ) then {$Author/Lambda/text()}else () } { if( $Author/Systran5 ) then {$Author/Systran5/text()}else () } { if( $Author/Sigma ) then {$Author/Sigma/text()}else () } else () } else () } { for $Advisor in collection("xAce.dbo.Advisor")/Advisor where $Advisor/autoID = $singles1/autoID return { if( $Advisor/Orig ) then { $Advisor/Orig/text() } else () } { if( $Advisor/Gister ) then { $Advisor/Gister/text() } else () } { if( $Advisor/Lambda ) then { $Advisor/Lambda/text() } else () } { if( $Advisor/Systran5 ) then { $Advisor/Systran5/text() } else () } { if( $Advisor/Sigma ) then { $Advisor/Sigma/text() } else () } } { let $BAs := collection("xAce.dbo.BA")/BA[$singles1/autoID=autoID]return if ($BAs) then {for $BA in $BAs return {$BA/BA/text()}}else () } { let $BEs := collection("xAce.dbo.BE")/BE[$singles1/autoID=autoID]return if ($BEs) then {for $BE in $BEs return {$BE/BE/text()}}else () } { if( $singles1/AD ) then {$singles1/AD/text()}else () } { if( $singles1/University ) then {$singles1/University/text()}else () } { if( $singles1/UniversityAddress ) then {$singles1/UniversityAddress/text()}else () } { let $CAs := collection("xAce.dbo.CA")/CA[$singles1/autoID=autoID]return if ($CAs) then {for $CA in $CAs return {$CA/CA/text()}}else () } { if( $singles1/RP ) then {$singles1/RP/text()}else () } { if( $singles1/OWN ) then {$singles1/OWN/text()}else () } { let $CCs := collection("xAce.dbo.CC")/CC[$singles1/autoID=autoID]return if ($CCs) then {for $CC in $CCs return {$CC/CC/text()}}else () } { if( $singles1/SB ) then {$singles1/SB/text()}else () } { let $CHs := collection("xAce.dbo.CH")/CH[$singles1/autoID=autoID]return if ($CHs) then {for $CH in $CHs return {$CH/CH/text()}}else () } { let $DSs := collection("xAce.dbo.DS")/DS[$singles1/autoID=autoID]return if ($DSs) then {for $DS in $DSs return {$DS/DS/text()}}else () } { let $GEs := collection("xAce.dbo.GE")/GE[$singles1/autoID=autoID]return if ($GEs) then {for $GE in $GEs return {$GE/GE/text()}}else () } { let $MQs := collection("xAce.dbo.MQ")/MQ[$singles1/autoID=autoID]return if ($MQs) then {for $MQ in $MQs return {$MQ/MQ/text()}}else () } { let $GNs := collection("xAce.dbo.GN")/GN[$singles1/autoID = autoID]return if ($GNs) then {for $GN in $GNs return {$GN/GN/text()}}else () } { let $TAs := collection("xAce.dbo.TA")/TA[$singles1/autoID = autoID]return if ($TAs) then {for $TA in $TAs return {$TA/TA/text()}}else () } { let $TMs := collection("xAce.dbo.TM")/TM[$singles1/autoID = autoID]return if ($TMs) then {for $TM in $TMs return {$TM/TM/text()}}else () } { let $MCs := collection("xAce.dbo.MC")/MC[$singles1/autoID = autoID]return if ($MCs) then {for $MC in $MCs return {$MC/MC/text()}}else () } { let $PRs := collection("xAce.dbo.PR")/PR[$singles1/autoID = autoID]return if ($PRs) then {for $PR in $PRs return {$PR/PR/text()}}else () } { let $SDs := collection("xAce.dbo.SD")/SD[$singles1/autoID = autoID]return if ($SDs) then {for $SD in $SDs return {$SD/SD/text()}}else () } { let $MHs := collection("xAce.dbo.MH")/MH[$singles1/autoID = autoID]return if ($MHs) then {for $MH in $MHs return {$MH/MH/text()}}else () } { let $Keywords := collection("xAce.dbo.Keyword")/Keyword[$singles1/autoID = autoID]return if($Keywords) then { for $Keyword in $Keywords return if($Keyword/DE or $Keyword/ID or $Keyword/Orig) then { if($Keyword/DE) then {$Keyword/DE/text()} else() } { if($Keyword/ID) then {$Keyword/ID/text()} else() } { if($Keyword/Orig) then {$Keyword/Orig/text()} else() } { if($Keyword/Gister) then {$Keyword/Gister/text()} else() } { if($Keyword/Lambda) then {$Keyword/Lambda/text()} else() } { if($Keyword/Systran5) then {$Keyword/Systran5/text()} else() } { if($Keyword/Sigma) then {$Keyword/Sigma/text()} else() } else () } else () } { let $SubjectCategories := collection("xAce.dbo.SubjectCategory")/SubjectCategory[$singles1/autoID = autoID]return if($SubjectCategories) then { for $SubjectCategory in $SubjectCategories return if($SubjectCategory/Orig or $SubjectCategory/SC) then { if($SubjectCategory/SC) then {$SubjectCategory/SC/text()} else() } { if($SubjectCategory/Orig) then {$SubjectCategory/Orig/text()} else() } { if($SubjectCategory/Gister) then {$SubjectCategory/Gister/text()} else() } { if($SubjectCategory/Lambda) then {$SubjectCategory/Lambda/text()} else() } { if($SubjectCategory/Systran5) then {$SubjectCategory/Systran5/text()} else() } { if($SubjectCategory/Sigma) then {$SubjectCategory/Sigma/text()} else() } else() } else() } { if( $singles1/PN ) then {$singles1/PN/text()}else () } { for $Abstract in collection("xAce.dbo.Abstract")/Abstract where $Abstract/autoID = $singles1/autoID return { if( $Abstract/AB ) then {$Abstract/AB/text()}else () } { if( $Abstract/Orig ) then {$Abstract/Orig/text()}else () } { if( $Abstract/Gister ) then {$Abstract/Gister/text()}else () } { if( $Abstract/Lambda ) then {$Abstract/Lambda/text()}else () } { if( $Abstract/Systran5 ) then {$Abstract/Systran5/text()}else () } { if( $Abstract/Sigma ) then {$Abstract/Sigma/text()}else () } } { let $AEs := collection("xAce.dbo.AE")/AE[$singles1/autoID = autoID]return if ($AEs) then {for $AE in $AEs return {$AE/AE/text()}}else () } { if( $singles1/DG ) then {$singles1/DG/text()}else () } { if( $singles1/PC ) then {$singles1/PC/text()}else () } { if( $singles1/PL ) then {$singles1/PL/text()}else () } { let $CRs := collection("xAce.dbo.CR")/CR[$singles1/autoID = autoID]return if ($CRs) then {for $CR in $CRs return {$CR/CR/text()}}else () } { if( $singles1/NR ) then {$singles1/NR/text()}else () } { if( $singles1/TC ) then {$singles1/TC/text()}else () } { if( $singles1/LA ) then {$singles1/LA/text()}else () } { let $DTs := collection("xAce.dbo.DT")/DT[$singles1/autoID = autoID]return if ($DTs) then {for $DT in $DTs return {$DT/DT/text()}}else () } { if( $singles1/LT ) then {$singles1/LT/text()}else () } { if( $singles1/ME ) then {$singles1/ME/text()}else () } { if( $singles1/PT ) then {$singles1/PT/text()}else () } { if( $singles1/PU ) then {$singles1/PU/text()}else () } { if( $singles1/PI ) then {$singles1/PI/text()}else () } { if( $singles1/PA ) then {$singles1/PA/text()}else () } { if( $singles1/CT ) then {$singles1/CT/text()}else () } { if( $singles1/CL ) then {$singles1/CL/text()}else () } { if( $singles1/CY ) then {$singles1/CY/text()}else () } { let $SPs := collection("xAce.dbo.SP")/SP[$singles1/autoID = autoID]return if ($SPs) then {for $SP in $SPs return {$SP/SP/text()}}else () } { if( $singles1/J9 ) then {$singles1/J9/text()}else () } { if( $singles1/JI ) then {$singles1/JI/text()}else () } { if( $singles1/JT ) then {$singles1/JT/text()}else () } { if( $singles1/AR ) then {$singles1/AR/text()}else () } { if( $singles1/DI ) then {$singles1/DI/text()}else () } { if( $singles1/PG ) then {$singles1/PG/text()}else () } { if( $singles1/FullTextHyper ) then {$singles1/FullTextHyper/text()}else () } { if( $singles1/GA ) then {$singles1/GA/text()}else () } { if( $singles1/UT ) then {$singles1/UT/text()}else () } { if( $singles1/AN ) then {$singles1/AN/text()}else () } { let $AIDs := collection("xAce.dbo.AID")/AID[$singles1/autoID = autoID]return if ($AIDs) then {for $AID in $AIDs return {$AID/AID/text()}}else () } { if( $singles1/SN ) then {$singles1/SN/text()}else () } { if( $singles1/BN ) then {$singles1/BN/text()}else () } { if( $singles1/JID ) then {$singles1/JID/text()}else () } { if( $singles1/RN ) then {$singles1/RN/text()}else () } { if( $singles1/IDOCID ) then {$singles1/IDOCID/text()}else () } { if( $singles1/sourcePath ) then {$singles1/sourcePath/text()}else () } { if( $singles1/sourceFile ) then {$singles1/sourceFile/text()}else () } { if( $singles1/sourceType ) then {$singles1/sourceType/text()}else () } { if( $singles1/classification ) then {$singles1/classification/text()}else () } } , concat("file:///G:/x/xml/ace/ace",$g,".xml"),"indent=yes")) (: Stylus Studio meta-information - (c) 2004-2008. Progress Software Corporation. All rights reserved. :)