RE: Separating xml and xsl

> To specify the stylesheet (XSL or CSS) in the xml document 
> means that if I want my xml doc to be presented in 'n' 
> different ways, I have to maintain as many copies of the doc 
> as the desired no. of ways in which to present the doc.

I certainly wouldn't recommend maintaining n copies of the source document.
I would recommend either using multiple <?xml-stylesheet?> processing
instructions in the source document (selecting one of them at run time using
its media pseudo-attribute) or simply not using the <?xml-stylesheet?>
mechanism at all - it's not compulsory, and every implementation offers some
other way of processing a source document using an arbitrary stylesheet.
> 
> Would it not be a better idea to leave the xml doc completely 
> unmindful of the stylesheet to be used to present it.

Yes, much better.
 
> Instead, the document that one links to ought to be something 
> that specifies a pair of entries as follows:
> 
> 1. the XML document to present.
> 2. the stylesheet (CSS or XSL) used to present the document.
> 
You can implement such a mechanism easily enough, and it could become part
of the XML Processing Model that people are now discussing, but it certainly
won't be part of XSLT.

Mike Kay
(a personal response)

Received on Friday, 25 January 2002 16:10:16 UTC