1. Stylesheet extension class

What is a stylesheet extension class?

A stylesheet extension class is any class having a public constructor having the following signature:

class_name(String[] args, ViewFactoryBase viewFactory)

Where to declare a stylesheet extension class?

In the CSS stylesheet used to style the document being edited, using the following proprietary at-rule in XMLmind XML Editor - Support of Cascading Style Sheets (W3C CSS):

@extension "class_name [arg]*";


@extension "StyleSheetExtension navy white";

How to implement a stylesheet extension class?

No requirements other than a public constructor having the above signature. However, this constructor generally has side effects such as registering dependencies between the view of an element and some of its attributes (ViewFactoryBase.addDependency, where ViewFactoryBase is XXE style engine), registering intrinsic styles (StyleSpecs), registering custom view components with the CustomViewManager, etc. See sample stylesheet extension class.