You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Andreas Schaefer (Jira)" <ji...@apache.org> on 2022/06/29 22:46:00 UTC

[jira] [Commented] (SLING-11427) Registering a Namespace does not allow Hashtag in the URI

    [ https://issues.apache.org/jira/browse/SLING-11427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17560672#comment-17560672 ] 

Andreas Schaefer commented on SLING-11427:
------------------------------------------

Adding this line to the end of test-40.txt:

register namespace (foo2) uri:some-uri/V/1.0/test#
Is missing the output:

RegisterNamespace (foo2) uri:some-uri/V/1.0/test#

Adding this:

register namespace (foo2) uri:some-uri/V/1.0/test\#

is yielding a parser exception:

Caused by: org.apache.sling.repoinit.parser.impl.TokenMgrError: Lexical error at line 4, column 50.  Encountered: "\\" (92), after : ""

at org.apache.sling.repoinit.parser.impl.RepoInitParserImplTokenManager.getNextToken(RepoInitParserImplTokenManager.java:1200)



I am not a Javacc expert and so my attempts to rectify this issue failed. 

> Registering a Namespace does not allow Hashtag in the URI
> ---------------------------------------------------------
>
>                 Key: SLING-11427
>                 URL: https://issues.apache.org/jira/browse/SLING-11427
>             Project: Sling
>          Issue Type: Bug
>          Components: Repoinit
>    Affects Versions: Repoinit Parser 1.6.4
>            Reporter: Andreas Schaefer
>            Priority: Major
>             Fix For: Repoinit Parser 1.6.16
>
>
> Registering a Namespace in the repoinit fails when the URI contains a hashtag:
> Example:
> register namespace (stDim) [http://ns.adobe.com/xap/1.0/sType/Dimensions#]
> This should work or support an escape of the hashtag (<backslash>#):
> register namespace (stDim) [http://ns.adobe.com/xap/1.0/sType/Dimensions\\#|http://ns.adobe.com/xap/1.0/sType/Dimensions#]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)