Alex Milowski wrote:
>
> It really isn't that extreme.  I have a family of schemas that encode a 
> few different
> document types using the same general building blocks.  I want to be 
> able to
> detect the different types and apply the right CSS stylesheet.  
> Everything else in
> the configuration is the same.
> 
> Obviously, I can create different configurations but that really isn't 
> optimal.  That
> would cause all of the templates to be listed under separate headings 
> when a use
> creates a new document.

XXE has many extension mechanisms. I first thought about a very simple, 
fake, format plug-in:

Please read:
http://www.xmlmind.com/xmleditor/_distrib/docs/dev/ar01s10.html

the lines of interest are:

---
doc.putProperty(StandardProperty.STYLE_SHEET_INFO, styleSheetInfo);
---

Also read the XXE configuration file included in the distribution file 
of the APT format plug-in to learn how certain things are done in the 
configuration file (templates, toolbars, commands, etc) and other are 
done by the plug-in itself (CSS, etc).



Now I think that a documentHook would be *much more elegant*. Please 
read http://www.xmlmind.com/xmleditor/_distrib/docs/dev/ar01s08.html

The documentHook could override documentCreated and documentOpened to 
attach the proper style sheet to the document (also using 
doc.putProperty(StandardProperty.STYLE_SHEET_INFO, styleSheetInfo))


Reply via email to