forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <...@outerthought.org>
Subject Re: file: implemented (Re: cvs commit: ...)
Date Tue, 10 Dec 2002 18:07:24 GMT
Jeff Turner wrote:
> On Tue, Dec 10, 2002 at 11:56:20AM -0000, jefft@apache.org wrote:
> 
>>jefft       2002/12/10 03:56:20
>>
>>  Modified:    .        build.xml status.xml
>>               src/resources/conf sitemap.xmap
>>               src/resources/forrest-shbat forrest.build.xml
>>               src/resources/fresh-site/src/documentation/content/xdocs
>>                        sample.xml
>>               src/resources/library/xslt filterlinks.xsl
>>  Added:       src/resources/forrest-shbat/tasks/org/apache/forrest
>>                        UncopiedFileSelector.java
>>               src/resources/fresh-site/src/documentation/content hello.pdf
>>               src/resources/library/xslt filterlinks-html.xsl
>>                        linkutils.xsl
>>  Log:
>>  Add special handling of links that start with 'file:'.
>>  These links are:
>>   1) Not passed on to Cocoon (see filterlinks.xsl)
>>   2) The 'file:' prefix is stripped from the HTML (see filterlinks-html.xsl)
>>   3) All file: links encountered during crawling are recorded in a file,
>>   'unprocessed-files.txt' (see filterlinks.xsl and linkutils.xsl)
>>   4) After running Cocoon, forrest.build.xml copies all files listed in
>>   unprocessed-files.txt to build/site/ manually.  This is achieved with a custom
>>   selector, UncopiedFileSelector.java
> 
> 
I'm still wondering about other ways, and I have some vague 
memory of using a file-exists action before deciding on read or 
skinned pipeline (which would be based on CAP)...

but since this is what we have currently, I'ld like to support it 
  a bit further first

one small question: suppose I take up an 
file:./build/api/index.html would it then also browse over all 
the html that is referenced from there?

> 
> Btw, the seed webapp includes an example of this.  The file
> src/documentation/content/hello.pdf is linked to in samples.xml, with
> <link href="file:hello.pdf">.
> 
> The implementation is pretty ugly.  I found that appending to an external
> file in XSLT is a royal PITA.  It currently works with a Xalan
> <redirect:write> extension.  While XSLT 2.0 (Saxon) implements an
> equivalent <xsl:redirect-document>, it can't append to an existing file.
> I'm currently trying to write a Transformer that records 'file:' links to
> a WriteableSource, to replace all this hacky XSLT.

would you scan all the attributes (e.g. figure/@src as well?)

if you think I (we) could be of help, just check in what you 
already have, and express some direction of thought in there...

> 
> 
> --Jeff
> 

regards,
-marc=
-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
mpo@outerthought.org                              mpo@apache.org


Mime
View raw message