Re: [Styling and Layout] new use case added: Lists, Outline Lists

Hi Jean,

I would prefer to separate two things: the use case description and the technical discussion.

As far as the use case description is concerned, I think I understand now what you describe as a requirement for publishers. And I guess what is needed is just to make it much more explicit in the use case description, essentially by saying there what you say here in this email... 

For the technical part: my knowledge of HTML and CSS is way inferior to some others in this group who are also part of the CSS WG, but I hope they will bear with me:-) With this caveat: as far as I understand, the HTML work does not say anything whatsoever on the way <ol> and <ul> are presented, ie, with numbering or not, hierarchy or not. All these things are pushed into the realm of CSS. There is a default CSS style sheet that is supposed to be used by all the browsers (at least conceptually; I presume it is hardcoded somewhere), and which directs which elements are inline or block, that there is an item numbering or not, etc. This default style sheet for CSS 2.1 is at [1], and I do not know whether there is one already for CSS 3. This approach provides a clear conceptual separation between HTML and CSS, and I believe the HTML WG's approach is: if it can be done through CSS, if it is 'presentation', then it is not the HTML WG's business.

Well, it may well be that we would need an extended default style sheet for publishers! Such a style sheet should (probably) be defined by IDPF, and would include the features you are referring to (and probably others). I played a little bit with the previous example, and I came up with a simple code (based on the one that is on the web):

<!DOCTYPE html>
<html>
  <head>
    <style>
      ol[idpf-type='hierarchy'] { counter-reset: item }
      ol[idpf-type='hierarchy'] ol { counter-reset: item }
      ol[idpf-type='hierarchy'] li { display: block }
      ol[idpf-type='hierarchy'] li:before { content: counters(item, ".") " "; counter-increment: item }
    </style>
  </head>
  <body>
    <p>Hierarchical list</p>
    <ol idpf-type="hierarchy">
      <li>one</li>
      <li>two
        <ol>
          <li>two.one</li>
          <li>two.two</li>
          <li>two.three</li>
        </ol>
      </li>
      <li>three 
        <ol>
           <li>three.one
            <ol>
              <li>three.one.one</li>
              <li>three.one.two</li>
            </ol>
           </li>
           <li>three.two</li>
        </ol>
      </li> 
      <li>four</li>
    </ol>
    <p>Normal list</p>
    <ol>
      <li>one</li>
      <li>two
        <ol>
          <li>just one</li>
          <li>just two</li>
        </ol>
      </li>
    </ol>   
  </body>
</html>

If the style sheet was separated _and would be part of a default Reading System style sheet_ then, I believe, you would get exactly what you want: the publisher would use the @idpf-type with the 'hierarchy' value, and the rest is up to the Reading System.

In other words, there is probably no reason to extend HTML for this; it actually would not be enough, because the default HTML style sheet would have to be updated as well to ensure what you would like to have (see above). But, beyond that, unless this is proven to be a major feature request outside the publishing community, then I think the approach of having a Reading System default style sheet makes much more sense, because it is really in the control of the community that really needs it, namely the publishing community.

What do you think?

Ivan



[1] http://www.w3.org/TR/CSS21/sample.html



 


On 17 Dec 2013, at 14:34 , Jean Kaplansky <Jean.Kaplansky@aptaracorp.com> wrote:

> Ivan -
> 
> The problem is that we have to go to CSS to construct a hierarchical list in the first place. Publishers don’t want that. They want a way to distinctly separate the markup for an ordinary list <ol> from an outline (which could be an entirely new element, or <ol> with some sort of type attribute indicating that it is an outline) where the numbering is automatically supplied by the UA, but is still intrinsic to the meaning of the list – a true hierarchical outline. 
> 
> I don’t think this use case starts with the CSS group. It should start with the HTML group where the markup can be modeled effectively. UA’s can then use browser default CSS to support the markup.
> 
> However the HTML group decides to go, there should be markup treated by the UA such that individual list items are always marked with a concatenation of their own marker + all ancestors’ markers in the UA with no extra CSS necessary on the part of the author.
> 
> I can go work on the wording of the use case to clarify this.
> 
> Please let me know any further questions/comments.
> 
> Thanks,
> Jean
> 
> From: Ivan Herman <ivan@w3.org>
> Date: Tuesday, December 17, 2013 at 3:26 AM
> To: Jean Kaplansky <jean.kaplansky@aptaracorp.com>
> Cc: DPUB <public-digipub-ig@w3.org>, Bert Bos <bert@w3.org>
> Subject: Re: [Styling and Layout] new use case added: Lists, Outline Lists
> 
> Jean,
> 
> I would need a clarification.
> 
> When using CSS, there is a fairly well working 'idiom' to build hierarchical numbering of list elements. A nice example I found is:
> 
> http://jsfiddle.net/qGCUk/4/
> 
> But I presume you guys know that:-)
> 
> Do I understand it well that what the requirement is is to be able to define that declaratively, without the necessity to build the CSS structure as above? First of all, I believe the use case should emphasize this, because the current text suggests that this is not possible with CSS (which is not true). Also... I think we will have a hard time convincing the CSS folks about the validity of that specific requirement when a mechanism already exists and is well established (I cc Bert explicitly to draw his attention:-), ie, we would need some stronger arguments.
> 
> Ivan
> 
> 
> On 17 Dec 2013, at 01:37 , Jean Kaplansky <Jean.Kaplansky@aptaracorp.com> wrote:
> 
>> http://www.w3.org/dpub/IG/wiki/UseCase_Directory#Lists
>> Goes to
>> http://www.w3.org/dpub/IG/wiki/Lists
>> Where I have added a use case for Outline Lists that Tzviya and I discussed last week. It occurred to us that only the most rudimentary outline lists are currently supported in HTML5 with UA defaults and CSS. We can certainly use CSS to imply more specific outlining scenarios, but publishers, especially STM and legal publishers, often distinguish between regular ordered lists and highly specific outlines. For example, many hierarchical outline concatenate list item numbers based on point in hierarchy, so you could have  list with items 1.1, 1.2, 1.3, or 1.a, 1.b, 1.c. Right now, there’s no OOTB way to do this in HTML5 without building custom CSS to imply the hierarchy.
>> Please let Tzviya or I know any questions about this use case.
>> Thanks,
>> Jean Kaplansky
>> Digital Content Solutions Architect, Aptara
>> Invited Expert Member  l  W3C Digital Publishing Interest Group
>> Task Force Lead  l  W3C Digital Publishing MathML/STM Interest Group
>> Member  l  IDPF Indexing and Open Annotations EDUPUB Working Groups,
>> BISG Content Structure Committee, STC, and SSP
>> jean.kaplansky@aptaracorp.com
>> +1.518.487.9670
>> Skype: JeanKaplansky
>> Twitter: @JeanKaplansky
>> <04503480-0856-4E40-B984-E9E64C468C2E[105].png>
> 
> 
> ----
> Ivan Herman, W3C
> Digital Publishing Activity Lead
> Home: http://www.w3.org/People/Ivan/
> mobile: +31-641044153
> GPG: 0x343F1A3D
> FOAF: http://www.ivan-herman.net/foaf
> 
> 
> 
> 
> 
> 


----
Ivan Herman, W3C 
Digital Publishing Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
GPG: 0x343F1A3D
FOAF: http://www.ivan-herman.net/foaf

Received on Tuesday, 17 December 2013 15:27:37 UTC