jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Norris <jnor...@pattern73.com>
Subject Re: CND Definition Question:
Date Sat, 06 Feb 2010 19:22:24 GMT
I found the source of the problem by stepping through the parser.  In
my actual definition, my node name had a dash (-) in it that was not
quoted (which then started an attribute definition).

Thanks,
-Jeremy

On Sat, Feb 6, 2010 at 9:39 AM, Jeremy Norris <jnorris@pattern73.com> wrote:
> That's interesting, I will investigate that.  I am new to jackrabbit
> so I am not sure if this is a definition problem or a loading/import
> problem.  I am using org.apache.jackrabbit.commons.cnd.CndImporter
> which I thought would handle whatever needed to be done to import the
> types into the repository.
>
> If this is a loading problem, then do I have to import and load each
> new type individually?  It seems very convenient and reasonable to
> reference several new types in a single .cnd file (that have
> references to new types within the definition like my example).  In
> fact, the jackrabbit source includes several test .cnd files with
> multiple type definitions within it.
>
> Thanks for you thoughts,
>
> -Jeremy
>
> On Sat, Feb 6, 2010 at 9:15 AM, ChadDavis <chadmichaeldavis@gmail.com> wrote:
>> You should try to determine if your node types are actually loaded.
>>
>> On Fri, Feb 5, 2010 at 10:20 PM, Jeremy Norris <jnorris@pattern73.com> wrote:
>>> What is wrong with the following CND definition?  I am trying to
>>> enforce that a node of type Foo contains a node of type Bar.
>>>
>>> ---
>>>
>>> <nt  = 'http://www.jcp.org/jcr/nt/1.0'>
>>> <mix = 'http://www.jcp.org/jcr/mix/1.0'>
>>> <ns = 'uri:ns/v1'>
>>>
>>> [ns:Bar] > nt:base
>>>     mix:created,
>>>     mix:lastModified
>>>   - ns:attr1 (string)
>>>   - ns:attr2 (string)
>>>
>>> [ns:Foo] > nt:base
>>>   + ns:bar (ns:Bar)
>>>
>>> ---
>>>
>>> When I try this, I get the following error:
>>>
>>> org.apache.jackrabbit.commons.cnd.ParseException: Unkown property type
>>> 'ns:Bar' specified.
>>>
>>> (on the last line of the definition).  I'm using jackrabbit 2.0.0 and
>>> importing definitions with
>>> org.apache.jackrabbit.commons.cnd.CndImporter
>>>
>>> Thanks for your help.
>>>
>>
>

Mime
View raw message