W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > April 1997

Re: Linking to stylesheets in XML

From: Steve Pepper <pepper@falch.no>
Date: Sun, 20 Apr 1997 13:16:54 +0100
Message-Id: <3.0.32.19970420141643.006b0e3c@falch.no>
To: w3c-sgml-wg@w3.org
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:

   <!NOTATION DSSSL-O  PUBLIC "ISO 10179:1996//NOTATION
     Information processing - Text and office systems -
     Document Style Semantics and Specification Language//EN">

   <!NOTATION CSS      PUBLIC "-//W3C//NOTATION
     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
basis.

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  :-)

Regards,

Steve

--
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/
Received on Sunday, 20 April 1997 09:21:55 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 10:04:25 EDT