cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: [RT] Link Rewriting
Date Tue, 29 Apr 2003 10:09:22 GMT

Jeff Turner wrote, On 29/04/2003 8.50:
...
> Now let me play devils advocate..
> 
...
> What's
> the difference between editing a sitemap.xmap, and editing a linkmap.xml
> file?  Both just map declarators to SystemIds.
> 
> In CVS Forrest, we've organized the sitemap into functional layers:
> 
> LAYER 1       |   (each format or subdir handler in its own sub-sitemap)
> *.xml         |
>    various    |    docv11     faq    howto    docbook   community/*  ....
>    xml types  |       \        |       |         |         /
> -------------------------------------------------------------------------
>                          DOCUMENT-V11 INTERMEDIATE FORMAT
> -------------------------------------------------------------------------
> LAYER 2       |                /       |               \
>  Intermediate |    **body-*.xml     **menu-*.xml      **tab-*.xml
>  HTML formats |               \        |               /
> -------------------------------------------------------------------------
> LAYER 3       |                     \|/       \|/
>   Output      |                   *.html     *.pdf
>   formats     |
> -------------------------------------------------------------------------
> 
...
> In effect, this defines a virtual filesystem of XML sources, completely
> abstracted from the real filesystem. 

Exactly.

...
> So what I'm suggesting is that if your users are sufficiently
> sitemap-savvy, and your sitemap is sufficiently modular, one can have all
> the benefits of your proposed declarator -> XML linkmapping system.  In
> fact it's much more powerful; how could a linkmap file handle a RSS file,
> for example?  You'd need to tweak the sitemap to do the rss2document.xsl
> conversion.

It's about SoC. One part defines the source mapping, the other how to 
process it. I think that he is talking about a scenario where the user 
does not add new types, but can easily configure just the new places 
where to find the sources.

I had committed some time back a refactoring of the sitemap that did 
just that, but you strongly asked to revert it, so... ;-P

So, as I think you also would agree, the important thing is that one 
modularizes the sitemap so that some pieces can remain as-is, and other 
parts can be plugged in/expanded separately in each layer:

  0 - source resolving (for us it's fixed on the filesystem)
  1 - conversion to common source
  2 - processing
  3 - presentation (output)

What I'd like now is to add level 0 for our sitemap if possible.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Mime
View raw message