And one point about roundtripping...

I think exported document view docs should either :
- contain type information AND definition;
- do not contain the node type definition, only the node type information (ie. 
this node is of type ns:myType).

In first case, the nodes can be imported in a repository like this :
- existing node type definitions are simply ignored if identical, and raises a 
ConflictException if the XML one differs from the repository one;
- not existing node types are created (provided namespaces exist - same 
mechanism)

In second case, try to import nodes in the repository, checking them against 
the existing node types. If one node type is not in the repository, simply 
raise an exception and stop the import.

But anyway I cannot see why you want to add some repository as extra 
properties. This is the kind of silent behaviour problem-generating. See the 
roundtrippind example.

Better a choice between 2 or 3 strcit options, raising errors if not respected, 
without silent behaviours. 

What's your feeling?

Frédéric Esnault - Ingénieur R&D

-----Message d'origine-----
De : Jukka Zitting [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 8 juin 2007 16:15
À : [email protected]
Objet : Re: JCR-325 - multivalued properties in doc view export

Hi,

On 6/8/07, Frédéric Esnault <[EMAIL PROTECTED]> wrote:
> Well first I think an error is better than a JCR exporting silently an 
> erroneous
> document, but this is my opinion.

The JCR spec actually gives some leeway to implementations on what to
include in docview exports, so AFAIUI we're not actually producing
erroneous documents. But you're right in that the current solution is
suboptimal. Perhaps we should restore the feature to export
multivalued properties and throw an exception if someone attempts to
import such a document.

> Then it puts me into trouble because the system view correctly exports the
> multivalued properties, but on import it gives me the error :
>
> {http://www.jcp.org/jcr/mix/1.0}referenceable: already contained in primary 
> node type
>
> No idea why it's complaining about this?

Hmm, I'll need to check the code. If it's coming from the import code
then we may need to change that.

BR,

Jukka Zitting

Reply via email to