[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Associating DSSSL style sheets with documents
-----BEGIN PGP SIGNED MESSAGE----- Jon> Jon Bosak <URL:mailto:bosak@a...> >>>>> In article <199703060017.QAA00505@b...>, Jon >>>>> wrote: Jon> One possible method suggested by James Clark (thank you, James) Jon> is to adopt the convention used by Jade in the absence of the -d Jon> option: replace the extension of the document entity's URL or Jon> file name with .dsl and fetch that. Thus, if a browser fetches Jon> http://docs.sun.com/foo/bar.html Jon> then it should also look for Jon> http://docs.sun.com/foo/bar.dsl Jon> and apply it to bar.html if found. I'll not comment on the merits/demerits of this (many have already done so), but if the protocol is HTTP, it may be worth attempting to get the same document with a different "Accept" header[*]. This would work well with servers like the one I run, where URLs don't necessarily include the ".html" or whatever and the server chooses the best Content-Type. [*] I'm not sure how easy it is to specify Accept in java.net.URL, though. A next level of fallback would be to look for .../foo/index.dsl, perhaps? I can see the heuristics for this getting quite long and complicated - my favoured technique is to use PIs aimed at the renderer, otherwise use a particular element (like LINK in HTML). The nice thing about this is that you can specify several style documents, and have the application choose (it helps if we have some consensus on how to choose): <?XML-STYLE sheet="style1.dsssl" type="text/dsssl" class="paper-a4"> <?XML-STYLE sheet="style2.dsssl" type="text/dsssl" class="screen-color-8bit"> -----BEGIN PGP SIGNATURE----- Version: 2.6.3i Charset: noconv Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface iQB1AwUBMx6jn+dsuUurvcRtAQHXXgL/YMEhsryyGi5kxl2K77Pbzf8Zw/uOomOm +s8iDP3OWCAj8rHvA4g3pWntmgi5kHEwRWNtutI4Nq3prDaCAjtj00tS9R43aA2M xZQ32g8dU575wKZ5uCTbvChq2rsN/jP9 =6OMo -----END PGP SIGNATURE----- xml-dev: A list for W3C XML Developers Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To unsubscribe, send to majordomo@i... the following message; unsubscribe xml-dev List coordinator, Henry Rzepa (rzepa@i...)
|
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
|