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

Re: Application using XML

Subject: Re: Application using XML
From: "Alistair MacDonald" <AlistairMacDonald@xxxxxxxxxxxxx>
Date: Tue, 03 Apr 2001 14:12:34 +0100
macdonald application
=== daniel.newman@xxxxxxxxxxx 04/03/01 01:23PM ===
>I'm planning on building an Internet application using XML. Now I'm going to
>need an ASP page that gets different XML results (that bit's easy), and also
>gets different XSL files to format the XML (that bit's easy also). BUT, if I
>want to have just one XSL file that interprets the source data and uses the
>relevant part of the XSL file. So if I have a maximum of 10 different result
>(xHTML) pages, can I have one XSL file building them?

Yes, so long as there is a mechanism for identifying the different types - be this different XML or parameters.

> Is it possible from
>the ASP page, to pass variables to the XSL file so it knows which page it's
>producing?

Probably - but you would need to check the ASP/XSLT integration documentation. The mechanism for passing parameters is undefined by the w3 - they simply provide support in XSLT for it to happen somehow. (<xsl:param ...> at the top level)

>If I need to have 10 XSL files, fine, but thought this might not be the best
>way of doing this. Although having all that extra code in the single XSL
>file might get confusing. What's the best way to go about planning this
>application?

Generally start by trying to modularise the code somehow. A lot depends upon the data itself - how similar is the XML? Are all the transforms going to behave similarly?  You may find that after you split the code up into sections that you can build 10 driver files which basically import/include other templates, or you may find that you still prefer to build 1 driver and then call the rest of the templates. I prefer the 10 drivers and then override-any-behaviour-of-the-core-modules-I-don't-like-in-the-driver file approach myself. Its simple, clean and makes variations obvious.

Alistair


 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.