cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conal Tuohy <con...@paradise.net.nz>
Subject RE: document() function in Saxon 8.3 under Cocoon 2.1.7
Date Sun, 10 Apr 2005 06:16:43 GMT
Wendell Piez wrote:
> If an image directory were to include width and height of SVGs as well as
> rasters, I'd be in business ... I guess here the caching issues have
> already been addressed. This suggests a solution would be a preprocess
that
> would generate a directory of available SVGs, which I could aggregate.
(But
> how to trigger it, and how to implement?)

Hi Wendell. I think you should look at the XPathDirectoryGenerator. This is
a sub-class of the DirectoryGenerator which allows you to evaluate an XPath
expression inside each document, perhaps something like
"concat(/svg:svg/@width, ', ', /svg:svg/@height)"

http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/generation/XPathDirec
toryGenerator.html

Otherwise, there's also a more long-winded but more flexible way, where you
transform the result of the DirectoryGenerator to produce xi:include
elements pointing at a pipeline which extracts image metrics from a file,
and use the xinclude transformer to perform the inclusions, thereby calling
that extraction pipeline once for each file.

Cheers

Con


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message