You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Robert Goene <ro...@goene.nl> on 2004/10/23 14:02:49 UTC

Using metadata in navigation

L.s,

I would like to incorporate certain metadata elements in some navigation 
components. Is there a standard way of achieving this in Lenya, for 
instance by expanding the information contained in the sitetree?

The alternative would be opening all documents that are present in the 
sitemap and extracting the information i am looking for. I don't think 
this is a very elegant option, because the navigation components will be 
used on every page. Is there a possibility that caching the xslt would 
solve this obvious performance burden? The number of documents contained 
in the sitemap is not very high and will only change once a week.

I would love any advice, pointers to possible solutions and experiences 
with familiar topics.

Regards,

Robert Goene

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Robert Goene <ro...@goene.nl>.
Rolf Kulemann wrote:
> On Sat, 2004-10-23 at 18:13, Rolf Kulemann wrote:
> 
>>On Sat, 2004-10-23 at 18:04, Robert Goene wrote:
>>...
>>
>>>I think i must agree on the opinion that the non-existence of the 
>>>metadata repository is indeed a large drawback. Possibly even a reason 
>>>not to work with Lenya after all..
>>
>>Unfortunately, but
>>
>>1.) we are going to change this in 1.4
>>2.) You can help to improve the situation, if you want :)

Well, i would like to. But we would have to agree on this issue first:) 
Maybe you can convince me of my misunderstanding, because i don't see 
why the sitemap is the wrong place.

>>
>>
>>>I am aware of my naive understanding on Lenya's architecture, but is the 
>>>sitemap not a very nice place to store a user-defined selection of the 
>>>metadata? 
>>
>>Mhhh, my understanding is that metadata is closely related to real
>>documents somehow....IMHO the sitemap is the wrong place, but is maybe
>>useful for a workaround.
> 
> 
> Mhh, did you mean sitemap or sitetree?
> 

Yep. Sorry...


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Sat, 2004-10-23 at 18:13, Rolf Kulemann wrote:
> On Sat, 2004-10-23 at 18:04, Robert Goene wrote:
> ...
> > 
> > I think i must agree on the opinion that the non-existence of the 
> > metadata repository is indeed a large drawback. Possibly even a reason 
> > not to work with Lenya after all..
> 
> Unfortunately, but
> 
> 1.) we are going to change this in 1.4
> 2.) You can help to improve the situation, if you want :)
> 
> > 
> > I am aware of my naive understanding on Lenya's architecture, but is the 
> > sitemap not a very nice place to store a user-defined selection of the 
> > metadata? 
> 
> Mhhh, my understanding is that metadata is closely related to real
> documents somehow....IMHO the sitemap is the wrong place, but is maybe
> useful for a workaround.

Mhh, did you mean sitemap or sitetree?

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Sat, 2004-10-23 at 18:04, Robert Goene wrote:
...
> 
> I think i must agree on the opinion that the non-existence of the 
> metadata repository is indeed a large drawback. Possibly even a reason 
> not to work with Lenya after all..

Unfortunately, but

1.) we are going to change this in 1.4
2.) You can help to improve the situation, if you want :)

> 
> I am aware of my naive understanding on Lenya's architecture, but is the 
> sitemap not a very nice place to store a user-defined selection of the 
> metadata? 

Mhhh, my understanding is that metadata is closely related to real
documents somehow....IMHO the sitemap is the wrong place, but is maybe
useful for a workaround.

Maybe it's worth to wwrite some java code and/or flow like I did. There
is some API support for metadata. Have a look at the ResourcesManager
etc. It's used in the flow file I referred to.

> This would make the need for a database less urgent and does, 
> imho, fit in the current architecture. I assume there has been a 
> discussion on this issue amongst the developers. 

Dunno.

> ...
> Thanks for your support. I will probably have some more questions or 
> even opinions on this one.

You are welcome :)

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Mon, 2004-10-25 at 10:36, Andreas Hartmann wrote:
> Rolf Kulemann wrote:
> > On Sat, 2004-10-23 at 19:26, Rolf Kulemann wrote:
> 
> [...]
> 
> > Or better
> > 
> > -------------------------------------------
> > |     Lenya  Repo abstraction Layer API    |
> >      ----------------------------------
> > |    | Jack  Rabbit JCR implementation|    |
> >      ----------------------------------
> > |     JDBC Database access| Filesystem     |
> > -------------------------------------------
> 
> This is a very interesting point that has to be addressed
> soon (-> lenya-dev)? The question is if we need such an
> abstraction layer on top of JCR and, if yes, what it should
> look like.

IMHO a thin layer on top JCR is maybe needed to get more application
specific functionality e.g. workflow is a good candidate. As already
stated out JCR is similiar to JDBC. Should mean access is standardized,
but we need a data model our application (Lenya) is acting on.

Dunno. Let's wait after we got 1.2.1 out.

> 
> I'm looking forward to hearing your opinions.

ATM I'm stuck with 1.2.1 release. Help is appreciated here.

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Andreas Hartmann <an...@apache.org>.
Rolf Kulemann wrote:
> On Sat, 2004-10-23 at 19:26, Rolf Kulemann wrote:

[...]

> Or better
> 
> -------------------------------------------
> |     Lenya  Repo abstraction Layer API    |
>      ----------------------------------
> |    | Jack  Rabbit JCR implementation|    |
>      ----------------------------------
> |     JDBC Database access| Filesystem     |
> -------------------------------------------

This is a very interesting point that has to be addressed
soon (-> lenya-dev)? The question is if we need such an
abstraction layer on top of JCR and, if yes, what it should
look like.

I'm looking forward to hearing your opinions.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Sat, 2004-10-23 at 19:26, Rolf Kulemann wrote:
> On Sat, 2004-10-23 at 19:13, Rolf Kulemann wrote:
> > On Sat, 2004-10-23 at 19:07, Rolf Kulemann wrote:
> > > On Sat, 2004-10-23 at 18:48, Jean Pierre LeJacq wrote:
> ...
> > > > 
> > > > The main point is that a database won't solve any problems...
> > > 
> > > Using a database, however the abstraction is implemented, ensures the
> > > ACID principle at no cost.
> > > 
> > > A: Atomic
> > > C: Consistency
> > > I: Isolation
> > > D: Durability iirc
> > > 
> > > Not using a DB as the underlying technology would mean to implement ACID
> > > from scratch = PITA (Pain In the Ass)
> > 
> > /me is joking now
> > 
> > ACID and PITA form up a quite funny spectrum
> > 
> > ACID <-------------------------------------- Lenya ------> PITA
> 
> Ok, my idea is as follows:

Or better

-------------------------------------------
|     Lenya  Repo abstraction Layer API    |
     ----------------------------------
|    | Jack  Rabbit JCR implementation|    |
     ----------------------------------
|     JDBC Database access| Filesystem     |
-------------------------------------------

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Sat, 2004-10-23 at 19:13, Rolf Kulemann wrote:
> On Sat, 2004-10-23 at 19:07, Rolf Kulemann wrote:
> > On Sat, 2004-10-23 at 18:48, Jean Pierre LeJacq wrote:
...
> > > 
> > > The main point is that a database won't solve any problems...
> > 
> > Using a database, however the abstraction is implemented, ensures the
> > ACID principle at no cost.
> > 
> > A: Atomic
> > C: Consistency
> > I: Isolation
> > D: Durability iirc
> > 
> > Not using a DB as the underlying technology would mean to implement ACID
> > from scratch = PITA (Pain In the Ass)
> 
> /me is joking now
> 
> ACID and PITA form up a quite funny spectrum
> 
> ACID <-------------------------------------- Lenya ------> PITA

Ok, my idea is as follows:


-------------------------------------------
|     Lenya  Repo abstraction Layer API    |
--------------------------------------
|     Jack  Rabbit JCR implementation|     |
--------------------------------------
|     JDBC Database access| Filesystem     |
-------------------------------------------

Or sth. like that.

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Jean Pierre LeJacq <jp...@quoininc.com>.
On Sat, 23 Oct 2004, Rolf Kulemann wrote:

> /me is joking now
>
> ACID and PITA form up a quite funny spectrum
>
> ACID <-------------------------------------- Lenya ------> PITA

Excellent!  Maybe we should keep this on our home page as our
"themometer" of how your donation is helping lenya mature.

-- 
JP



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Sat, 2004-10-23 at 19:07, Rolf Kulemann wrote:
> On Sat, 2004-10-23 at 18:48, Jean Pierre LeJacq wrote:
> > On Sat, 23 Oct 2004, Robert Goene wrote:
> > 
> > > >>Lenya has a repository.  Its xml file based and not transaction
> > > >>safe.  You can query it by file name and xpath.
> > > >
> > > > Well....as far as a filesystem can be treated as a repository.
> > > > A bicycle with squares as wheels is of course a vehicle...
> > >
> > > I agree, ofcourse :)
> > 
> > Sure, this was a bit tongue in check :-)
> > 
> > The main point is that a database won't solve any problems...
> 
> Using a database, however the abstraction is implemented, ensures the
> ACID principle at no cost.
> 
> A: Atomic
> C: Consistency
> I: Isolation
> D: Durability iirc
> 
> Not using a DB as the underlying technology would mean to implement ACID
> from scratch = PITA (Pain In the Ass)

/me is joking now

ACID and PITA form up a quite funny spectrum

ACID <-------------------------------------- Lenya ------> PITA

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Sat, 2004-10-23 at 19:20, Jean Pierre LeJacq wrote:
> On Sat, 23 Oct 2004, Rolf Kulemann wrote:
> 
> > Using a database, however the abstraction is implemented, ensures the
> > ACID principle at no cost.
> >
> > Not using a DB as the underlying technology would mean to implement ACID
> > from scratch = PITA (Pain In the Ass)
> 
> I agree that a DB would help tremendously here, but a database
> doesn't guarantee application level ACID.  Anytime a application
> level transaction spans multiple database level transactions, or a
> app transaction involves both files and databases, or multiple
> databases, etc.

You are absolutely right imho. It sounds to me we have to face a real
serious and non trivial problem. Couldn't things be easier? I guess no.
I hope we will find an acceptable solution.

Stay tuned...bzzzd.

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Jean Pierre LeJacq <jp...@quoininc.com>.
On Sat, 23 Oct 2004, Rolf Kulemann wrote:

> Using a database, however the abstraction is implemented, ensures the
> ACID principle at no cost.
>
> Not using a DB as the underlying technology would mean to implement ACID
> from scratch = PITA (Pain In the Ass)

I agree that a DB would help tremendously here, but a database
doesn't guarantee application level ACID.  Anytime a application
level transaction spans multiple database level transactions, or a
app transaction involves both files and databases, or multiple
databases, etc.

-- 
JP



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Sat, 2004-10-23 at 18:48, Jean Pierre LeJacq wrote:
> On Sat, 23 Oct 2004, Robert Goene wrote:
> 
> > >>Lenya has a repository.  Its xml file based and not transaction
> > >>safe.  You can query it by file name and xpath.
> > >
> > > Well....as far as a filesystem can be treated as a repository.
> > > A bicycle with squares as wheels is of course a vehicle...
> >
> > I agree, ofcourse :)
> 
> Sure, this was a bit tongue in check :-)
> 
> The main point is that a database won't solve any problems...

Using a database, however the abstraction is implemented, ensures the
ACID principle at no cost.

A: Atomic
C: Consistency
I: Isolation
D: Durability iirc

Not using a DB as the underlying technology would mean to implement ACID
from scratch = PITA (Pain In the Ass)

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Sat, 2004-10-23 at 18:48, Jean Pierre LeJacq wrote:
> On Sat, 23 Oct 2004, Robert Goene wrote:
> 
> > >>Lenya has a repository.  Its xml file based and not transaction
> > >>safe.  You can query it by file name and xpath.
> > >
> > > Well....as far as a filesystem can be treated as a repository.
> > > A bicycle with squares as wheels is of course a vehicle...
> >
> > I agree, ofcourse :)
> 
> Sure, this was a bit tongue in check :-)
> 
> The main point is that a database won't solve any problems (well
> transactions would be) unless there's a good object model with an
> API to isolate the database.  Then it doesn't matter what the
> backend repository is.

Yes, yes, I agree. However we should start to hunt the Rabbit named Jack
very soon.

http://incubator.apache.org/jackrabbit/

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Jean Pierre LeJacq <jp...@quoininc.com>.
On Sat, 23 Oct 2004, Robert Goene wrote:

> >>Lenya has a repository.  Its xml file based and not transaction
> >>safe.  You can query it by file name and xpath.
> >
> > Well....as far as a filesystem can be treated as a repository.
> > A bicycle with squares as wheels is of course a vehicle...
>
> I agree, ofcourse :)

Sure, this was a bit tongue in check :-)

The main point is that a database won't solve any problems (well
transactions would be) unless there's a good object model with an
API to isolate the database.  Then it doesn't matter what the
backend repository is.

-- 
JP



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Robert Goene <ro...@goene.nl>.
Rolf Kulemann wrote:
> On Sat, 2004-10-23 at 18:23, Jean Pierre LeJacq wrote:
> 
>>On Sat, 23 Oct 2004, Robert Goene wrote:
>>
>>
>>>Rolf Kulemann wrote:
>>>
>>>
>>>>That is more a hack but should point you in the right direction or at
>>>>least shows you the problematic. That is why we sooo need a good somehow
>>>>database backed repository, which supports querying those metadata
>>>>without opening all metadata files, which are attached to each content
>>>>document.
>>>
>>>I think i must agree on the opinion that the non-existence of the
>>>metadata repository is indeed a large drawback. Possibly even a reason
>>>not to work with Lenya after all..
>>
>>Lenya has a repository.  Its xml file based and not transaction
>>safe.  You can query it by file name and xpath.
> 
> 
> Well....as far as a filesystem can be treated as a repository.
> A bicycle with squares as wheels is of course a vehicle...
> 
> :)

I agree, ofcourse :)

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Sat, 2004-10-23 at 18:23, Jean Pierre LeJacq wrote:
> On Sat, 23 Oct 2004, Robert Goene wrote:
> 
> > Rolf Kulemann wrote:
> >
> > > That is more a hack but should point you in the right direction or at
> > > least shows you the problematic. That is why we sooo need a good somehow
> > > database backed repository, which supports querying those metadata
> > > without opening all metadata files, which are attached to each content
> > > document.
> >
> > I think i must agree on the opinion that the non-existence of the
> > metadata repository is indeed a large drawback. Possibly even a reason
> > not to work with Lenya after all..
> 
> Lenya has a repository.  Its xml file based and not transaction
> safe.  You can query it by file name and xpath.

Well....as far as a filesystem can be treated as a repository.
A bicycle with squares as wheels is of course a vehicle...

:)

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Robert Goene <ro...@goene.nl>.
Rolf Kulemann wrote:
> On Sat, 2004-10-23 at 18:35, Robert Goene wrote:
> ...
> 
>>Sorry, replace(sitemap, sitetree);, as i have said; i'm still very naive
>>
>>I agree with the fact that the metadata should be in the documents. I do 
>>not agree with the fact that the data should not be accessible anywhere 
>>else. Just like the document names are accessible in the sitetree and in 
>>the document itself, this could also be the case for other metadata. If 
>>you agree with me that the title is metadata, i do think the selection 
>>of the metadata that is accessible in the sitetree should be made 
>>pragmatically.
> 
> 
> As JP already stated, accessing the meta data is possible, maybe you
> should follow my and JP's hints :)
> 

I will, i will... Ofcourse, i have no idea if my initial concerns will 
turn out to be a problem. I'll just try. Thanx.

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Sat, 2004-10-23 at 18:35, Robert Goene wrote:
...
> > 
> 
> Sorry, replace(sitemap, sitetree);, as i have said; i'm still very naive
> 
> I agree with the fact that the metadata should be in the documents. I do 
> not agree with the fact that the data should not be accessible anywhere 
> else. Just like the document names are accessible in the sitetree and in 
> the document itself, this could also be the case for other metadata. If 
> you agree with me that the title is metadata, i do think the selection 
> of the metadata that is accessible in the sitetree should be made 
> pragmatically.

As JP already stated, accessing the meta data is possible, maybe you
should follow my and JP's hints :)

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Andreas Hartmann <an...@apache.org>.
Rolf Kulemann wrote:
> On Mon, 2004-10-25 at 10:43, Andreas Hartmann wrote:
> 
>>Robert Goene wrote:
>>
>>>Jean Pierre LeJacq wrote:
>>>
>>
>>[...]
>>
>>
>>>Sorry, replace(sitemap, sitetree);, as i have said; i'm still very naive
>>>
>>>I agree with the fact that the metadata should be in the documents. I do 
>>>not agree with the fact that the data should not be accessible anywhere 
>>>else.
>>
>>W3C + Cocoon provide a simple way to access this:
>>
>>
>>1) sitetree
>>
>>2) -> [XSLT to add XInclude tags]
>>       sitetree + XInclude
>>
>>3) -> [XInclude]
>>       sitetree incl. meta data
>>
>>4) -> [XSLT]
>>       navigation component incl. meta data
>>
>>
>>I guess you are aware of that, I just wanted to summarize.
> 
> 
> A problem might be, that when publishing pages, some stuff from the
> sitetree is not copied from authoring to live area.
> 
> Maybe this is OT here.

I think so :)
This has to be taken care of nevertheless.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Mon, 2004-10-25 at 10:43, Andreas Hartmann wrote:
> Robert Goene wrote:
> > Jean Pierre LeJacq wrote:
> > 
> [...]
> 
> > Sorry, replace(sitemap, sitetree);, as i have said; i'm still very naive
> > 
> > I agree with the fact that the metadata should be in the documents. I do 
> > not agree with the fact that the data should not be accessible anywhere 
> > else.
> 
> W3C + Cocoon provide a simple way to access this:
> 
> 
> 1) sitetree
> 
> 2) -> [XSLT to add XInclude tags]
>        sitetree + XInclude
> 
> 3) -> [XInclude]
>        sitetree incl. meta data
> 
> 4) -> [XSLT]
>        navigation component incl. meta data
> 
> 
> I guess you are aware of that, I just wanted to summarize.

A problem might be, that when publishing pages, some stuff from the
sitetree is not copied from authoring to live area.

Maybe this is OT here.

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Andreas Hartmann <an...@apache.org>.
Robert Goene wrote:
> Jean Pierre LeJacq wrote:
> 
[...]

> Sorry, replace(sitemap, sitetree);, as i have said; i'm still very naive
> 
> I agree with the fact that the metadata should be in the documents. I do 
> not agree with the fact that the data should not be accessible anywhere 
> else.

W3C + Cocoon provide a simple way to access this:


1) sitetree

2) -> [XSLT to add XInclude tags]
       sitetree + XInclude

3) -> [XInclude]
       sitetree incl. meta data

4) -> [XSLT]
       navigation component incl. meta data


I guess you are aware of that, I just wanted to summarize.


With Lenya 1.2, this is the way to go IMHO. When serving dynamic
pages, caching should be used for performance reasons.

A possible approach is

- store the output of step (3) or (4) using the SourceWritingTransformer
- use ResourceExistsSelector to generate/read the cached XML
- delete the cached XML on each sitetree/metadata operation

Maybe in 1.4 the world looks different, but not yet.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Jean Pierre LeJacq <jp...@quoininc.com>.
On Sat, 23 Oct 2004, Robert Goene wrote:

> Jean Pierre LeJacq wrote:
>
> > Why do you say the data is not accessible anywhere else?  I may
> > be misunderstanding your point here, but its trivial to get to
> > the meta-information.  For example, I have a transformer that
> > generates
>
> Sorry, 'accessible' is not the correct term. 'Stored' would be the
> correct one. I understand that the metadata is accessible from
> anywhere but i am worried about both the performance and the
> flexibility of this approach, especially in a navigation component
> that will be used a lot.

Oh, I see.  I agree that there a performance considerations but
these must be balanced against coherence of the object model and
coupling.  Also, performance problems can be solved in any number of
ways that don't necessarily require reducing the model coherence
(caching for example).


> Could you pinpoint me to the code that generates the sitetree? I
> am very curious to see if my idea is possible at all and to see
> what the implications will be.

The main functionality is provided by a Java sitetree class.
However, its not very pretty at this point.  It provides facilites
for adding/removing nodes and traversing the tree.  You should be
able to extend it fairly easily.

-- 
JP



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Robert Goene <ro...@goene.nl>.
Jean Pierre LeJacq wrote:
> On Sat, 23 Oct 2004, Robert Goene wrote:
> 
> 
>>I agree with the fact that the metadata should be in the
>>documents. I do not agree with the fact that the data should not
>>be accessible anywhere else. Just like the document names are
>>accessible in the sitetree and in the document itself, this could
>>also be the case for other metadata. If you agree with me that the
>>title is metadata, i do think the selection of the metadata that
>>is accessible in the sitetree should be made pragmatically.
> 
> 
> Why do you say the data is not accessible anywhere else?  I may be
> misunderstanding your point here, but its trivial to get to the
> meta-information.  For example, I have a transformer that generates
> a sitemap (not the cocoon concept but a page in the web site that
> shows all the other pages).  This is implemented by walking the
> sitetree file and for each file, get the title and description.  I
> use DOM but this is also possible in xslt using the document
> function and xpath, something like this:
> 
>   select="document(afile.xml)/xhtml:html/xhtml:head/dc:title"
> 

Sorry, 'accessible' is not the correct term. 'Stored' would be the 
correct one. I understand that the metadata is accessible from anywhere 
but i am worried about both the performance and the flexibility of this 
approach, especially in a navigation component that will be used a lot.

I think that some things could be more easy for the users of lenya and i 
am just exploring the possibilities and the potential problems.

Could you pinpoint me to the code that generates the sitetree? I am very 
curious to see if my idea is possible at all and to see what the 
implications will be.

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Jean Pierre LeJacq <jp...@quoininc.com>.
On Sat, 23 Oct 2004, Robert Goene wrote:

> I agree with the fact that the metadata should be in the
> documents. I do not agree with the fact that the data should not
> be accessible anywhere else. Just like the document names are
> accessible in the sitetree and in the document itself, this could
> also be the case for other metadata. If you agree with me that the
> title is metadata, i do think the selection of the metadata that
> is accessible in the sitetree should be made pragmatically.

Why do you say the data is not accessible anywhere else?  I may be
misunderstanding your point here, but its trivial to get to the
meta-information.  For example, I have a transformer that generates
a sitemap (not the cocoon concept but a page in the web site that
shows all the other pages).  This is implemented by walking the
sitetree file and for each file, get the title and description.  I
use DOM but this is also possible in xslt using the document
function and xpath, something like this:

  select="document(afile.xml)/xhtml:html/xhtml:head/dc:title"

-- 
JP



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Robert Goene <ro...@goene.nl>.
Jean Pierre LeJacq wrote:
> On Sat, 23 Oct 2004, Robert Goene wrote:
> 
> 
>>Rolf Kulemann wrote:
>>
>>
>>>That is more a hack but should point you in the right direction or at
>>>least shows you the problematic. That is why we sooo need a good somehow
>>>database backed repository, which supports querying those metadata
>>>without opening all metadata files, which are attached to each content
>>>document.
>>
>>I think i must agree on the opinion that the non-existence of the
>>metadata repository is indeed a large drawback. Possibly even a reason
>>not to work with Lenya after all..
> 
> 
> Lenya has a repository.  Its xml file based and not transaction
> safe.  You can query it by file name and xpath.
> 
> If designed correctly, a database repository could provide both
> transaction safe operations and possibly a more coherent query
> capability.  But I think the main missing piece from lenya is an API
> that isolates the repository completely.
> 
> 
> 
>>I am aware of my naive understanding on Lenya's architecture, but
>>is the sitemap not a very nice place to store a user-defined
>>selection of the metadata? This would make the need for a database
>>less urgent and does, imho, fit in the current architecture. I
>>assume there has been a
> 
> 
> I assume you mean sitetree instead of sitemap.  For me the sitetree
> should only represent (meta) information about the interrationship
> among the documents that make up a site.  So it depends on what type
> of metainformation you have in mind.  The current lenya model of
> placing the dublin core information with each document is the right
> way to go.
> 

Sorry, replace(sitemap, sitetree);, as i have said; i'm still very naive

I agree with the fact that the metadata should be in the documents. I do 
not agree with the fact that the data should not be accessible anywhere 
else. Just like the document names are accessible in the sitetree and in 
the document itself, this could also be the case for other metadata. If 
you agree with me that the title is metadata, i do think the selection 
of the metadata that is accessible in the sitetree should be made 
pragmatically.

I am not sure what the scope of the repository is that you are talking 
about. I will look in the 'proposals and ideas' section.

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Jean Pierre LeJacq <jp...@quoininc.com>.
On Sat, 23 Oct 2004, Robert Goene wrote:

> Rolf Kulemann wrote:
>
> > That is more a hack but should point you in the right direction or at
> > least shows you the problematic. That is why we sooo need a good somehow
> > database backed repository, which supports querying those metadata
> > without opening all metadata files, which are attached to each content
> > document.
>
> I think i must agree on the opinion that the non-existence of the
> metadata repository is indeed a large drawback. Possibly even a reason
> not to work with Lenya after all..

Lenya has a repository.  Its xml file based and not transaction
safe.  You can query it by file name and xpath.

If designed correctly, a database repository could provide both
transaction safe operations and possibly a more coherent query
capability.  But I think the main missing piece from lenya is an API
that isolates the repository completely.


> I am aware of my naive understanding on Lenya's architecture, but
> is the sitemap not a very nice place to store a user-defined
> selection of the metadata? This would make the need for a database
> less urgent and does, imho, fit in the current architecture. I
> assume there has been a

I assume you mean sitetree instead of sitemap.  For me the sitetree
should only represent (meta) information about the interrationship
among the documents that make up a site.  So it depends on what type
of metainformation you have in mind.  The current lenya model of
placing the dublin core information with each document is the right
way to go.

-- 
JP



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Robert Goene <ro...@goene.nl>.
Rolf Kulemann wrote:
> On Sat, 2004-10-23 at 14:35, Robert Goene wrote:
> ...
> 
>>I want to access existing metadata, like the title or the keywords, in a 
>>menu-like structure, but i also would like to add my own metadata fields 
>>to a CustomDocType and display those fields in this menu. 
> 
> 
> In general this is possible for the current displayed/viewed document.
> Relevant files are for example in the default pub and the xhtml doctype:
> 
> With
> 
> 1.) lenya-1.2.x/build/lenya/webapp/lenya/pubs/default/xslt/xhtml2xhtml
> 
> you could make data available in
> 
> 2.)
> lenya-1.2.x/build/lenya/webapp/lenya/pubs/default/xslt/page2xhtml.xsl
> 
> If you want to do a new doctype e.g. named sometype you must provide 1')
> as
> 
> 1'.)
> lenya-1.2.x/build/lenya/webapp/lenya/pubs/default/xslt/sometype2sometype
> 
> which would make data available in
> 
> 2.)
> lenya-1.2.x/build/lenya/webapp/lenya/pubs/default/xslt/page2xhtml.xsl
> 
> 
> I hope this gives u a pointer. Not sure if I'm 100% right here.
> 
> 
>>I am not sure 
>>how this extra metadata would be edited, i am considering BXE or Cocoon 
>>Forms at the moment, but an even more important issue is the 
>>availability of this data.
>>
>>For example, i would like to show documents that are related to certain 
>>events (movie playings in this case) and display the date of these 
>>events in the menu.
> 
> 
> In this case you would need to grab metadata from other docs as the one
> shown. This is one of Lenya's biggest drwabacks of being database backed
> at least for the metadata. There is also only a rudemntary API which
> provides those infos. In this case look at the Kupu files e.g.
> 
> http://svn.apache.org/repos/asf/incubator/lenya/trunk/src/webapp/lenya/usecases/kupu/usecase-kupu.js
> 
> There a two functions one for link infos and one for image metadata.
> 
> That is more a hack but should point you in the right direction or at
> least shows you the problematic. That is why we sooo need a good somehow
> database backed repository, which supports querying those metadata
> without opening all metadata files, which are attached to each content
> document.
> 
> I hope I could help.
> 

I think i must agree on the opinion that the non-existence of the 
metadata repository is indeed a large drawback. Possibly even a reason 
not to work with Lenya after all..

I am aware of my naive understanding on Lenya's architecture, but is the 
sitemap not a very nice place to store a user-defined selection of the 
metadata? This would make the need for a database less urgent and does, 
imho, fit in the current architecture. I assume there has been a 
discussion on this issue amongst the developers. Could you point me to a 
thread or a wikipage where i can read the different views on this issue?

Thanks for your support. I will probably have some more questions or 
even opinions on this one.

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Sat, 2004-10-23 at 17:52, Rolf Kulemann wrote:
> On Sat, 2004-10-23 at 14:35, Robert Goene wrote:
> ...
> > I want to access existing metadata, like the title or the keywords, in a 
> > menu-like structure, but i also would like to add my own metadata fields 
> > to a CustomDocType and display those fields in this menu. 
> 
> In general this is possible for the current displayed/viewed document.
> Relevant files are for example in the default pub and the xhtml doctype:
> 
> With
> 
> 1.) lenya-1.2.x/build/lenya/webapp/lenya/pubs/default/xslt/xhtml2xhtml
> 
> you could make data available in
> 
> 2.)
> lenya-1.2.x/build/lenya/webapp/lenya/pubs/default/xslt/page2xhtml.xsl
> 
> If you want to do a new doctype e.g. named sometype you must provide 1')
> as
> 
> 1'.)
> lenya-1.2.x/build/lenya/webapp/lenya/pubs/default/xslt/sometype2sometype
> 
> which would make data available in
> 
> 2.)
> lenya-1.2.x/build/lenya/webapp/lenya/pubs/default/xslt/page2xhtml.xsl
> 
> 
> I hope this gives u a pointer. Not sure if I'm 100% right here.
> 
> > I am not sure 
> > how this extra metadata would be edited, i am considering BXE or Cocoon 
> > Forms at the moment, but an even more important issue is the 
> > availability of this data.
> > 
> > For example, i would like to show documents that are related to certain 
> > events (movie playings in this case) and display the date of these 
> > events in the menu.
> 
> In this case you would need to grab metadata from other docs as the one
> shown. This is one of Lenya's biggest drwabacks of being database backed
> at least for the metadata. 

Sorry, I meant "of NOT being database backed...." :)

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Sat, 2004-10-23 at 14:35, Robert Goene wrote:
...
> I want to access existing metadata, like the title or the keywords, in a 
> menu-like structure, but i also would like to add my own metadata fields 
> to a CustomDocType and display those fields in this menu. 

In general this is possible for the current displayed/viewed document.
Relevant files are for example in the default pub and the xhtml doctype:

With

1.) lenya-1.2.x/build/lenya/webapp/lenya/pubs/default/xslt/xhtml2xhtml

you could make data available in

2.)
lenya-1.2.x/build/lenya/webapp/lenya/pubs/default/xslt/page2xhtml.xsl

If you want to do a new doctype e.g. named sometype you must provide 1')
as

1'.)
lenya-1.2.x/build/lenya/webapp/lenya/pubs/default/xslt/sometype2sometype

which would make data available in

2.)
lenya-1.2.x/build/lenya/webapp/lenya/pubs/default/xslt/page2xhtml.xsl


I hope this gives u a pointer. Not sure if I'm 100% right here.

> I am not sure 
> how this extra metadata would be edited, i am considering BXE or Cocoon 
> Forms at the moment, but an even more important issue is the 
> availability of this data.
> 
> For example, i would like to show documents that are related to certain 
> events (movie playings in this case) and display the date of these 
> events in the menu.

In this case you would need to grab metadata from other docs as the one
shown. This is one of Lenya's biggest drwabacks of being database backed
at least for the metadata. There is also only a rudemntary API which
provides those infos. In this case look at the Kupu files e.g.

http://svn.apache.org/repos/asf/incubator/lenya/trunk/src/webapp/lenya/usecases/kupu/usecase-kupu.js

There a two functions one for link infos and one for image metadata.

That is more a hack but should point you in the right direction or at
least shows you the problematic. That is why we sooo need a good somehow
database backed repository, which supports querying those metadata
without opening all metadata files, which are attached to each content
document.

I hope I could help.

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Robert Goene <ro...@goene.nl>.
>>I would like to incorporate certain metadata elements in some navigation 
>>components. Is there a standard way of achieving this in Lenya, for 
>>instance by expanding the information contained in the sitetree?
> 
> 
> Using the sitetree for this is a problem, since the additional
> attributes will not be published to the live are. IMHO, this is PITA and
> should be changed somehow. But other peeps here try to follow a special
> philosophy how the sitetree should be used.
> 
> 
>>The alternative would be opening all documents that are present in the 
>>sitemap and extracting the information i am looking for. I don't think 
>>this is a very elegant option, because the navigation components will be 
>>used on every page. Is there a possibility that caching the xslt would 
>>solve this obvious performance burden? The number of documents contained 
>>in the sitemap is not very high and will only change once a week.
> 
> 
> Mhh, can please describe your usecase in more detail? Sounds to me you
> need to wait for Lenya 1.4 if you need meta data from various pages on
> the page being displayed. I had a similar problem when I implemented the
> Kupu drawers; There I need meta data of all available pages for a
> description list, so that users can choose the right link to
> include....maybe you can use the same code...its in....would need to
> look it up.. :)
>
I want to access existing metadata, like the title or the keywords, in a 
menu-like structure, but i also would like to add my own metadata fields 
to a CustomDocType and display those fields in this menu. I am not sure 
how this extra metadata would be edited, i am considering BXE or Cocoon 
Forms at the moment, but an even more important issue is the 
availability of this data.

For example, i would like to show documents that are related to certain 
events (movie playings in this case) and display the date of these 
events in the menu.

The constraint of selecting documents by their name only seems quite 
large to me and limits the possibilities of the metadata in a large extend.

I would love to see your code that you have used for the integration of 
KUPU. In the worst case, it is helpful for understanding the complexity 
of this problem.

Thanks for your quick reply.

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Using metadata in navigation

Posted by Rolf Kulemann <ro...@apache.org>.
On Sat, 2004-10-23 at 14:02, Robert Goene wrote:
> L.s,
> 
> I would like to incorporate certain metadata elements in some navigation 
> components. Is there a standard way of achieving this in Lenya, for 
> instance by expanding the information contained in the sitetree?

Using the sitetree for this is a problem, since the additional
attributes will not be published to the live are. IMHO, this is PITA and
should be changed somehow. But other peeps here try to follow a special
philosophy how the sitetree should be used.

> 
> The alternative would be opening all documents that are present in the 
> sitemap and extracting the information i am looking for. I don't think 
> this is a very elegant option, because the navigation components will be 
> used on every page. Is there a possibility that caching the xslt would 
> solve this obvious performance burden? The number of documents contained 
> in the sitemap is not very high and will only change once a week.

Mhh, can please describe your usecase in more detail? Sounds to me you
need to wait for Lenya 1.4 if you need meta data from various pages on
the page being displayed. I had a similar problem when I implemented the
Kupu drawers; There I need meta data of all available pages for a
description list, so that users can choose the right link to
include....maybe you can use the same code...its in....would need to
look it up.. :)

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org