I am not absolutely sure I understand your architecture, but I will give this a go:
* If I merge all the XSL stylesheets via xsl:include or xsl:import into a master.xsl that is in the system, it can't work!! Because, AFAIK, I can't get XSL transformation to do "template match" on nodes of a particular namespace (or can I?).
Yes, XSLT is namespace aware. You can define namespaces prefixes for your namespaces in your stylesheet and match that way. However, I think you can also do this: <xsl:template xmlns:fooBar="http://www.foo.com/bar/1.0" match="fooBar:baz"><xsl:apply-templates/></xsl:template> Would someone else more steeped in XSLT knowledge than I verify this?
* For any request, I don't know what type it is until the response from the real-time server, and can't direct Cocoon to use the correct stylesheet.
Sounds like a custom Transformer to me. I think you could set a pipeline parameter in your Generator denoting which Block this document is from and then have a lookup facility in your Transformer that applies the correct stylesheet for that Block.
Hope this helps, -- Ryan Hoegg ISIS Networks http://www.isisnetworks.net
Niclas Hedhman wrote:
Hi, everyone.
Not sure if this belongs on the users or dev list, but I post it here first.
Problem is a bit hard to explain, but here we go;
I have a system where N people creates Avalon Blocks for Real-time applications (process control). Each Block has a real-time part and a UI part. Each Block re-utilizes a lot of standard JavaBeans, and the collection of JavaBeans used are growing from various 3rd party developers. The system has a Block that can introspect other Blocks, and provide connectivity to the network. It is possibly to retrieve arbitrary objects from the system, by using a simple "name-dot-name" syntax, as in Jakarta Commons BeanUtils. If the JavaBean has a "toXML()" method, that is called when the JavaBean is requested and returned to the client.
Cocoon is used for the UI, and a custom generator takes part of the request URL as the "requested object" in the remote real-time system. It will hence be returned an text/xml document from the real-time system.
Cocoon will transform the XML into HTML via XSL.
Now!! Since there are many independent developers of "real-time content", I have prescribed the use of XML namespaces. Each Block developer is responsible to create the standard/default set of XSL stylesheets, for the new JavaBeans he/she defines.
BUT, I know have an aggregation problem of the Stylesheets that comprises the UI side of things.
* If I merge all the XSL stylesheets via xsl:include or xsl:import into a master.xsl that is in the system, it can't work!! Beacuse, AFAIK, I can't get XSL transformation to do "template match" on nodes of a particular namespace (or can I?).
* For any request, I don't know what type it is until the response from the real-time server, and can't direct Cocoon to use the correct stylesheet.
Does anyone have any idea on this?
Thanks Niclas
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
