From: Patrick B. <pat...@jo...> - 2011-05-12 21:05:06
|
Fairly sure: from file /exist-trunk/src/org/exist/xquery/functions/xmldb/XMLDBRemove.java package org.exist.xquery.functions.xmldb; import org.apache.log4j.Logger; import org.exist.dom.QName; import org.exist.xquery.Cardinality; import org.exist.xquery.FunctionSignature; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; import org.exist.xquery.value.AnyURIValue; import org.exist.xquery.value.FunctionParameterSequenceType; import org.exist.xquery.value.Sequence; import org.exist.xquery.value.SequenceType; import org.exist.xquery.value.Type; import org.xmldb.api.base.Collection; import org.xmldb.api.base.Resource; import org.xmldb.api.base.XMLDBException; import org.xmldb.api.modules.CollectionManagementService; .... (line 78) Resource resource = collection.getResource(doc); if (resource == null) { logger.error("Resource " + doc + " not found"); throw new XPathException(this, "Resource " + doc + " not found"); } collection.removeResource(resource); Am I missing something? Cheers, Patrick On Thu, May 12, 2011 at 4:55 PM, Adam Retter <ad...@ex...> wrote: > Erm, Are you sure that is the case? > > XMLDB module functions should call the xmldb either local or remote > implementation, but at some point that code has to enter into the > internal API which is where the trigger should be effected from? > > On 12 May 2011 22:41, Patrick Bosek <pat...@jo...> wrote: > > Hello dev team, > > > > I'm making good progress on my upgrade to the triggers in eXist, but I've > > hit a bump and need some guidance. I've found that xmldb:remove uses > > "org.xmldb.api.base.Collection" to remove the resource, there by never > > hitting the trigger code. So, after looking through it I figured I'd > change > > the xmldb:remove to use the remove functions in > > org.exist.collections.Collection. Is this ok? Or is there another method > you > > would prefer I use? > > > > > > Cheers, > > > > -- > > Patrick Bosek > > Jorsek Software > > Cell (585) 820 9634 > > Office (585) 239 6060 > > Jorsek.com > > > > > > > ------------------------------------------------------------------------------ > > Achieve unprecedented app performance and reliability > > What every C/C++ and Fortran developer should know. > > Learn how Intel has extended the reach of its next-generation tools > > to help boost performance applications - inlcuding clusters. > > http://p.sf.net/sfu/intel-dev2devmay > > _______________________________________________ > > Exist-development mailing list > > Exi...@li... > > https://lists.sourceforge.net/lists/listinfo/exist-development > > > > > > > > -- > Adam Retter > > eXist Developer > { United Kingdom } > ad...@ex... > irc://irc.freenode.net/existdb > -- Patrick Bosek Jorsek Software Cell (585) 820 9634 Office (585) 239 6060 Jorsek.com |