You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by qMax <qm...@mediasoft.ru> on 2005/02/01 08:09:15 UTC
Tree DocumentIdToPathMapper
I want to mix branch documents with leaf documents.
This requires to implement DocumentIdToPathMapper which is able to
distinguish leaves from branches somehow.
Ideally, this should be dependant on doctype, but it's unavailable
before doc path.
Can such TreeDocumentIdToPathMapper use sitetree to store type of document node ?
Or what else solution is possible ?
--
qMax
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: Tree DocumentIdToPathMapper
Posted by Andreas Hartmann <an...@apache.org>.
qMax wrote:
[...]
> Why it is impossible to store doctype in sitretree nodes ?
> They are mirror all document motions anyway.
> Wouldn't it be more optimal doctype resolving mechanizm ?
This is not possible because the sitetree is optional and therefore
the doctype resolving mechanism has to be independent from the
sitetree.
Additionally, storing the doctype should not be a responsibility of
the site management component. The doctype is rather a property of
the document itself than of the site structure definition.
> Well, if you consider that sitetree should deal with doctype,
> there could be node attribute like leave="true" to denote
> non-branch documents.
What is the purpose of the distinction between leaves and branches?
That you can't add child nodes to leaves?
> I probably confused in understanding why branching is not property of
> sitetree, but of doctype at creation stage and of publication at whole at lookup
> stage.
I agree. The leaf/branch distinction did already exist when there
was no notion of a sitetree in Lenya. In 1.4, it would certainly
make sense to transfer the leaf/branch responsibility to the site
management component. I don't like the connection between doctype
and "leaf/branch" issue either.
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re[2]: Tree DocumentIdToPathMapper
Posted by qMax <qm...@mediasoft.ru>.
Tuesday, February 1, 2005, 2:28:22 PM, andreas@apache.org wrote:
AH> qMax wrote:
>> I want to mix branch documents with leaf documents.
>> This requires to implement DocumentIdToPathMapper which is able to
>> distinguish leaves from branches somehow.
>> Ideally, this should be dependant on doctype, but it's unavailable
>> before doc path.
>>
>> Can such TreeDocumentIdToPathMapper use sitetree to store type of document node ?
>> Or what else solution is possible ?
AH> In Lenya 1.2, a doctype-dependent DocumentIdToPathMapper is virtually
AH> impossible to implement. (well, it is possible, but that would mean
AH> knowledge duplication of the doctype resolving mechanism).
AH> Of course you could maintain a mapping of document IDs to document
AH> types, but that would have to be updated when you add / remove / move
AH> a document. And it is not conform to the Lenya doctype resolving.
Why it is impossible to store doctype in sitretree nodes ?
They are mirror all document motions anyway.
Wouldn't it be more optimal doctype resolving mechanizm ?
Well, if you consider that sitetree should deal with doctype,
there could be node attribute like leave="true" to denote
non-branch documents.
I probably confused in understanding why branching is not property of
sitetree, but of doctype at creation stage and of publication at whole at lookup
stage.
AH> Would you mind giving an example of what you want to achieve?
AH> Maybe there is a more elegant solution.
I'll post it to user-list, if could not find any solution.
--
qMax
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: Tree DocumentIdToPathMapper
Posted by Andreas Hartmann <an...@apache.org>.
qMax wrote:
> I want to mix branch documents with leaf documents.
> This requires to implement DocumentIdToPathMapper which is able to
> distinguish leaves from branches somehow.
> Ideally, this should be dependant on doctype, but it's unavailable
> before doc path.
>
> Can such TreeDocumentIdToPathMapper use sitetree to store type of document node ?
> Or what else solution is possible ?
In Lenya 1.2, a doctype-dependent DocumentIdToPathMapper is virtually
impossible to implement. (well, it is possible, but that would mean
knowledge duplication of the doctype resolving mechanism).
Of course you could maintain a mapping of document IDs to document
types, but that would have to be updated when you add / remove / move
a document. And it is not conform to the Lenya doctype resolving.
Would you mind giving an example of what you want to achieve?
Maybe there is a more elegant solution.
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org