cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <je...@media.demon.co.uk>
Subject Re: [finally!] The "Infamous" Cocoon Sitemap Proposal
Date Thu, 30 Dec 1999 12:12:03 GMT
On 29/12/99 at 4:07 pm, pier@apache.org (Pierpaolo Fumagalli) wrote:

>> I must admit, it will take me a while to understand fully .....
>
>IT's not that difficult, the basic idea is that Cocoon now behaves more
>like a web server, handling all requests for a specified path. The best
>place to understand how this works is the Servlet 2.2 specification, in
>the "web application" part.


So, let me try a simple example .... :)

I have a set of XML files, for which I need multiple html pages to populate a frameset. Let's
say I want three frames, one for texts, one for a list of references to people, one for a
list of links. All from the same XML file.


<sitemap>

  <process uri="text/*.xml" translate="/home/www/sources/*.xml">
    <producer name="file"/>
    <filter name="xslt">
      <param name="stylesheet" value="/home/www/text.xsl"/>
    </filter>
    <serializer name="html"/>
  </process>

  <process uri="people/*.xml" translate="/home/www/sources/*.xml">
    <producer name="file"/>
    <filter name="xslt">
      <param name="stylesheet" value="/home/www/people.xsl"/>
    </filter>
    <serializer name="html"/>
  </process>

  <process uri="links/*.xml" translate="/home/www/sources/*.xml">
    <producer name="file"/>
    <filter name="xslt">
      <param name="stylesheet" value="/home/www/links.xsl"/>
    </filter>
    <serializer name="html"/>
  </process>

</sitemap>

My frameset could then contain the following links:

    www.foo.bar/text/xyz.xml
    www.foo.bar/people/xyz.xml
    www.foo.bar/links/xyz.xml

This would be bloody marvelous ....
A tad verbose though ;)


One issue I see is that the examples all seem to rely on unix type (standard) file paths.
TBH I don't understand the nuances of Unix file paths, but it would be rotten to have to put
a full paths into the sitemap, when on MacOS for instance this would have to include the volume
name, not good for portability.
Could Cocoon have the concept of a root folder to work from, or am I gloriously missing the
point ;-)

    
Plus, in your example of re-mapping file references, what would happen if you wanted a link
between two XML files to be relative, because they exist in different directories? <link
href="../../thing.xml">thing</link>. 


Or in another situation .... I am using a site-wide link glossary, containing the actual url
references

<links id="siteX">
    <link id="hrc" type="full">
        <ref>http://www.hrc.wmin.ac.uk</ref>
        <title>The HyperMedia Research Centre</title>
    </link>
    <link id="blah" type="rel">
        <ref>blah.xml</ref>
    </link>
</links>

I then include stuff like <link idref="blah"/>,  <link idref="hrc"/>, <link
idref="hrc">alternative name</link> etc.

Then use the XSL to look up the references. 

At what stage in the rendering process does the link re-writing intervene?



regards Jeremy

      ____________________________________________________________________

      Jeremy Quinn                                             media.demon
                                                           webSpace Design
     <mailto:jeremy@media.demon.co.uk>       <http://www.media.demon.co.uk>
      <phone:+44.[0].207.737.6831>          <pager:jermq@sms.genie.co.uk>




Mime
View raw message