RE: [xsl] xml-stylesheet p.i. and other options

Subject: RE: [xsl] xml-stylesheet p.i. and other options
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Mon, 24 Jun 2002 11:33:06 +0100
(sorry to join thread half-way through)

When serving xml over the web, the limitations of hard-coding a
stylesheet using the pi are obvious.  To get around this, you can point
to a function instead that will decide which stylesheet to serve with
the xml, based on the info available.  As far as I can tell, this method
works fine - so I dont really understand the discussion about the merits
of the pi stylesheet (other than its use as a learning aid).

Now a good use of the stylesheet pi would be if you could call a
function directly, something like:

<?xml-stylesheet
href="http://www.mysite.com/getStyleSheet('thisxmlfilename')"?>

...which would return a path pointing to a stylesheet (and because it
was instigated from the browser, I guess you get all the browser info as
well (?) ). 

Just to help everyone through Monday- A friend I work with had some xml
data all using the same xsl (wd-xsl as it happens) with a hard coded
stylesheet link in the pi.  When he discovered he needed to use a
separate 'print' stylesheet, he realised he was a bit stuck.  

The solution he used was to write the xml to a temp file, search the
file for its stylesheet pi, change it to 'print.xsl', save it and then
run that (!)

Suffice to say, we now use proper (or praapper for any cornishmen out
there) xslt and no longer rely on the xml-stylesheet pi.

cheers
andrew

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/2002
 

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


Current Thread