Skip to main content
March 23, 2007
Question

Multiple XSL's from one XML?

  • March 23, 2007
  • 2 replies
  • 309 views
So I've got this XML file pointing to an XSL stylesheet, and its working great (client-side goin' on here), and yet I begin to wonder about the efficiency improvements (since I took data from 3 HTML pages, and coded it as one XML file) if you can only apply one XSL stylesheet to one XML file. Kinda defeats the purpose if you have to write two more XML files for two more XSL stylesheets, eh? Then I'd be left with 6 files where I started with 3, and the same management nightmare. Anyone have a solution to this perplexity, cause it doesn't seem like its been solved easily in the forums here or anywhere I can find on the Web. I'm thinking maybe conditionals, but I'm not sure where to go from there. Thanks in advance!
This topic has been closed for replies.

2 replies

March 30, 2007
I'm going to need a little more detail. I have very little ASP experience. Are you saying to use the <xsl:include> tag in the individual XSL Stylesheets to pull only the data I want from the XML file? That's the idea. I've already got different repeat areas setup in three different XSL files, each pulling different areas of the XML file. But then, how would I direct the browser to display the correct XSL file to begin with, when the original call to display it is just a link to the XML file, which can only push out one of the XSL files to the viewer?
Inspiring
March 23, 2007
You could use the <xsl:include> tag to include common elements. Much in the
same way as it's done in ASP.

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004