You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Edgar Merino <do...@gmail.com> on 2008/11/19 03:35:00 UTC

Adding jcr:mixinTypes="mix:referenciable" to document view xml

Hello,

   I'm trying to add the jcr property jcr:mixinTypes to a document view 
XML, however it always fails with the following exception:

   The prefix "jcr" for attribute "jcr:mixinTypes" associated with an 
element type "blogEntry" is not bound.: The prefix "jcr" for attribute 
"jcr:mixinTypes" associated with an element type "blogEntry" is not bound.


This is an example of an xml I'm trying to import with this:

<blogEntry someAttribute="ss" jcr:mixinTypes="mix:referenceable">
   <comment title=""/>
</blogEntry>

What am I doing wrong? thank you,

Regards
Edgar Merino

Re: Adding jcr:mixinTypes="mix:referenciable" to document view xml

Posted by Edgar Merino <do...@gmail.com>.
Thank you Alessandro, worked perfectly.

Edgar Merino


Alessandro Bologna escribió:
> This probably fails at the XML parsing step (before that JR has even a 
> chance to do anything with it) because it's not valid XML.
> Try adding the namespace for the prefix jcr and it will work:
>
> <blogEntry someAttribute="ss" jcr:mixinTypes="mix:referenceable"
>     xmlns:jcr="http://www.jcp.org/jcr/1.0">
>     <comment title=""/>
> </blogEntry>
>
> Alessandro
>
>
> On Nov 18, 2008, at 9:35 PM, Edgar Merino wrote:
>
>> Hello,
>>
>>  I'm trying to add the jcr property jcr:mixinTypes to a document view 
>> XML, however it always fails with the following exception:
>>
>>  The prefix "jcr" for attribute "jcr:mixinTypes" associated with an 
>> element type "blogEntry" is not bound.: The prefix "jcr" for 
>> attribute "jcr:mixinTypes" associated with an element type 
>> "blogEntry" is not bound.
>>
>>
>> This is an example of an xml I'm trying to import with this:
>>
>> <blogEntry someAttribute="ss" jcr:mixinTypes="mix:referenceable">
>>  <comment title=""/>
>> </blogEntry>
>>
>> What am I doing wrong? thank you,
>>
>> Regards
>> Edgar Merino
>
>


Re: Adding jcr:mixinTypes="mix:referenciable" to document view xml

Posted by Alessandro Bologna <al...@gmail.com>.
This probably fails at the XML parsing step (before that JR has even a  
chance to do anything with it) because it's not valid XML.
Try adding the namespace for the prefix jcr and it will work:

<blogEntry someAttribute="ss" jcr:mixinTypes="mix:referenceable"
	xmlns:jcr="http://www.jcp.org/jcr/1.0">
	<comment title=""/>
</blogEntry>

Alessandro


On Nov 18, 2008, at 9:35 PM, Edgar Merino wrote:

> Hello,
>
>  I'm trying to add the jcr property jcr:mixinTypes to a document  
> view XML, however it always fails with the following exception:
>
>  The prefix "jcr" for attribute "jcr:mixinTypes" associated with an  
> element type "blogEntry" is not bound.: The prefix "jcr" for  
> attribute "jcr:mixinTypes" associated with an element type  
> "blogEntry" is not bound.
>
>
> This is an example of an xml I'm trying to import with this:
>
> <blogEntry someAttribute="ss" jcr:mixinTypes="mix:referenceable">
>  <comment title=""/>
> </blogEntry>
>
> What am I doing wrong? thank you,
>
> Regards
> Edgar Merino