Stylesheet Language (Pei Y. Wei)
Date: Fri, 22 Oct 93 14:03:11 -0700
From: (Pei Y. Wei)
Message-id: <9310222103.AA03264@sting.Berkeley.EDU>
Subject: Stylesheet Language

I'm working on a stylesheet library that will hopefully be useful for
all W3 browsers. A prototype is implemented in viola, but before I 
get too far on this-- producing a more formal RFC and stand-alone
library and testing code, I'd like to get people's impression on it. 

Particularly, any problem with the the syntax of the style description

Here is a sample stylesheet:

(HEAD,BODY				fontSize=normal
    (H1					fontSize=largest
    (H2					fontSize=large)
    (A					FGColor=red)
    (BOLD,EMPH,STRONG			fontWeight=bold)
    (I				 	fontSlant=italic)
        (P				fontSlant=italic))
	(LI				numStyle=roman
	    (LI                         numStyle=number
		(LI			numStyle=alpha)
    (FOOTNOTE				fontSize=small

From this stylesheet, you can derive the following information:

* <P> inside of <HEAD> and <BODY> gets fontSize of "normal".
* <P> inside of <ADDRESS> gets italic slant font.
* <P> inside of <FOOTNOTE> gets a "small" font.
* List items in first, second, and third levels are numbered differently.
* Since <BOLD> and <STRONG> look the same, they are succintly lumpped

Note that properties are inherited down the tree, unless overridden.
So, the color information that is specifed at the top is used all over,
except for <H1> which redefines its own colors. 

Having this inheritance behaviour also helps to keep the description
short, as lots of information can be derived by the context in the 
tree structure.

The lone "(P)"s are there to engage the respective <P> tags to be in
those particular contexts. 

A document uses a <LINK REL="STYLE" HREF="URL_to_a_stylesheet">
to associate to a stylesheet. It's an open question as to whether
we should allow multiple stylesheets in a document, and where
this link can be specified (once only, in the <HEAD>?).

-Pei				Pei Y. Wei
				O'Reilly & Associates