[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: xml-stylesheet p.i. and other options
> (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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|