hi gena,
On 6/18/05, Gennady Azarenkov <[EMAIL PROTECTED]> wrote:
> hi,
>
> it seems that there are wrong behaviour in TCK's NamespaceRegistryTest
> (i guess because Jackrabbit does not check if the namespace is present in
> content
> in unregistering and either does not check item's namespace in remove()).
> so the sequence is:
> 1. NamespaceRegistry.registerNamespace("tst",
> "www.apache.org/jackrabbit/test/namespaceRegistryTest");
> 2. testRootNode.addNode("tst:root");
> 3. NamespaceRegistry.unregisterNamespace("tst"); (in
> NamespaceRegistryTest.tearDown()) -
> it seems should throw NamespaceException
according to "7.2 Adding and Deleting Namespaces" in the jsr 170 specification,
"... An implementation may prevent the unregistering of any other
namespace for implementation-specific reasons by throwing a
NamespaceException."
that is exactly what jackrabbit does. maintaining ref# for namespaces is quite
complex and expensive. remember that, apart from item names, namespaces
can also be referenced in property values of type PATH & NAME, in node type
definitions, in value constraints of REFERNCE, PATH & NAME properties, etc.
we therefore chose to not maintain ref# of namespaces and consequentially
NamespaceRegistry.unregisterNamespace() is always throwing NamespaceException.
cheers
stefan
>
> regards,
> gena
>
> -------------------------
> Gennady Azarenkov
> eXo platform
>