Re: [whatwg] [HTML5] Named start values for lists?
Now that you have touched this topic, let me remind you of the problem of parallel texts in multilingual documents, sort of (ill-formed) table ol colspan=2 tr td li horse td li Pferd tr td li table td li Tisch /ol /table Of course, it is not appropriate for interleaved linguistic publications but it is often used in legal documents. AFAIK, there is no way to express it in HTML at present. Nor in Microsoft Word, at least without stepping over semantics (if we can talk about semantics in Word documents at all). I do not have current expertise with other DPS. Best regards, Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Hickson Sent: Friday, November 09, 2007 5:23 AM To: WHAT WG List Subject: Re: [whatwg] [HTML5] Named start values for lists?
Re: [whatwg] [HTML5] Named start values for lists?
On Mon, 26 Jun 2006, dolphinling wrote: HTML5 brings back the |start| attribute on ordered lists. This allows a list to semantically start with a number other than one. It seems like the major use case for this is to split lists up, so that a single list is marked by multiple ols. Would it therefore make sense to allow named start values, so that the author doesn't have to go through and re-number everything when a new item is added at the top? And if so, should they be considered semantically one list? And if so, would it make sense for it to also apply to unordered lists, so that they can be split up, too? I'm not sure we can put non-numeric values in start=, but I agree with your basic proposal. I'm not sure it makes sense for us to add it to HTML5 at this time -- we have a number of semantic things already added to the spec and we don't want to get too far ahead of implementations otherwise they'll all start doing different parts and it'll take years to get a common subset implemented -- but I think it's something we should consider for a future version, certainly. -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Re: [whatwg] [HTML5] Named start values for lists?
dolphinling wrote: HTML5 brings back the |start| attribute on ordered lists. This allows a list to semantically start with a number other than one. It seems like the major use case for this is to split lists up, so that a single list is marked by multiple ols. Would it therefore make sense to allow named start values, so that the author doesn't have to go through and re-number everything when a new item is added at the top? And if so, should they be considered semantically one list? And if so, would it make sense for it to also apply to unordered lists, so that they can be split up, too? Or would all that be an abuse, and something that's one list should use only one ?l ? I've thought a bit more, and *assuming semantically linked, automatically numbered split lists should be allowed* (which so far only one other person has even touched on!), I think the best solution would be something like the following: pChores for today:/p ol listname=chores liClean living room/li liClean bathroom/li /ol pWhen cleaning bathroom, make sure to get all the grout between the shower tiles. Also, the sink needs to be scrubbed, too./p ol listname=chores liSweep kitchen/li liWash dishes/li /ol Numbering would start at 1, and continue in source order (superseded, of course, by any start= or value= attributes). This gives the author the power to number however they want, while being much less complex spec- and implementation-wise. A few cases where a list is not only split, but the sections are rearranged on the page, require the author to fall back on start=, but since it doesn't actually remove any functionality, I think that's an acceptable tradeoff. As for how this would interact with CSS Counters... It appears counters in CSS 3 are insufficient even to handle the already-in-spec start= and value= attributes. That should probably be taken up with the CSS WG. -- dolphinling http://dolphinling.net/
Re: [whatwg] [HTML5] Named start values for lists?
dolphinling wrote: As for how this would interact with CSS Counters... It appears counters in CSS 3 are insufficient even to handle the already-in-spec start= and value= attributes. That should probably be taken up with the CSS WG. I've mailed www-style (not with any ideas, just bringing it up). The thread should be named [CSS 3 counters] Dealing with ol start= and li value= ? However, my messages have a history of not going through there ( :o ), so if it's not there in a day or so and no one else has started a thread, perhaps someone can forward it for me? Subject: [CSS 3 counters] Dealing with ol start= and li value= ? The WHAT WG's WA1 draft brings back the start attribute on ordered lists and introduces a value attribute on individual list items, and semantic grouping of lists (saying two ol/ols are in fact one list) is being discussed. Unless I missed something in my (admittedly quick) reading, the Counters section in both CSS 2.1 and CSS 3 seems insufficient to deal with this. I don't actually have any thoughts on how to solve it, but just wanted to make sure it didn't get lost in the void. -- dolphinling http://dolphinling.net/ -- dolphinling http://dolphinling.net/
Re: [whatwg] [HTML5] Named start values for lists?
Lachlan Hunt wrote: dolphinling wrote: HTML5 brings back the |start| attribute on ordered lists. This allows a list to semantically start with a number other than one. It seems like the major use case for this is to split lists up, so that a single list is marked by multiple ols. Other use cases include the ability to include an excerpt from another list in a page while retaining the list item indexes, or breaking a long list across several pages. It would also be good if the simple number element that has been discussed over the past few weeks could reference a list item, something similar to pJohn's favorite fruit was rumoured to be bananas supn source=banana_ref/n/pre. But this has never been proven./p ol liApples Reference Source/li li id=banana_refBananas Reference Source/li liOranges Reference Source/li /ol At the mo this would equate to 2, but if another footnote reference were added below Apples then it would automagically allow the citation to change to 3. If you also wanted the reference to be an anchor (see wikipedia) then that might make things more complex, however, as you'd need a banana_ref for the number and an anchor named banana_anc, perhaps. Ric Hardacre http://www.cyclomedia.co.uk/
Re: [whatwg] [HTML5] Named start values for lists?
On Jun 27, 2006, at 09:46, Lachlan Hunt wrote: I recall similar suggestions made on www-html in the past. Something like this could be useful: ol id=part1 liItem 1/li liItem 2/li liItem 3/li /ol ol id=part2 continue=part1 liItem 4/li liItem 5/li liItem 6/li /ol However, there are several issues that would need to be addressed: Hopefully, the issue list adequately demonstrates that the continue attribute is way too complicated considering that the old start attribute solves the numbering problem in a very pragmatic way. -- Henri Sivonen [EMAIL PROTECTED] http://hsivonen.iki.fi/
Re: [whatwg] [HTML5] Named start values for lists?
Henri Sivonen wrote: On Jun 27, 2006, at 09:46, Lachlan Hunt wrote: ol id=part1 ... /ol ol id=part2 continue=part1 ... /ol However, there are several issues that would need to be addressed: Hopefully, the issue list adequately demonstrates that the continue attribute is way too complicated considering that the old start attribute solves the numbering problem in a very pragmatic way. The start and value attributes certainly do solve the majority of the use cases. They don't semantically link the lists together and they place the responsibility of calculating the starting values upon the authoring/publishing system, rather than the browser. What are the specific use cases that require the lists to be semantically linked? If there are any, could they be addressed using a microformats approach? e.g. Lists with class=split-list (or any other class name) that share the same title could be defined by a microformat to be linked lists. Perhaps, the class name isn't even required, the matching titles could be sufficient. ol class=split-list title=Fruit liApples/li liBananasli /ol ol class=split-list title=Fruit start=3 liCoconuts/li liDates/li liFigs/li /ol -- Lachlan Hunt http://lachy.id.au/
Re: [whatwg] [HTML5] Named start values for lists?
James Graham wrote: * Would implementations have difficulty with re-numbering list items in linked lists, when a new li is dynamically inserted into a previous list? I would hope not since that's one of the big attractions of this model. Perhaps not so much for browsers that natively support it, but for a JS implementation designed for backwards compatibility in current browsers, it would have to listen for the the events like DOMNodeInserted, DOMNodeRemoved and DOMAttrModified (and possibly some others). They'd be needed to handle all cases of list items or entire lists being inserted or removed, as well as changing values for the |start|, |value| and |continue| attributes for all ol and li elements, and then update all linked lists appropriately. That could get quite complex and complexity increases the chances of introducing bugs. Besides, not all current browsers support those events, which would make a JS implementation quite limited. -- Lachlan Hunt http://lachy.id.au/
Re: [whatwg] [HTML5] Named start values for lists?
dolphinling wrote: HTML5 brings back the |start| attribute on ordered lists. This allows a list to semantically start with a number other than one. It seems like the major use case for this is to split lists up, so that a single list is marked by multiple ols. Other use cases include the ability to include an excerpt from another list in a page while retaining the list item indexes, or breaking a long list across several pages. e.g. Search results with 10 results per page could be marked up as a list: ol start=1 on the first page, ol start=11 on the second page, etc. Would it therefore make sense to allow named start values, so that the author doesn't have to go through and re-number everything when a new item is added at the top? And if so, should they be considered semantically one list? And if so, would it make sense for it to also apply to unordered lists, so that they can be split up, too? I recall similar suggestions made on www-html in the past. Something like this could be useful: ol id=part1 liItem 1/li liItem 2/li liItem 3/li /ol ol id=part2 continue=part1 liItem 4/li liItem 5/li liItem 6/li /ol However, there are several issues that would need to be addressed: * Should |continue| be an IDREF that can only continue a previous list in the same page, or should it be a URI that can continue lists from other pages? * Can it be defined and implemented in a way that avoids circular references. e.g. ol id=part1 continue=part2/ ol id=part2 continue=part1/ * What does it mean if ol contine=foo references a ul id=foo? Should it only be able to link lists of the same type? (i.e. ol with another ol and ul with another ul) * What does it mean if it references any other element that isn't a ul or ol? * What should happen if it references a non-existent element? * What does it mean if two lists continue from the same previous list? e.g. ol id=part1 continue=part2/ ol id=part2 continue=part1/ ol id=part3 continue=part1/ * How are references duplicate IDs handled in this situation? (That could probably be the same way label for= handles it) * Which takes precedence out of ol continue=part1 start=2 and li value=3? * Backwards compatibility is also an issue, though it could possibly be handled with some JavaScript that dynamically calculates and sets the start attribute. * Would implementations have difficulty with re-numbering list items in linked lists, when a new li is dynamically inserted into a previous list? -- Lachlan Hunt http://lachy.id.au/
Re: [whatwg] [HTML5] Named start values for lists?
Quoting Lachlan Hunt [EMAIL PROTECTED]: However, there are several issues that would need to be addressed: [List of good points] * How does it interact with CSS counters. -- Anne van Kesteren http://annevankesteren.nl/
[whatwg] [HTML5] Named start values for lists?
HTML5 brings back the |start| attribute on ordered lists. This allows a list to semantically start with a number other than one. It seems like the major use case for this is to split lists up, so that a single list is marked by multiple ols. Would it therefore make sense to allow named start values, so that the author doesn't have to go through and re-number everything when a new item is added at the top? And if so, should they be considered semantically one list? And if so, would it make sense for it to also apply to unordered lists, so that they can be split up, too? Or would all that be an abuse, and something that's one list should use only one ?l ? -- dolphinling http://dolphinling.net/