forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Libre, i18n, <meta> tags (Re: Code cosmetics)
Date Tue, 15 Apr 2003 15:51:16 GMT
On Tue, Apr 15, 2003 at 02:57:01PM +0200, Marc Portier wrote:
> 3. Vaguely related: part of the code in scratchpad putting this 
> on the agenda is the Libre stuff, since we have the site.xml 
> there seems to be a number of new reasons to revive this thing 
> (generation of that file for larger sites seems like a quick win?)

Yes. I don't think we've scratched the possibilities of a comprehensive
auto-generated metadata listing (site.xml) for a site.

For example, say we add a <meta> tag to doc-v11, and allow things like:

<meta name="language" value="en|de|fr|..."/>

So index_en.xml contains value="en", index_de.xml has value="de", etc.

Libre uses these to add a @language attribute to each site.xml node:

<index href="Index" href="index_en.html" language="en">
<index href="Das Index :)" href="index_de.html" language="de">
<index href="!@#$%^&*" href="index_cn.html" language="cn">

Then in a live Cocoon, we could get the same site in different
languages, simply by filtering site.xml for //*[@language='X'].

Using this principle, we could filter on any metadata:

 - Say Cocoon uses <meta name="cocoon-version" value="2.0 | 2.1 | 2.x"/>
   to indicate which version of Cocoon a doc applies to.  We can use this info
   to generate either a 2.0 site or a 2.1 site from the same source.  For
   example, to get a 2.1 site, filter site.xml for
   //*[@cocoon-version='2.1'] || //*[@cocoon-version='2.x']
   Where pages applicable to both 2.0 and 2.1 are marked '2.x'.

 - We can store a file's 'last modified' date in a meta tag with:
   <meta name="last-modified" value="$Date: 2001/05/01 04:19:52 $"/>

   Then we can filter site.xml based on date: "show me all files edited
   in the last 2 weeks".

> But maybe that usage would rather push it into an Ant Task then a 
> Cocoon Generator?

Don't think so.

> Not to mention the fact that "we should ditch this code if there 
> is no usage for it" (and better do that before people think I've 
> parked it over here for you to maintain)
> So bluntly: Do we see usage? If yes, please elaborate and let's 
> get to it, I'ld like to get in do-mode 'round this.

AFAIK Libre is the best we have for rounding up metadata into a single
file.  I've just never gotten around to seriously using it.


> regards,
> -marc=

View raw message