forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: Include mechanism for forrest...
Date Sat, 15 Oct 2005 19:32:58 GMT
Erik Brakkee wrote:
> Hi,
> 
> 
> I have made a simple extension to Forrest for including files. It is 
> based on the existing xinclude support in Forrest but is
> a bit more user friendly. Detailed motiviation and instructions can be 
> found at
> 
>   
> http://wamblee.org/forrest-extensions/index.html#Download+and+installation
> 
> Right now it is implemented through the project sitemap.xmap file, but 
> perhaps an include mechanism like this could be provided
> by a future version of forrest out of the box.

I don't actually see the need for this, your justification for using 
this instead of XInclude is:

1  Adding XInclude elements to your document breaks the DTD so that you 
can no longer validate your documents.
2 XInclude requires either full path names of files or files relative to 
the root of the site. Unfortunately, the existing link rewriting in 
Forrest generates links relative to the current file.
3 Typically you do not want to include the full contents of anothert 
Xdoc document but only the content of the body tag. Using Xinclude 
directly requires an author to write non-trivial XML with xpointer 
expressions.

Let me address each point:

1) Since the XInclude elements are in a different namespace you can 
still validate your documents

2) XInclude allows you to use any legal protocol in defining your URL. 
This means you can use cocoon:, site: and ext: in 0.7 and can ad lm: to 
that list in 0.8-dev Therefore you don't even need to know the name of 
the file, just how to access it. Since this information is already 
located somewhere in your site (for example, in site.xml) then you have 
no problem forming a URL that is usable.

3) XInclude allows you to select parts of a document using XPath 
statements. This means you can include any part of the document you can 
specifcy with an XPath expression.

see 
http://cocoon.apache.org/2.1/userdocs/transformers/xinclude-transformer.html 
for more information on the XInclude transformer.

Am I misunderstanding the problem your extension is addressing, or do we 
just need to document the XInclude features better?

Ross

Mime
View raw message