This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: include and import description


At 2002-01-28 21:53 +0000, Khalid wrote:
>Can some one please shed some light on include and import,

These stylesheet maintenance facilities are considered only at the time the 
stylesheet is read by the XSLT processor, and everything in this area is 
finished before the source XML is examined in any way.

>what I was thinking I could do with either one of those was on these lines
>
>some function(){

I'm assuming you mean a template here, and not a function, since XSLT isn't 
used as an imperative programming language.

>  print some stuff
>  print some more stuff
>  call include or import here and get them print some
>  stuff

This is an inappropriate use of <xsl:include> or <xsl:import> ... if you 
look at the Recommendation you will see they are only top-level constructs.

>  and then print some more stuff here
>}
>
>Is it possible to get functionality on the above lines?

Using <xsl:call-template> will add to the result tree the processed 
template as defined by a named <xsl:template>.

I hope this helps.

................. Ken


--
Upcoming: 3-days XSLT/XPath and/or 2-days XSLFO - Feb 18-22, 2002

G. Ken Holman                mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
ISBN 0-13-065196-6                        Definitive XSLT & XPath
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-07-1               Practical Formatting Using XSLFO
XSL/XML/DSSSL/SGML/OmniMark services, books(electronic, printed),
articles, training(instructor-live,Internet-live,web/CD,licensed)
Next public training:  02-02-11,12,14,15,18,21,03-04,05,06,08,11,
-                                04-08,09,10,12,05-14,15,06-04,07


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]