Hi all,

By merely doing some experiments I noticed that I can execute this statement 
using the XMLDB API:

DROP DOCUMENT "25860-14Z.xml" IN COLLECTION "chemicalContent/released"


So my next question is... would it in that case also be possible to e.g. write 
some Operational XQuery Library making use of the DDL?
I tested the snippet below but this does not work. But executing a single DDL 
statement like the one above does work.  I guess it's not possible to 
accomplish sth like below??

Robby

**********************************************************************
import module namespace cm = "http://www.nxp.com/chemicalcontent";;

declare function local:toURIs($ids as xs:string*) {
  for $id in $ids return document-uri(root(cm:getTypeName($id)))
};

declare function local:dropAll($ids as xs:string*) {
  for $uri in local:toURIs($ids)
  local:dropDocument($uri)
};

declare function local:dropDocument($document_uri as xs:string) {
    DROP DOCUMENT $document_uri IN COLLECTION "chemicalContent/released"      
};

local:dropAll("74AHC1G00GW_C","74AHC1G00GW_C1")
**********************************************************************




------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Reply via email to