3. StyleSpecs, an object which knows about the intrinsic styles of an element

What is StyleSpecs?

StyleSpecs is an object which knows about the intrinsic styles of an element without having to declare these styles explicitely is the CSS stylesheet. For example, com.xmlmind.xmleditext.xhtml.table.StyleSpecsImpl knows that an XHTML th is rendered by default using a bold font and that its text must be centered withing the table cell.

Where to declare StyleSpecs?

A StyleSpecs is not declared anywhere. It is registered with XXE style engine in the constructor of a stylesheet extension class using ViewFactoryBase.addIntrinsicStyleSpecs.

How to implement StyleSpecs?

Implement interface StyleSpecs or derive class StyleSpecsBase. See sample StyleSpecs.