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

RE: conditional inclusions

Subject: RE: conditional inclusions
From: Dylan Walsh <Dylan.Walsh@xxxxxxxxxx>
Date: Wed, 1 Nov 2000 09:55:30 -0400 (EST)
RE: conditional inclusions
Apologies if I'm wrong, but there may be some confusion on your part. If you
wish to use *data* in other files as the source of your transformation, you
use the document() function. There is more on this function in the FAQ or
Michael Kays book (an essential purchase, by the way). On the other hand,
import or include are used in XSL *to bring in other XSL*. Your use of the
".xml" suffix in your examples suggests you want to bring in data.

If in fact you are trying to bring in XSL code, the following may be
helpful: Both xsl:include or xsl:import must be top level elements in the
XSL file (as an aside, they differ only in the way they handle import
precedence). Therefore they cannot be part of a conditional construct as
they must be children of the xsl:stylesheet element (or its synonym
xsl:transformation), and you cannot put them in an xsl:choose or xsl:if.

The approach I have used in a recent project is to *unconditionally* import
all the other stylesheets, and use them *conditionally*. So the correct
template(s), once imported, are invoked inside conditional statements using
xsl:apply-templates or xsl:call-template.


> -----Original Message-----
> From:	Ronald [SMTP:ronald@xxxxxxxxxxx]
> Sent:	Tuesday, October 31, 2000 1:19 PM
> To:	xsl-list@xxxxxxxxxxxxxxxx
> Subject:	conditional inclusions
> 
> Hi there,
> can one of you guys explain to us something we call "conditional
> inclusions".
> say what?
> let me try to explain our problem.
> Let's say I have an XMl file which has an element such as:
> <include url="file.xml"/>
> This file would be part of the "input tree".
> You would probably say that xsl:include would do the trick, yes but that's
> not my question.
> We want to make these inclusions conditional, and than work on that result
> tree




 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.