mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
. Checkpoint for the Rhino JavaScript engine integration:
- Additions to the Alfresco JavaScript data-model . JUnit test for each entry point into Rhino and the ScriptService - tests for various API calls on the Scriptable Node object . More javadoc clean-up in templating and script services git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2726 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -450,27 +450,30 @@ public final class QName implements QNamePattern, Serializable, Cloneable
|
||||
throw new IllegalArgumentException("str parameter is mandatory");
|
||||
}
|
||||
|
||||
if (str.charAt(0) != NAMESPACE_BEGIN && str.indexOf(NAMESPACE_PREFIX) != -1)
|
||||
if (str.charAt(0) != NAMESPACE_BEGIN)
|
||||
{
|
||||
// get the prefix and resolve to the uri
|
||||
int end = str.indexOf(NAMESPACE_PREFIX);
|
||||
String prefix = str.substring(0, end);
|
||||
String localName = str.substring(end + 1);
|
||||
String uri = prefixResolver.getNamespaceURI(prefix);
|
||||
|
||||
if (uri != null)
|
||||
if (str.indexOf(NAMESPACE_PREFIX) != -1)
|
||||
{
|
||||
result = new StringBuilder(64).append(NAMESPACE_BEGIN).append(uri).append(NAMESPACE_END).append(
|
||||
localName).toString();
|
||||
// get the prefix and resolve to the uri
|
||||
int end = str.indexOf(NAMESPACE_PREFIX);
|
||||
String prefix = str.substring(0, end);
|
||||
String localName = str.substring(end + 1);
|
||||
String uri = prefixResolver.getNamespaceURI(prefix);
|
||||
|
||||
if (uri != null)
|
||||
{
|
||||
result = new StringBuilder(64).append(NAMESPACE_BEGIN).append(uri).append(NAMESPACE_END)
|
||||
.append(localName).toString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// there's no namespace so prefix with Alfresco's Content Model
|
||||
result = new StringBuilder(64).append(NAMESPACE_BEGIN).append(NamespaceService.CONTENT_MODEL_1_0_URI)
|
||||
.append(NAMESPACE_END).append(str).toString();
|
||||
}
|
||||
}
|
||||
else if (str.charAt(0) != NAMESPACE_BEGIN)
|
||||
{
|
||||
// there's no namespace so prefix with Alfresco's Content Model
|
||||
result = new StringBuilder(64).append(NAMESPACE_BEGIN).append(NamespaceService.CONTENT_MODEL_1_0_URI)
|
||||
.append(NAMESPACE_END).append(str).toString();
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user