Hi Maxim,

The system view does not need to escape the name of a property or a node because the name is represented as the value of an attribute. e.g:

<sv:property sv:name="myapp:title" sv:type="String">
    <sv:value>JSR 170</sv:value>
</sv:property>

this is different in the document view, where myapp:title becomes the name of an attribute:

<foo myapp:title="JSR 170"/>

here you have to escape characters that are not valid. e.g. a node name like 'My Documents':

<My_x0020_Documents myapp:title="JSR 170">

regards
 marcel

Maxim wrote:
Hello jackrabbit-dev.

In the file:
/jackrabbit/src/test/org/apache/jackrabbit/test/api/SysViewContentHandler.java

from line 453 it says:
------------------------------------------------------
        if (node.hasProperty(propElem.name)) {

/* ... skipped ... */

        }
        // given node has no property with the name given by the prop element
        else {
            checkCondition("Property element " + propElem.name
                    + " found but node " + nodeElem.node.getPath() +
                    " does not have a property with that name", false);
        }
------------------------------------------------------

where propElem.name was read from XML before.

According to section "6.4.3 Escaping of JCR Names" of the JCR
specification, element names in XML may happen to be escaped versions
of actual repository names and thus Node.hasProperty() will not
recognize them until such name is decoded back to it's original form.

How the test in question is supposed to handle such escaped names is
not clear for me. Please advise.


Thank you.

Reply via email to