Re: Associating DSSSL style sheets with documents

James Clark (jjc@jclark.com)
Thu, 06 Mar 1997 10:24:36 +0700

At 16:17 05/03/97 -0800, Jon Bosak wrote:

>One possible method suggested by James Clark (thank you, James) is to
>adopt the convention used by Jade in the absence of the -d option:
>replace the extension of the document entity's URL or file name with
>.dsl and fetch that. Thus, if a browser fetches
>
> http://docs.sun.com/foo/bar.html
>
>then it should also look for
>
> http://docs.sun.com/foo/bar.dsl
>
>and apply it to bar.html if found.
>
>This is appealingly straightforward, but I wonder how well it
>accommodates multiple stylesheets

A DSSSL specification document can contain any number of distinct style
specifications: it can also contain links to other DSSSL specification
documents.

>and stylesheets that use other
>notations (CSS, for example).

Use another extension.

>James lists some other possibilities:
>
>| - a processing instruction somewhere in the prolog
>|
>| - a catalog entry that says unconditionally to use some DSSSL style
>| sheet
>|
>| - a catalog entry that associates a DSSSL style sheet with the public
>| identifier of a DTD
>|
>| - make the document serve also as a style sheet by making it conform
>| to the DSSSL architecture (this will work with Jade too)

Another possibility I forgot to mention is to have a parameter on the
Content-Type header field:

Content-Type: text/xml; stylesheet=foo.dsl

This is only going to work in the context of HTTP. The type of the
stylesheet could be indicated by its Content-Type, and the client could use
content-type negotiation to ensure it gets the kind of stylesheet it can
handle. Somebody should probably register a MIME content-type for DSSSL
style sheets as well.

James