in doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/Xhtml5BaseSink.java [1077:1111]
private void tableCell(boolean headerRow, MutableAttributeSet attributes) {
Tag t = (headerRow ? HtmlMarkup.TH : HtmlMarkup.TD);
if (!headerRow
&& cellCountStack != null
&& !cellCountStack.isEmpty()
&& cellJustifStack != null
&& !cellJustifStack.isEmpty()
&& getCellJustif() != null) {
int cellCount = getCellCount();
int[] cellJustif = getCellJustif();
int currentCellJust =
cellCount < cellJustif.length ? cellJustif[cellCount] : cellJustif[cellJustif.length - 1];
if (cellCount < cellJustif.length) {
String tdStyle = getStyleForTableJustification(currentCellJust);
if (tdStyle != null) {
if (attributes == null) {
attributes = new SinkEventAttributeSet();
} else if (attributes.isDefined(SinkEventAttributes.STYLE)) {
tdStyle += " "
+ attributes
.getAttribute(SinkEventAttributes.STYLE)
.toString();
}
attributes.addAttribute(SinkEventAttributes.STYLE, tdStyle);
}
}
}
if (attributes == null) {
writeStartTag(t, null);
} else {
writeStartTag(t, SinkUtils.filterAttributes(attributes, SinkUtils.SINK_TD_ATTRIBUTES));
}
}