Re: Multiple independent XSLT transforms applied to one XML file.
On Tue, 30 Apr 2002, Fabricio Chalub wrote: 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. --- Have you considered using xsl:include or xsl:import in your XSLT stylesheets? You could make one new xslt stylesheet and include/import the two other stylesheets and refer to this new stylesheet in the sitemap. If needed, you could override some templates in the new stylesheet. Have a look at http://www.w3.org/TR/xslt11/#N1316 for more details. Some other links: http://www.webreference.com/xml/column17/ http://www.zvon.org/HTMLonly/XSLTutorial/Books/Book1/bookInOne.html#chapter17 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple independent XSLT transforms applied to one XML file.
Have you considered using xsl:include or xsl:import in your XSLT stylesheets? True, that would be one solution, but I *really* wanted to keep the XSLT files as independent as possible and centralize this kind of configuration on the sitemap (otherwise on the long run I would have dozens of interdependend XSLT files spread around my stylesheet for the site). Of course, if there is no other way, I'll have to stick to it... fc - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple independent XSLT transforms applied to one XML file.
On 30.Apr.2002 -- 03:29 PM, Fabricio Chalub wrote: 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. you can add any number of transformations. just add another transformer line to your pipeline with the second stylesheet. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple independent XSLT transforms applied to one XML file.
you can add any number of transformations. just add another transformer line to your pipeline with the second stylesheet. Thanks! I have tried this and it appears to me that only the last XSLT transform is applied. I guess I am not using the sitemap corretly, then? This is what am I using: map:match pattern= map:redirect-to session=false uri=index/ /map:match map:match pattern=* map:generate src=documents/{1}.xml/ map:transform src=stylesheets/site.xsl / map:transform src=stylesheets/teacher.xsl / [...] Is this the correct way of doing it? fc - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple independent XSLT transforms applied to one XML file.
On 30.Apr.2002 -- 04:17 PM, Fabricio Chalub wrote: you can add any number of transformations. just add another transformer line to your pipeline with the second stylesheet. Thanks! I have tried this and it appears to me that only the last XSLT transform is applied. I guess I am not using the sitemap corretly, then? This is what am I using: map:match pattern= map:redirect-to session=false uri=index/ /map:match map:match pattern=* map:generate src=documents/{1}.xml/ map:transform src=stylesheets/site.xsl / map:transform src=stylesheets/teacher.xsl / [...] Is this the correct way of doing it? Yep, it is. Try putting the log transformer inbetween. Or remove the second transformation and save the output to a file. Use that to feed another pipeline to see if your stylesheets work as expected. Another way would be to use xalan on the command line with your files. The logs should contain a reference to your stylesheets and the xslt transformer. If it doesn't -- send all information that could be usefull to us (albeit minimal). Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple independent XSLT transforms applied to one XML file.
From: Christian Haul [mailto:[EMAIL PROTECTED]] On 30.Apr.2002 -- 04:17 PM, Fabricio Chalub wrote: you can add any number of transformations. just add another transformer line to your pipeline with the second stylesheet. Thanks! I have tried this and it appears to me that only the last XSLT transform is applied. I guess I am not using the sitemap corretly, then? This is what am I using: map:match pattern= map:redirect-to session=false uri=index/ /map:match map:match pattern=* map:generate src=documents/{1}.xml/ map:transform src=stylesheets/site.xsl / map:transform src=stylesheets/teacher.xsl / Sometimes it is useful to have setup like this: map:match pattern=site/* map:generate src=documents/{1}.xml/ map:transform src=stylesheets/site.xsl / /map:match map:match pattern=teacher/* map:generate src=documents/{1}.xml/ map:transform src=stylesheets/teacher.xsl / /map:match map:match pattern=* map:aggregate element=data map:part src=site/{1}/ map:part src=teacher/{1}/ /map:aggregate map:transform src=stylesheets/aggregation-to-whateveryouwant.xsl / /map:match [...] Is this the correct way of doing it? Yep, it is. Try putting the log transformer inbetween. Or remove the second transformation and save the output to a file. Use that to feed another pipeline to see if your stylesheets work as expected. Another way would be to use xalan on the command line with your files. Yep. Vadim The logs should contain a reference to your stylesheets and the xslt transformer. If it doesn't -- send all information that could be usefull to us (albeit minimal). Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]