Subject: Re: CSS and XSL From: Chris Lilley <chris@xxxxxx> Date: Sun, 14 Feb 1999 19:36:16 +0100 |
"Simon St.Laurent" wrote: > Making CSS style sheets use an XML vocabulary is fine with me. Sure, that bit is trivial: <?xml version="1.0" encoding="UTF-8"?> <css> <import xml:link="simple" href="url" media="list of media"/> <atrule></atrule> <rule selector="css-selector-here"> <declaration property="color" value="red"/> </rule> </css> or even <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE css [ <!ELEMENT css (import|atrule|rule)* > <!ELEMENT import EMPTY > <!ATTLIST import xml:link CDATA #IMPLIED> <!ATTLIST import href CDATA #IMPLIED> <!ATTLIST import media CDATA #IMPLIED> <!ELEMENT atrule EMPTY > <!ELEMENT rule (declaration)* > <!ATTLIST rule selector CDATA #IMPLIED> <!ELEMENT declaration EMPTY > <!ATTLIST declaration property CDATA #IMPLIED> <!ATTLIST declaration value CDATA #IMPLIED> ]> <css> <import xml:link="simple" href="url" media="list of media"/> <atrule></atrule> <rule selector="css-selector-here"> <declaration property="color" value="red"/> </rule> </css> That can be done by anyone in a few minutes.(The DTD was auto generated from the instance; it could cearly be better written (and made a better fit with CSS requirements like all imports coming first) but serves to make the point) > Making every application that allows a local override of those > styles declare an enormous mess of attributes to represent > every possible property seems like a giant waste of time, > processing, and energy. I completely agree > And limiting people to the > style choices that a DTD designer came up with seems to violate the > principles that keep styles/formatting separate from structure. Again, complete agreement. I can only assume thatwe have both completely misunderstood what Paul is actually proposing. > > All I ask is that when CSS is used directly with XML that > >it should align with XML conventions and syntax. It makes > >everyone's life easier. > > Yeah, aligning it is real simple: > > <!ATTLIST myElement > style CDATA #IMPLIED> > > Making it align with _your_ conventions, on the other hand, > is a different matter that makes lots of people's lives much > more complicated. > > We're on the wrong list here - this belongs in CSS-land, not XSL-land. True (and this thread also goes into svg-land) although it probably does no harm to show that a) with the transformation part of XSL, CSS as it stands now can be used with XML without any fumbling around with almost-XML HTML, HTML/CSS flow objects, etc b) "lets convert CSS into XML" is either trivial (resulting merely in total incompatibility with the installed base) or a massive complication that severely reduces current functionality, depending on the precise meaning of "convert" and whether the XML you are converting into also contains the document instance or not. -- Chris XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: CSS and XSL, Jelks Cabaniss | Thread | Re: CSS and XSL, Chris Lilley |
Re: CSS and XSL, Jelks Cabaniss | Date | RE: CSS and XSL, Didier PH Martin |
Month |