You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "David Moss (JIRA)" <ji...@apache.org> on 2006/11/15 12:00:38 UTC
[jira] Created: (JCR-637) Multiple namespace definitions in CND
prevent definition of node type without child nodes
Multiple namespace definitions in CND prevent definition of node type without child nodes
-----------------------------------------------------------------------------------------
Key: JCR-637
URL: http://issues.apache.org/jira/browse/JCR-637
Project: Jackrabbit
Issue Type: Bug
Components: nodetype
Reporter: David Moss
Priority: Minor
The BNF in http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.html
defines:
[...]
cnd ::= {ns_mapping | node_type_def}
[...]
so multiple namespace definitions should not affect the node type definitions.
However, the following CND definition will fail:
<namespace= 'http://www.mynamespace.co.uk/namespace'>
<nt = 'http://www.jcp.org/jcr/nt/1.0'>
[namespace:document] > nt:file
- namespace:name (string) mandatory
<namespace= 'http://www.mynamespace.co.uk/namespace'>
<nt = 'http://www.jcp.org/jcr/nt/1.0'>
[namespace:document2] > nt:file
- namespace:name (string) mandatory
Remove the second set of namespace definitions, and all's well:
<namespace= 'http://www.mynamespace.co.uk/namespace'>
<nt = 'http://www.jcp.org/jcr/nt/1.0'>
[namespace:document] > nt:file
- namespace:name (string) mandatory
[namespace:document2] > nt:file
- namespace:name (string) mandatory
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (JCR-637) Multiple namespace definitions in CND
prevent definition of node type without child nodes
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-637?page=comments#action_12450025 ]
Jukka Zitting commented on JCR-637:
-----------------------------------
> probably the easiest fix would be to change the BNF (and the parser) so that namespace
> declarations can only occur at the top of a .cnd file.
+1
> Multiple namespace definitions in CND prevent definition of node type without child nodes
> -----------------------------------------------------------------------------------------
>
> Key: JCR-637
> URL: http://issues.apache.org/jira/browse/JCR-637
> Project: Jackrabbit
> Issue Type: Bug
> Components: nodetype
> Reporter: David Moss
> Priority: Minor
>
> The BNF in http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.html
> defines:
> [...]
> cnd ::= {ns_mapping | node_type_def}
> [...]
> so multiple namespace definitions should not affect the node type definitions.
> However, the following CND definition will fail:
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document] > nt:file
> - namespace:name (string) mandatory
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document2] > nt:file
> - namespace:name (string) mandatory
> Remove the second set of namespace definitions, and all's well:
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document] > nt:file
> - namespace:name (string) mandatory
> [namespace:document2] > nt:file
> - namespace:name (string) mandatory
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (JCR-637) Multiple namespace definitions in CND
prevent definition of node type without child nodes
Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-637?page=all ]
Stefan Guggisberg reassigned JCR-637:
-------------------------------------
Assignee: Stefan Guggisberg
> Multiple namespace definitions in CND prevent definition of node type without child nodes
> -----------------------------------------------------------------------------------------
>
> Key: JCR-637
> URL: http://issues.apache.org/jira/browse/JCR-637
> Project: Jackrabbit
> Issue Type: Bug
> Components: nodetype
> Reporter: David Moss
> Assigned To: Stefan Guggisberg
> Priority: Minor
> Attachments: CompactNodeTypeDefReader.patch
>
>
> The BNF in http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.html
> defines:
> [...]
> cnd ::= {ns_mapping | node_type_def}
> [...]
> so multiple namespace definitions should not affect the node type definitions.
> However, the following CND definition will fail:
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document] > nt:file
> - namespace:name (string) mandatory
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document2] > nt:file
> - namespace:name (string) mandatory
> Remove the second set of namespace definitions, and all's well:
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document] > nt:file
> - namespace:name (string) mandatory
> [namespace:document2] > nt:file
> - namespace:name (string) mandatory
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (JCR-637) Multiple namespace definitions in CND
prevent definition of node type without child nodes
Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-637?page=all ]
Stefan Guggisberg updated JCR-637:
----------------------------------
Attachment: CompactNodeTypeDefReader.patch
attached patch for suggested change
> Multiple namespace definitions in CND prevent definition of node type without child nodes
> -----------------------------------------------------------------------------------------
>
> Key: JCR-637
> URL: http://issues.apache.org/jira/browse/JCR-637
> Project: Jackrabbit
> Issue Type: Bug
> Components: nodetype
> Reporter: David Moss
> Priority: Minor
> Attachments: CompactNodeTypeDefReader.patch
>
>
> The BNF in http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.html
> defines:
> [...]
> cnd ::= {ns_mapping | node_type_def}
> [...]
> so multiple namespace definitions should not affect the node type definitions.
> However, the following CND definition will fail:
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document] > nt:file
> - namespace:name (string) mandatory
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document2] > nt:file
> - namespace:name (string) mandatory
> Remove the second set of namespace definitions, and all's well:
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document] > nt:file
> - namespace:name (string) mandatory
> [namespace:document2] > nt:file
> - namespace:name (string) mandatory
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (JCR-637) Multiple namespace definitions in CND
prevent definition of node type without child nodes
Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-637?page=comments#action_12450006 ]
Stefan Guggisberg commented on JCR-637:
---------------------------------------
the problem only occurs if a namespace declaration follows a property definition without value constraint(s), e.g.
[...]
- foo:prop (string) mandatory
<bar='http://www.acme.org/bar'>
[...]
the '<' token in this example is ambiguos since it denotes both a list value constraints *and* a namespace declaration.
the problem therefore are not intermixed namespace declarations and node type defintions per se. the problem is the
ambiguity of the '<' token.
probably the easiest fix would be to change the BNF (and the parser) so that namespace declarations can only occur at the top of a .cnd file.
> Multiple namespace definitions in CND prevent definition of node type without child nodes
> -----------------------------------------------------------------------------------------
>
> Key: JCR-637
> URL: http://issues.apache.org/jira/browse/JCR-637
> Project: Jackrabbit
> Issue Type: Bug
> Components: nodetype
> Reporter: David Moss
> Priority: Minor
>
> The BNF in http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.html
> defines:
> [...]
> cnd ::= {ns_mapping | node_type_def}
> [...]
> so multiple namespace definitions should not affect the node type definitions.
> However, the following CND definition will fail:
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document] > nt:file
> - namespace:name (string) mandatory
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document2] > nt:file
> - namespace:name (string) mandatory
> Remove the second set of namespace definitions, and all's well:
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document] > nt:file
> - namespace:name (string) mandatory
> [namespace:document2] > nt:file
> - namespace:name (string) mandatory
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (JCR-637) Multiple namespace definitions in CND
prevent definition of node type without child nodes
Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-637?page=all ]
Stefan Guggisberg resolved JCR-637.
-----------------------------------
Fix Version/s: 1.1.1
Resolution: Fixed
applied patch (svn r475669):
- adapted EBNF and parser: all ns declarations must precede first node type definiton
> Multiple namespace definitions in CND prevent definition of node type without child nodes
> -----------------------------------------------------------------------------------------
>
> Key: JCR-637
> URL: http://issues.apache.org/jira/browse/JCR-637
> Project: Jackrabbit
> Issue Type: Bug
> Components: nodetype
> Reporter: David Moss
> Assigned To: Stefan Guggisberg
> Priority: Minor
> Fix For: 1.1.1
>
> Attachments: CompactNodeTypeDefReader.patch
>
>
> The BNF in http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.html
> defines:
> [...]
> cnd ::= {ns_mapping | node_type_def}
> [...]
> so multiple namespace definitions should not affect the node type definitions.
> However, the following CND definition will fail:
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document] > nt:file
> - namespace:name (string) mandatory
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document2] > nt:file
> - namespace:name (string) mandatory
> Remove the second set of namespace definitions, and all's well:
> <namespace= 'http://www.mynamespace.co.uk/namespace'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> [namespace:document] > nt:file
> - namespace:name (string) mandatory
> [namespace:document2] > nt:file
> - namespace:name (string) mandatory
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira