Ok - thanks Hussein. Cheers Darryl
----- Original Message ----- From: Hussein Shafie <huss...@xmlmind.com> Reply-To: 'xmleditor-support@xmlmind.com' <xmleditor-support@xmlmind.com> To: Darryl Young <darr...@bluestream.com> Cc: 'xmleditor-support@xmlmind.com' <xmleditor-support@xmlmind.com> Sent: 06/22/2018 10:49:19 AM Subject: Re: [XXE] Custom EntityResolver ________________________________________________________________________________ On 06/22/2018 05:20 PM, Darryl Young wrote: > I took a look through the XXE API and the developer's guide to see if I > could find anything on how to have XXE use a custom > org.xml.sax.EntityResolver. This is a pretty advanced need given the flexibility of catalog-based entity and URI resolution. No wonder you haven't found anything. > > We would like to have our vDrive plugin make use of such an > EntityResolver so that our customers who have their own Dita > specializations (custom dtd's) > can use the XXE connected editor that we ship with, to open and edit > documents that use these specialized DTD's. > > We already have a custom EntityResolver implemented and available, but > we just need a way to tell XXE to use that resolver when opening a > document as opposed > to using the dtd's that the editor ships with - is this possible, and if > so, could you point me in the right direction. > XXE exclusively uses this utility class: com.xmlmind.xml.resolve.XMLCatalogs http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xml/resolve/XMLCatalogs.html to resolve entities. It's basically a simple helper class leveraging "Apache XML Commons Resolver" (which implements catalog-based entity and URI resolution; see http://xerces.apache.org/xml-commons/). I'm afraid there is no way to use a custom EntityResolver in XXE. --------------------------------------- How to use a DITA specialization in XXE --------------------------------------- <XXE_install_dir>/doc/configure/samples/topic_plus_tag/ contains a configuration for a DITA topic specialization. This specialization adds a <tag> element to the topic DTD. A <tag> element has a required kind attribute. The values allowed for the kind attribute are: "attribute", "attvalue", "element", "emptytag", "endtag", "genentity", "localname", "namespace", "numcharref", "paramentity", "pi", "prefix", "comment", "starttag". This configuration has been created by customizing the stock DITA topic configuration as explained in "Chapter 5, Customizing an existing configuration", http://www.xmlmind.com/xmleditor/_distrib/doc/configure/customizing.html -- XMLmind XML Editor Support List xmleditor-support@xmlmind.com http://www.xmlmind.com/mailman/listinfo/xmleditor-support