Sylvain Wallez wrote:
> Basically, the purpose was to produce navigation and decoration on a
> hole site composed of a hierarchy of "content" HTML pages. By content, I
> mean that the directory structure reflects the navigation tree, and that
> HTML is not styled. No xdoc DTD, no book.xml to update : just start
> Mozilla composer, write your stuff in wysiwyg mode, save it a the right
> place and it automagically appears in the navigation.
Yeah, exactly what I have done a long-long time ago for the Outerthought
website. I went for XML, though, but the kind of XML which is basically
very HTMLish, and the XSLT copying across all undeclared/unknown
elements verbatim. So I ended up editing XHTML-like files.
Wellformedness is a hard requirement in my book though.
> The navigation tree is obtained by traversing the whole tree (directory
> generator), and getting the tag of every HTML file, which becomes
> the menu entry for that page.
Welcome to the origin of 'yer' which has been repackaged into a Cocoon
generator called 'libre' (mind the pun on 'book'):
Yer traversed directory hierarchies and generates an XML tree
representation out of it. No caching, though, or it must be that Marc
has added this.
> This navigation tree is correlated with the requested URI so that parent
> directories are marked as "in path" and the current page as "requested".
> This allows to display in the tree only the ancestors of the current
> page and their siblings, along with the immediate children of the
> current page. This also allows to easily get the path to the current
> page (breadcrumb ?).
Hehe - how about this collection of URLs which are collated into one page:
All this with only some simple page aggregation (which I consider now to
be deprecated: http://blogs.cocoondev.org/stevenn/archives/000496.html
(didn't survive the Radio->MT conversion very well).) Node hightlighting
and expanding/collapsing done in XSLT as you describe.
How very nice (and comforting) to see the coincidences in our approach.
These were my first (not nearly) serious experiments with Cocoon2, dated
somewhere early 2001. We're getting old :-)
Steven Noels http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org stevenn at apache.org