Home Forums General XMetaL Discussion Validation Schema and XInlcude and validation in general Reply To: Validation Schema and XInlcude and validation in general

Derek Read

Reply to: Validation Schema and XInlcude and validation in general

We include the DocBook 5.0 DTDs in the sample customizations with both XMetaL Author Essential and Enterprise 6.0. This sample customization includes some XInclude capabilities (though not all the XInclude capabilities the product supports). This is done by calling various APIs at the appropriate time, decided by the person creating the customization. The people that created this particular sample decided that they would expose several of the XInclude functions on the right click context menu, and that these would only be displayed when right clicking on an or element. No XInclude functionality is exposed in the (custom) menu named DocBook.

To insert an element into a document with this sample you would use the Element List. To set the various attributes for the element you would use the Attribute Inspector. The one thing that has been customized is that a “…” button has been added to the href attribute and clicking will allow you to browse to and select a file.

These functions (and others related to XInclude) could be enabled on a toolbar, menu, or via other means, by creating a customization for DocBook (which might be based on our sample) or for any other DTD or Schema that defines the required xi:include and xi:fallback elements. A more complex customization might allow users to insert xi:include elements using a form, perhaps restricting selection of only appropriate document types, display a preview, allow them to set attribute values specific to corporate rules, integrate with a CMS workflow, etc.

For more information on all the APIs that are supported you can refer to the Programmers Guide. There is an entire section devoted to the XInclude APIs called “XInclude interfaces” (there are 16 properties, 2 methods and 2 events that can be used to provide a range of XInclude-related functionality for any given customization).