CSS Counter
Are you missing a feature? Request its implementation here.
-
- Posts: 96
- Joined: Mon May 09, 2011 11:54 am
CSS Counter
Hi,
I have an XML which should have auto-numbered sections in the author view. The root element han an Attribut "startnum" which pretend the initial value of the first section.
I've found no way to use the attribute value as a variable in css, e.g.:
The only workaround I've found is to define the start value for each possible startnum value:
Is it possible to support a better solution for this cases?
I have an XML which should have auto-numbered sections in the author view. The root element han an Attribut "startnum" which pretend the initial value of the first section.
Code: Select all
<document startnum="5">
<section/> <!-- Should have "5" as number -->
<section/> <!-- 6 -->
<section/> <!-- 7 ... -->
</document>
Code: Select all
document[startnum] {
counter-reset: sect1 attr(startnum)-1;
}
Code: Select all
document[startnum="2"] {
counter-reset: sect1 1;
}
document[startnum="3"] {
counter-reset: sect1 2;
}
document[startnum="4"] {
counter-reset: sect1 3;
}
document[startnum="5"] {
counter-reset: sect1 4;
}
document[startnum="6"] {
counter-reset: sect1 5;
}
document[startnum="7"] {
counter-reset: sect1 6;
}
document[startnum="8"] {
counter-reset: sect1 7;
}
document[startnum="9"] {
counter-reset: sect1 8;
}
document[startnum="10"] {
counter-reset: sect1 9;
}
-
- Posts: 9473
- Joined: Fri Jul 09, 2004 5:18 pm
Re: CSS Counter
Hi Patrick,
Unfortunately for now we do not have support for evaluating functions in the "counter-reset" values. I added an improvement request for this.
We also have plans to add functions for simple arithmetic evaluations (like adding that "1" in your case).
I'll update this post when the request gets implemented.
Regards,
Radu
Unfortunately for now we do not have support for evaluating functions in the "counter-reset" values. I added an improvement request for this.
We also have plans to add functions for simple arithmetic evaluations (like adding that "1" in your case).
I'll update this post when the request gets implemented.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service