On 07/09/2012 04:32 PM, Stefan Seefeld wrote: > > I'm still slightly confused as to how to write multiple custom > configurations and how to associate them to a given document. > > I'm authoring a multitude of DB5 documents. Some are destined to become > IEEE papers, some become OMG specifications, etc. > > Accordingly, I want to associate different stylesheets for pdf > generation with them, so I have written an "ieee" and an "omg" > configuration, both adding their respective xslt custom stylesheet, as > well as css stylesheet for custom display. > > When I open one of my documents, I find an "ieee" menu entry in the > "view" menu, but none for "omg". Any idea what I may be missing ? > > Furthermore, the "Convert Document" submenu contains a single generic > "Convert to PDF" entry, with no indication of what XSL stylesheet this > will use. Is there a way to add two distinct "Convert to IEEE PDF" and > "Convert to OMG PDF" commands ? (My two configurations both define > "...toPS.transform" parameters, but there is no indication of which is > being associated with the menu's generic "Convert to PDF" command. >
You cannot associate multiple configurations to a single document type (in your case, DocBook v5+). You need to artificially create multiple document types based on DocBook v5+. After doing that, you need to create a different .xxe configuration file for each of these document types. In order to do this, your existing document instances and your document templates must have root elements having special values for the "version" attribute (see http://www.docbook.org/tdg5/en/html/ch05.html#s-dbversion). Examples: * Template for a DocBook v5+/IEEE book: --- <book xmlns="http://docbook.org/ns/docbook" version="5.0-variant IEEE"> ... </book> --- Corresponding <detect> configuration element: --- <configuration name="DocBook v5+/IEEE" mimeType="application/x-docbook-5+xml" icon="xxe-config:common/mime_types/docbook.png" xmlns="http://www.xmlmind.com/xmleditor/schema/configuration" xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration" xmlns:db="http://docbook.org/ns/docbook" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:html="http://www.w3.org/1999/xhtml"> <include location="xxe-config:docbook5/docbook5.xxe"/> <detect> <and> <rootElementNamespace>http://docbook.org/ns/docbook</rootElementNamespace> <rootElementAttribute localName="version" value="IEEE" substring="true" /> </and> </detect> <!--MORE CONFIGURATION ELEMENTS HERE--> </book> --- * Template for a DocBook v5+/OMG book: --- <book xmlns="http://docbook.org/ns/docbook" version="5.0-variant OMG"> ... </book> --- Corresponding <detect> configuration element: --- <configuration name="DocBook v5+/OMG" mimeType="application/x-docbook-5+xml" icon="xxe-config:common/mime_types/docbook.png" xmlns="http://www.xmlmind.com/xmleditor/schema/configuration" xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration" xmlns:db="http://docbook.org/ns/docbook" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:html="http://www.w3.org/1999/xhtml"> <include location="xxe-config:docbook5/docbook5.xxe"/> <detect> <and> <rootElementNamespace>http://docbook.org/ns/docbook</rootElementNamespace> <rootElementAttribute localName="version" value="OMG" substring="true" /> </and> </detect> <!--MORE CONFIGURATION ELEMENTS HERE--> </book> --- -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

