You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Piroumian Konstantin <KP...@protek.com> on 2002/05/24 12:02:57 UTC

RE: [RT] XSL structure across projects -- was -->Re: HTML/CSS and graphics

> From: Robert Koberg [mailto:rob@koberg.com] 
> 
> Hi folks,
> 
> Steven Noels wrote:
> 
> >On Thu, 23 May 2002, Robert Koberg wrote:
> >
> >  
> >
> >>>If they can create their own XSLT, perhaps there should be 
> >>>xml-apache-rules (already in place?) about xsl:include vs. 
> xsl:import 
> >>>and/or using a priority attribute on a template rule to 
> override the 
> >>>base set of XSL.
> >>>      
> >>>
> >
> >We should be cautious on xsl:import/include since this 
> conflicts with 
> >stylesheet caching... same with the document() function - to 
> be avoided if 
> >possible. Think about this before choosing a direction.
> >
> 
> I have been looking for a way to use componetized XSLTs without 
> include/import. I see how Forrest uses book2menu which does an inital 
> transformation producing a new result which is then 
> transformed again. 
> Is this considered the correct way to handle component XSLT?
> 
> Someone on the user list suggested that I use a pipeline to aggregate 
> the XSLT, is there an example or thread you can point me to (I cannot 
> find info and can't find it in my hacking)?

Are you looking for something like this?
...
	<map:transform src="cocoon:/dynamic/document.xsl" />
...
<map:match pattern="dynamic/*.xsl">
	<map:aggregate element="xsl:stylesheet">
		<map:part src="book.xsl" />
		<map:part src="{1}.xsl" />
	</map:aggregate>
	<map:serialize type="xml" />
</map:match>

Can't say way, but I don't like the dynamic stylesheet idea. Could you
elaborate more on how this can be better then include/import or pipelined
transformation?

> 
> At this time, I am seeing this as a perfect job for include 
> or import. I 
> assume the problem is that it is considered combining concerns. But 
> performing multiple transformations, all the while producing 
> new XML for 
> the next transformation seems confusing, especially if there were 
> several XSLT components.

Not much. You can combine multiple formats by converting them to something
intermediate before using a stylesheet for HTML rendering. This is a very
often used technic and one of the main features in Cocoon.

Konstantin

> 
> I must be missing something. What is the best (Forrest) way to bring 
> together component XSLT?
> 
> thanks for any info,
> -Rob
>