- From: Fennell, Philip <philip.fennell@hp.com>
- Date: Mon, 26 Mar 2007 14:56:16 +0100
- To: <www-style@w3.org>
Bert, > I'm not sure it is a good idea to use http://www.w3.org/TR/REC-CSS2/ as your namespace. I this case all the CSS property attributes being created are properties of CSS. Therefore, surely there is no ambiguity here. Regards Philip Fennell -----Original Message----- From: Bert Bos [mailto:bert@w3.org] Sent: 23 March 2007 19:09 To: Fennell, Philip Cc: www-style@w3.org Subject: Re: CSS2, 3.2 Conformance, point 4... Fennell, Philip wrote: > Hello, > > I am in the process of building a CSS 2 processor that takes as input > an XML document and obtains any CSS style sheets referenced by the > xml-stylesheet processing instruction. The processor then parsers the > style sheet(s) and applies the CSS rules to the XML document. The > output is the original XML document with CSS style property attributes > embedded according to the CSS rules. A subsequent process will render > the 'styled' XML document. > > I have a query regarding point 4 of the conformance requirements. > > Where, in point 4, it states that: > > For each element in a document tree, it must assign a value for every > applicable property according to the property's definition and the > rules of cascading and inheritance. > > > Can I take this to mean that in this most simple example: > > Source document > <feed> > ... > </feed> > > Style sheet > feed { > display:block; > color:#000000; > } > > Result document > <feed xmlns:css="http://www.w3.org/TR/REC-CSS2/" css:display="block" > css:color="#000000"> > .... > </feed> > > That every descendant of the 'feed' element will need to carry the > inheritable css:color attribute in order for my implementation to > claim conformance to CSS 2? In principle, yes. There are 100 or so properties in CSS2 and every element in a document has all properties. So in your format every element has 100 attributes (but most attributes will have the same value). Of course, an implementation is free to optimize its memory use, as long as the result is the same. As usual in programming problems, there is a tradeoff between storage and computation. You can probably omit some attributes from your document at the cost of doing more work in the second process to compute what was omitted... Bert PS. I'm not sure it is a good idea to use http://www.w3.org/TR/REC-CSS2/ as your namespace. It is good practice to use a namespace that starts with a domain name that you own. As long as everybody does that, there is little chance that two people use the same namespace for different things. -- Bert Bos ( W 3 C ) http://www.w3.org/ http://www.w3.org/people/bos W3C/ERCIM bert@w3.org 2004 Rt des Lucioles / BP 93 +33 (0)4 92 38 76 92 06902 Sophia Antipolis Cedex, France
Received on Monday, 26 March 2007 13:56:34 UTC