John Grange wrote:

> I am creating reports (some of which are in pdf) 
> using cocoon as a display engine.  The reports 
> have to be presented differently based upon user 
> preference.  I would like to be able to include 
> a document containing the attribute-sets into my 
> stylesheet which is looked up based on the 
> requesting user.  The information as to where to 
> find the document can be found in the document 
> being transformed and I can populate a variable 
> with the url, but I don't seem to be able to 
> include it into the document, either using 
> xsp:include or xsp:import.

Why not perform the styling as a separate stage in the pipeline? Clearly the report 
layout and styling are separate concerns, so they should be done with 2 distinct XSL 
transformations, one after the other. The first XSLT would create FO elements and 
annotate them with a style name. I suggest using the @role attribute, e.g. 
<fo:block role="heading1">blah</fo:block>)
The second stage would replace these roles with xsl-fo formatting attributes.
http://www.w3.org/TR/xsl/slice7.html#role

> In addition to this, all reports have an 
> exceptions portion, the xsl of which I can write 
> once, if I can persuade cocoon to include it 
> into my xsl file.
>
> I think, if I cannot get xsp:include or 
> xsp:import to work for me, I'm going to have to 

You have a problem with xsl:import? This should work ... tell us what happens.

> write a pipeline which transforms my xsl 
> document, but I'm not sure how to produce xsl 
> from an xsl transformation.

This isn't too hard either. Use the namespace-alias feature in XSLT:
http://www.w3.org/TR/xslt#dt-alias
Here's how to configure your sitemap:
http://wiki.cocoondev.org/Wiki.jsp?page=MetaStylesheets

Good luck

Con

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to