Modifier and Type | Field and Description |
---|---|
protected LinkedList<Map<String,Integer>> |
counterValues |
Constructor and Description |
---|
CounterEvaluator() |
Modifier and Type | Method and Description |
---|---|
void |
endElement()
This method must be called at the end of every element while traversing the document tree in
depth-first order.
|
int |
evaluateCounter(String name)
Get the value of the innermost counter in the counter set with the given name, or instaniate
a counter with value
0 (see https://www.w3.org/TR/css-lists-3/#counter-functions) |
String |
evaluateCounter(String name,
CounterStyle style,
boolean withPrefixAndSuffix)
Generate a counter representation of the innermost counter in the counter set with the given
name (see https://www.w3.org/TR/css-lists-3/#counter-functions)
|
String |
evaluateCounters(String name,
CounterStyle style,
String separator)
Generate a counter representation of all the counters in the counter set with the given name
(see https://www.w3.org/TR/css-lists-3/#counter-functions)
|
String |
generateMarkerContents(E elementStyle)
Evaluate marker contents (see https://www.w3.org/TR/css-lists-3/#content-property)
|
protected abstract Collection<? extends cz.vutbr.web.css.TermPair<String,Integer>> |
getCounterIncrement(E elementStyle)
Get
counter-increment property. |
protected abstract Collection<? extends cz.vutbr.web.css.TermPair<String,Integer>> |
getCounterReset(E elementStyle)
Get
counter-reset property. |
protected abstract Collection<? extends cz.vutbr.web.css.TermPair<String,Integer>> |
getCounterSet(E elementStyle)
Get
counter-set property. |
protected abstract org.daisy.braille.css.BrailleCSSProperty.Display |
getDisplay(E elementStyle)
Get
display property. |
protected abstract CounterStyle |
getListStyleType(E elementStyle,
CounterStyle parentListStyleType)
Get list counter style.
|
protected abstract Collection<cz.vutbr.web.css.Term<?>> |
getMarkerContent(E elementStyle)
Get
content property of ::marker pseudo-element. |
protected abstract CounterStyle |
getNamedCounterStyle(String name)
Get counter style for given name
|
void |
startElement(E elementStyle)
This method must be called at the start of every element while traversing the document tree
in depth-first order.
|
protected final LinkedList<Map<String,Integer>> counterValues
protected abstract Collection<? extends cz.vutbr.web.css.TermPair<String,Integer>> getCounterReset(E elementStyle)
counter-reset
property.protected abstract Collection<? extends cz.vutbr.web.css.TermPair<String,Integer>> getCounterSet(E elementStyle)
counter-set
property.protected abstract Collection<? extends cz.vutbr.web.css.TermPair<String,Integer>> getCounterIncrement(E elementStyle)
counter-increment
property.protected abstract org.daisy.braille.css.BrailleCSSProperty.Display getDisplay(E elementStyle)
display
property.protected abstract Collection<cz.vutbr.web.css.Term<?>> getMarkerContent(E elementStyle)
content
property of ::marker
pseudo-element.
null
means there is no ::marker
pseudo-element. An empty list means the
pseudo-element has no content.protected abstract CounterStyle getListStyleType(E elementStyle, CounterStyle parentListStyleType)
protected abstract CounterStyle getNamedCounterStyle(String name)
public void startElement(E elementStyle)
elementStyle
- The style of the current element, possibly containing counter-reset
, counter-set
and counter-increment
properties.public void endElement()
public String generateMarkerContents(E elementStyle) throws IllegalArgumentException
IllegalArgumentException
public String evaluateCounter(String name, CounterStyle style, boolean withPrefixAndSuffix)
public int evaluateCounter(String name)
0
(see https://www.w3.org/TR/css-lists-3/#counter-functions)public String evaluateCounters(String name, CounterStyle style, String separator)
Copyright © 2010–2025 The DAISY Consortium. All rights reserved.