Associating DSSSL style sheets with documents

James Clark jjc at jclark.com
Thu Mar 6 12:39:05 GMT 1997


At 08:15 06/03/97 -0800, Norbert H. Mikula wrote:

>> | - a processing instruction somewhere in the prolog
>
>I think, at least for XML, we don't want to use PIs too often.

In general I agree. But when you specify a style sheet, you surely are
giving an instruction about the processing of the document. If PIs aren't
appropriate for this, what are they good for? Since we have them, why not
use them?

If we allow the PI to occur anywhere in the prolog, then if a user has a
style sheet for some DTD, they can simply add this PI to the DTD, and all
documents conforming to the DTD will automatically use the style sheet.

If you have an SGML system that supports FSIs, you could even have something
like:

PUBLIC "-//...//DTD Docbook//EN" "<literal><?dsssl docbook.dsl><url>docbook.dtd"

and associate the DTD with the stylesheet without changing the DTD.

Other advantages:

- it doesn't require a catalog, so you don't have the problem of finding that;

- it works even for dynamic XML (eg generated on the fly in response to a
query);

- it works both locally and over HTTP.

>> | - a catalog entry that associates a DSSSL style sheet with the public
>> |   identifier of a DTD
>
>Hmm, I think I would like that.

I think this is handy for simple not very customizable DTDs (eg HTML). But I
don't think it's enough just to key of the public id in the doctype
declaration, because sometimes you need to add declarations *after the DTD*,
which means you have to reference the DTD with an entity declaration rather
than in the doctype declaration, eg

<!doctype doc [
<!entity % foo "include">
<!entity % dtd public "...">
%dtd;
<!element funky (%phrase)>
]>

I think you need to have a scheme that considers the public ids of all
external parameter entities referenced in the DTD.

I don't think any single method is adequate by itself.  I think we need two
or three methods that complement each other.  I would also like to have
something that will work equally for SGML and XML.

James








xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa at ic.ac.uk)




More information about the Xml-dev mailing list