Forum How do I...?

set start and value attributes for ordered lists?

mwiik
My apologies in advance if this isn't the proper forum to discuss this. But I figured you all might know.

The requirement is to have ordered lists where we can control both the start number and the value for one of the individual list items. In xhtml transitional I would use the 'start' attribute for the ol tag and the 'value' attribute for the li tag, but this isn't allowed in xhtml 1.0 strict, which is what we are using to create pdfs via Prince.

I am using upper alpha for the type, and I want ABCD lists and also FGHJ lists. Yes, you read that right, F-G-H-J, skipping the letter 'I'. My googling hasn't uncovered how to set these, as either CSS values, or counters, or some such that would work with Prince.

If it isn't doable, we can live without it. But the ideal would be that the technique also work in browsers, including MSIE 6.

Thanks!
mikeday
I am using upper alpha for the type, and I want ABCD lists and also FGHJ lists. Yes, you read that right, F-G-H-J, skipping the letter 'I'. My googling hasn't uncovered how to set these, as either CSS values, or counters, or some such that would work with Prince.

You can achieve this in Prince using the counter-increment and counter-reset properties, like this:
<ol style="list-style: upper-alpha; counter-reset: list-item 5">
<li>First</li>
<li>Second</li>
<li>Third</li>
<li style="counter-increment: list-item 2">Fourth</li>
</ol>

However, this won't have any effect in Internet Explorer. It would probably be best to just use the start/value attributes, as these will work in browsers. Personally I don't think that the attributes should have been removed from XHTML, as in many documents list numbering is meaningful and not just a stylistic choice, so it needs to be explicitly represented in the document.