OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook] Whatever happened too CSS+XML?


> The bulk of this thread hasn't been docbook specific Peter.

Exactly.

For modern user agents, it does not make a whole lot of difference whether the storage format (DocBook XML) is served directly to the user agent, filtered and decorated somewhat but still DocBook, or transformed to XHTML; the CSS would be very similar.

If your storage format contains too much, too little, or information in an inappropriate order, of course you'd want to apply an XSLT transformation before serving the document.

Also, you might want to generate indices and resolve olinks etc. before serving the document.

But essentially, the same mechanism is at work, whether the user agent parses and builds a DOM tree from an XHTML instance (i.e., excluding quirks-mode tag soup) or a DocBook instance.

The main difference being that you can rely on some build-in CSS for XHTML elements, while for DocBook XML, you'd need CSS rules for all elements. And sometimes a bit of JavaScript to munge the DOM tree.

For many DocBook elements, the representing XHTML element could carry the generic identifier (element name) of the original element as the value of the class attribute.

An XHTML <p> matches the user agent's build-in CSS rule for <p> (p: { display: block; }). While you can get away with that, you might, in general, still want to provide a bit more 'semantic goodness', <p class="para tit tat">. A 'DocBook XHTML CSS' can now match one of the tokens in the class attribute value, p.para { whatever; }, or the general form: p[class~="para"] { whatever; }.

The corresponding 'DocBook XML CSS' would need to include a bit more basic styling: para, simpara { display: block; whatever; }. 

My main concern serving DocBook XML directly would not be the user agent, but rather interoperability with the rest of the World Wide Web. I suspect that a lot of infrastructure depends on HTML markup. But then again: you don't have to believe in Web 2.0 hype in order to feel that we can do better.

Kind regards
Peter Ring

> -----Original Message-----
> From: Dave Pawson [mailto:davep@dpawson.co.uk]
> Sent: 11. november 2005 18:38
> To: Peter Ring
> Subject: RE: [docbook] Whatever happened too CSS+XML?
> 
> 
> On Fri, 2005-11-11 at 17:56 +0100, Peter Ring wrote:
> > > > - mean clean lean XHTML that accurately represent
> > > (in whose opinion?)
> > > >   the rendering *intention* 
> > > of whom?
> > 
> > Well, TDG should be taken into account :)
> 
> 
> > A CSS stylesheet for 'lean clean mean' XHTML wouldn't be 
> much different. 
> > Some elements are inherently block, inline, list-item or whatever,
> 
> Docbook elements or more generally?
> If the latter I'd assume some local interpretation?
> 
> The bulk of this thread hasn't been docbook specific Peter.
> 
> regards DaveP
> 
> 
> 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]