Re: Linking to stylesheets in XML

This is a vote in favour of using attributes rather than processing
instructions (or a linking element) for linking to stylesheets.

At 08:02 19.04.97 +0100, Jon Bosak wrote:
>Method 3: The stylesheet attribute
>... For example:
>   <chapter xml-stylesheet="foo.dsl">
>Unfortunately, this doesn't leave us with any clean way to indicate
>the stylesheet language unless we assume a limited number of them
>(which is not unreasonable):
>   <chapter xml-dsssl="foo.dsl" xml-css="bar.css">
>One senses that a further level of indirection may be needed here.

I propose we use entities, as follows:

     Information processing - Text and office systems -
     Document Style Semantics and Specification Language//EN">

     Cascading Style Sheets//EN">

   <!ENTITY book.dsl    SYSTEM "tei1.dsl" NDATA dsssl-o>
   <!ENTITY chapter.dsl SYSTEM "tei2.dsl" NDATA dsssl-o>
   <!ENTITY book.css    SYSTEM "tei1.css" NDATA css>

   <!ATTLIST book    xml-style ENTITIES "book.dsl book.css">
   <!ATTLIST chapter xml-style ENTITIES "chapter.dsl tei.css">

The notation declarations could be predeclared and implicit in the XML
profile in the same way as the character entities lt, amp, (etc.) are.
That way they wouldn't have to be declared in every document, but there
would still be the possibility of declaring other notations (e.g. Synex,
DynaText, FOSI, etc.)

The attribute values would not have to be specified inside the instance,
unless one wanted to override the defaults on an element-by-element

This solution permits multiple stylesheets in multiple notations at any
level of the element structure.

And I'm sure I don't need to point out that all the declarations required
could be tucked neatly away inside a LINKTYPE declaration (provided one
didn't require the ability to use element-by-element overrides  :-)



Steve Pepper, SGML Architect, <pepper@falch.no>
Falch Infotek a.s, Postboks 130 Kalbakken, N-0902 Oslo, Norway
http://www.falch.no/  tel://+47 2290 2733  fax://+47 2290 2599
"Whirlwind Guide": http://www.falch.no/people/pepper/sgmltool/