Subject: RE: [xsl] xml-stylesheet p.i. and other options From: "Chris Bayes" <chris@xxxxxxxxxxx> Date: Mon, 24 Jun 2002 12:27:08 +0100 |
> (sorry to join thread half-way through) > Ditto > 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')"?> Or in other words <?xml-stylesheet href="http://www.mysite.com/gimmeAStylesheet.xxp" media="WAP" ?> gimmeAStylesheet.xxp of course has access to the xml file name user agent etc. > > ...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 (!) Well if he had done it properly he would have used the media="print" pseudo attribute There is nothing stopping you having 20 xml-stylesheets if you want all with different media types. Ciao Chris XML/XSL Portal http://www.bayes.co.uk/xml XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] xml-stylesheet p.i. and o, Andrew Welch | Thread | RE: [xsl] xml-stylesheet p.i. and o, Hunsberger, Peter |
Re: [xsl] get rid of decimals, Jarkko . Moilanen | Date | [xsl] general gripe - html output, Andrew Welch |
Month |