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

Re: XSLT 2.0 question

Subject: Re: XSLT 2.0 question
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 18 Mar 2002 11:01:28 +0000
external stylesheet xslt
Hi Bryan,

> For many reasons too voluminous to go into here I can't change the
> structure of how stylesheets are run in this app, that is to say the
> main stylesheet needs to be the external one, I don't see anyway
> this could be done from xslt 1.0, although I could prob. construct a
> hack whereby the app reads in the xslt, reads xml document, creates
> a node <xsl:import name=" <<put the name of the xml document
> here>>"/> and then have to do some parameter checking to tell me to
> switch between apply-imports and apply-templates at points in the
> document. sounds awful, is awful, that's why it's called a hack :)
> also introduces the dreaded side effects, not to mention being
> potentially the slowest thing ever. Don't want to do anything with
> side effects, thought there might be some way to achieve it in xslt
> 2.0 without side effects.

There's no way in either XSLT 1.0 or XSLT 2.0 to 'interpret' XSLT
templates on the fly. So as far as I can see, if the stylesheet has to
be the external stylesheet then you have to use that stylesheet to
create an XSLT stylesheet that you can then use on the XML document:

  main stylesheet -> (process) -> created stylesheet
                         ^                |
                         |                v
                    XML document  ->  (process) -> result

The stylesheet that you create using the main stylesheet could simply
import the stylesheet that you want to use for all the documents, and
then include the templates that were defined within the XML document
itself. Essentially, you'd be generating the 'embedded stylesheet'
from the previous example, but it wouldn't actually be embedded.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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-2013 All Rights Reserved.