cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabricio Chalub <>
Subject Multiple independent XSLT transforms applied to one XML file.
Date Tue, 30 Apr 2002 18:29:40 GMT
Hello, I suppose this is the kind of email that possibly reflects a deep
misunderstanding of the basic principles on which Cocoon relies. If that is
the case, just warn me. ;)

The simple question is:

Using Cocoon (possibly through the sitemap), how do I process a XML file
that combines two different DTDs with two *separate* XSLT transforms?  Or
even using a single combined DTD, in which but a part of it goes to one XSLT
file and part is processed by another XSLT file.


The complete question (with examples) is:

Suppose I have a very simple site DTD:




And suppose I have a XSLT that transforms into a complete HTML page, like:


OK.  Now suppose that I have another DTD that defines a specific class of
person, a teacher, that I want to mantain separately:

  <name>John S.</name>

And I have a standard XSLT that transforms this into a HTML fragment, like:

<p><b>Name:</b> John S.</p>
<p><b>Class:</b> Biology</p>.

Now I have a XML file like this, combining both DTDs:


	<!-- this using is the teacher DTD -->
        <name>John S.</name>
	<!-- this using is the teacher DTD -->


Naturally, I want to generate a complete HTML of the above output using both

I also want to keep both XSLT files separate and independent, since I may
want to reuse the XSLT and DTD for the teacher on other parts of my site and
supporting systems.

I really want to do this at the sitemap level on Cocoon.  Is there any way
to do this?  Maybe dinamically merging both XSLT files?

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message