[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Multiple independent XSLT transforms applied to on

Subject: RE: Multiple independent XSLT transforms applied to one XML file.
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Tue, 30 Apr 2002 20:51:33 +0100
xslt multiple transforms
You can generally achieve this by using xsl:import. By writing your
transformations as a set of template rules to be applied to particular
elements, and keeping the rules for each DTD in a separate stylesheet
module, you can assemble a composite stylesheet that contains all the rules
for the composite document using xsl:import.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Fabricio
> Chalub
> Sent: 30 April 2002 19:47
> To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'
> Subject:  Multiple independent XSLT transforms applied to one XML
> file.
>
>
> I have asked this question on a mailing list of a specific
> XSLT application
> (Cocoon) to see if I can solve my problem using that.
>
> It may be the case that there is already a generic solution
> to this problem,
> using 'pure' XSLT constructs, which is better than the
> specific solution
> using Cocoon.  So I guess I might try send you my question too.
>
> The simple question is:
>
> 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:
>
> <site>
>   <people>
>     <person>
>
>       [whatever]
>
>     </person>
>   </people>
> </site>
>
> And suppose I have a XSLT that transforms into a complete
> HTML page, like:
>
> <html><body>
> <ul>
> <li>[whatever]</li>
> </ul>
> </body></html>
>
> OK.  Now suppose that I have another DTD that defines a
> specific class of
> person, a teacher, that I want to mantain separately:
>
> <teacher>
>   <name>John S.</name>
>   <class>Biology</class>
> </teacher>
>
> 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:
>
> <page>
>   <people>
>     <person>
>
> 	<!-- this using is the teacher DTD -->
>       <teacher>
>         <name>John S.</name>
>         <class>Biology</class>
>       </teacher>
> 	<!-- this using is the teacher DTD -->
>
>     </person>
>   </people>
> </page>
>
> Naturally, I want to generate a complete HTML of the above
> output using both
> transformations.
>
> 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.
>
> Is there any way to do this without using a specific implementation?
>
> Thanks!
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.