|
Test Case: An xpath query is issued to retrieve document resources that
need to be removed. collection.removeResource( resource ) does not work when resource is derived
from the XPathQueryService. It looks as if the reason may be because
the resource.getId() is null when coming from the XPathQueryService. What could be the problem? Kevin Ross --------------------------------------------------------- Here is the ResourceSet retrieved
via the XPathQueryService. Notice the results
below which have valid documentIds. // ResourceSet retrieved via XPathQueryService <?xml
version="1.0" encoding="UTF-8"?> <xapi:resourceSet
xapi:collectionURI="xmldb:xindice:///db/profile/person"
xmlns:xapi="http://www.xmldb.org/xapi/ResourceSet"> <xapi:resource xapi:documentID="68ff584058c71fdd000000ee5607171f"> <person
id="82808080808080808080808080808180" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./person.xsd" xmlns:src="http://xml.apache.org/xindice/Query"
src:col="/db/profile/person"
src:key="68ff584058c71fdd000000ee5607171f"> <name
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:src="http://xml.apache.org/xindice/Query"> <first
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:src="http://xml.apache.org/xindice/Query">Kevin</first> <middle
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:src="http://xml.apache.org/xindice/Query"/> <last
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:src="http://xml.apache.org/xindice/Query">Ross</last> </name> </person> </xapi:resource> <xapi:resource xapi:documentID="68ff584058c71fdd000000ee560787e6"> <person
id="82808080808080808080808080808280" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./person.xsd" xmlns:src="http://xml.apache.org/xindice/Query"
src:col="/db/profile/person"
src:key="68ff584058c71fdd000000ee560787e6"> <name
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:src="http://xml.apache.org/xindice/Query"> <first
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:src="http://xml.apache.org/xindice/Query">Joe</first> <middle
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:src="http://xml.apache.org/xindice/Query"/> <last
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:src="http://xml.apache.org/xindice/Query">Smith</last> </name> </person> </xapi:resource> </xapi:resourceSet> |
