I'm having a hard time getting a node with the following details:Primary Path: /{http://www.alfresco.org/model/content/1.0}categoryRoot/{http://www.alfresco.org/model/content/1.0}generalclassifiable/{http://www.alfresco.org/model/content/1.0}Screening status/{http://www.alfresco.org/model/content/1.0}Screening ok Type: {http://www.alfresco.org/model/content/1.0}categoryI tried to get it with:nodeService.getChildByName( rootNodeRef, QName.createQName( "{http://www.alfresco.org/model/content/1.0}category" ), "categories/General/Screening status/Screening ok" ); this line returns nullnodeService.getChildByName( rootNodeRef, QName.createQName( "{http://www.alfresco.org/model/content/1.0}category" ), "Screening ok" );this line returns nullsearchService.selectNodes( rootNodeRef, "cm:categoryRoot/cm:generalclassifiable/cm:Screening status/cm:screening ok", null, namespaceService, false );
This last line throws the following exception:
org.alfresco.service.cmr.repository.XPathException: Error executing xpath:
xpath: cm:categoryRoot/cm:generalclassifiable/cm:Screening status/cm:screening ok
Caused by: org.jaxen.XPathSyntaxException: Unexpected 'status/cm:screening ok'
Caused by: class org.jaxen.saxpath.XPathSyntaxException: cm:categoryRoot/cm:generalclassifiable/cm:Screening status/cm:screening ok: 52: Unexpected 'status/cm:screening ok'
It's clear to me that the space(s) in the name are causing this problem. I cannot simply remove them since there is a lot of javascript code that uses the following lines:roothome.childByNamePath("categories/General/Screening status/Screening ok").nodeRef;Anybody any suggestions for solutions?