You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Steven Noels <st...@outerthought.org> on 2002/03/17 16:36:10 UTC

Proposal: alternative for book.xml

I've been looking into book.xml, looking for a replacement which is less
linked to the idea of generating static document collections. I've
baptised my alternative 'sitemap', a name which is bound to be changed
due to prior art, but the best name I could come up with so far.

What I have so far is a XML Schema proposal - I want to throw it in the
group for feedback. The idea is that each project provides a
sitemap.xml, which can be manually authored as-is for the entire site
structure, or the result of doing some sort of directory traversal. We
could have some sort of SitemapDirectoryGenerator which generates such a
document, checking whether there are sitemap.xml in a directory that
override the default sequence.

I haven't put any comments in the Schema, yet, so here goes:

- sitemap: pretty obvious
- node: a node contains other nodes or leafs (for filesystem based
structures, this would be a directory, but I choose a more generic name
with e.g. Xindice-backed document collections in mind)
- leaf: a document resource
- import: specifies which sitemap.xml should be imported in this
location (we could also do this using XInclude)
- external: provision for externally linked resources

Creating a stylesheet that transforms this document structure to a tree
navigation or a 'yahoo-path' is fairly trivial.

One thing I'm not to happy with is the use of output-media dependent URI
attributes on node and leaf:

  <leaf label="Home" uri="index.html"/>

This obviously will cause problems when generating other-than-HTML
output.

The idea basically is that we should be able to create such a sitemap
document for each kind of resource.

Anyway, here goes as a first proposal: fire at will!

</Steven>

RE: Proposal: alternative for book.xml

Posted by Steven Noels <st...@outerthought.org>.
For the less Schema-inclined, here is a more or less equivalent DTD for
the same grammar:

<!ELEMENT sitemap (node | (leaf | external | import))*>
<!ELEMENT node (node | (leaf | external | import))*>
<!ATTLIST node
  label CDATA #REQUIRED
  uri CDATA #REQUIRED
>
<!ELEMENT leaf EMPTY>
<!ATTLIST leaf
  label CDATA #REQUIRED
  uri CDATA #REQUIRED
>
<!ELEMENT external EMPTY>
<!ATTLIST external
  label CDATA #REQUIRED
  uri CDATA #REQUIRED
>
<!ELEMENT import EMPTY>
<!ATTLIST import
  src CDATA #REQUIRED
>

</Steven>