forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernhard Huber <berni_hu...@a1.net>
Subject [RT] LinkTranslator Usage (Sitemap woes and semantic linking)
Date Sun, 15 Dec 2002 02:12:27 GMT
hi,

i was following the discussion about Cocoon CLI, and about links
now i checked the sources of LinkTranslator and its usage
inside of Cocoon.

I was having a problem about serving content as html, and as
wml.
Generating wml, or html content from an xml document was
no real problem thanks to sitemap, xslt.
But linking of the document was not that obvious.

Originally i was using inside of the documents
<link href="index.html">, but as i was implementing the wml
stuff i releaized that i once should have
<link href="index.html">, and <link href="index.wml"> for the
wml stuff, as link/@href was transformed in the xslt stylesheets
site2html.xsl, or site2wml.xsl.

Inspired by the schema/protocol discussiion i now
use <link href="page:index"/>.

An action named "link-map-translator" sets the Constants.LINK_OBJECT
table of the objectModel to a table which returns
for an href "page:index" index.html, or index.wml depending
on the extension of the Action src extension values.

The contract i was implementing:
A browser requests index.html, hrefs of the form page:XXX
are translated due to the requested page extension '.html'
to XXX.html, ditto for index.wml is translated to XXX.wml.

This way i write now xml documents which can be published
for html, or wml

I was not aware of the possibilities of LinkTranslator,
although it is used in  CocoonCLI/FileSavingEnvironment.

hope it helps in understanding Cocoon "hidden" features a
bit better.

bye bernhard


Mime
View raw message