DITA and XMetaL Discussion
academiceditor October 16, 2015 at 3:15 pm
Using variables in XMetal (a.k.a. keywords?)October 16, 2015 at 3:15 pmParticipants 2Replies 3Last Activity 6 years, 11 months ago
Does XMetal have something equivalent to variables? I heard “keywords” can do the job, so can anyone explain how these work and how to use them? I'm working on XMetal Author Enterprise 7.0.
Thank you so much in advance for your help! 🙂Derek Read October 16, 2015 at 7:55 pm
Reply to: Using variables in XMetal (a.k.a. keywords?)October 16, 2015 at 7:55 pm
Do you have a specific schema you plan to work with?
DITA for example, defines a few things that may give you what you are looking for, and these are supported by XMetaL Author Enterprise and the DITA Open Toolkit. The DITA authoring solution included with XMetaL Author Enterprise has an extensive user interface dedicated to helping you create and manage these.
If you plan to use DITA look up these topics in the Help:
Working with DITA > Content references
Working with DITA > Conditional text
Working with DITA > Key references
You mention “keywords”, which is also part of the DITA specification and supported by XMetaL Author Enterprise. Given the rest of your post, I don't think these are what you are after. I suspect you may have been told about “key references”. As these can be confusing for someone new to DITA you may wish to start with “content references”. You may find that they do not meet your needs and that you need something more powerful, at which point you might decide “key references” are what you need.
Some schemas (like DocBook) support an XML standard called “XML Inclusion” (aka: XInclude). XMetaL Author supports this standard (as well as XPointer, which is related to XInclude) but to use XML inclusions in your XML your schema must define the appropriate elements as defined by the W3C XML Inclusion Recommendation. This means you can use it with any schema provided that schema defines the elements, or provided you can alter the schema to define them.
People will use these in different ways so they may require a specific user interface for helping their users to work with them. For that reason XMetaL Author does not include a predefined interface for this. Instead, several APIs are available for building a UI your users might require. In general you can work with these as you would with any other element and its associated attributes using the Element List and Attribute Inspector however (if you don't require specific functionality). The APIs specific to XInclude are documented in the XMetaL Developer Programmers Guide.
The DocBook sample customization included with XMetaL Author demonstrates one way you might use XInclude. To see that in action open the “Anatomy and Physiology” sample or the “Hello World in MMIX” sample. These are listed in the Help menu under Samples. Right clicking on an
element will show you options specific to XInclude. These options are added to that menu using script and in turn selecting one of them runs more script (calling the appropriate API). Scripts are defined as “macros” inside the MCR file associated with the DocBook sample customization.
For more information on the standard see http://www.w3.org/TR/xinclude/
XML (in general) defines several types of entities. These can reference text or files. Entities are part of the XML Recommendation and as such are supported in any document without specific requirements needed in the schema. I would strongly recommend not using them with any schema that defines an alternative option (such as those listed above). They are generic in nature (which can be both a good and bad thing) but for any schema that has defined an alternative that alternative will generally have advantages over entities (otherwise the alternative would not have been invented) and the alternative will also be better supported by any tools designed to work specifically with that schema.
See this topic and the topics it links to: Authoring structured content > Working with entities
See also sections 4 through 4.6 in the XML Recommendation: http://www.w3.org/TR/xml/#sec-physical-structDerek Read October 16, 2015 at 8:07 pm
Reply to: Using variables in XMetal (a.k.a. keywords?)October 16, 2015 at 8:07 pm
Please note that version 7 is very old. If you are working with DITA and you can upgrade I would suggest doing so as the DITA authoring solution has been improved a lot since version 7. It also has improved support for these specific DITA features. The current release is 10.
If you are interested in XML entities or XInclude then there is less reason to upgrade as these standards have not changed for many years so the features that support them in XMetaL Author have not needed to be updated. I would still upgrade anyway however as there have been many hundreds of other improvements in the software since version 7.academiceditor October 20, 2015 at 7:21 pm
Reply to: Using variables in XMetal (a.k.a. keywords?)October 20, 2015 at 7:21 pm
Thanks very much for the detailed help! I looked into different options you mentioned, and it seems I'll have to work closely with our IT department to unlock this functionality. Turns out I'm working on a customized version of XMetal 8 (not 7, as I mentioned earlier).
I'll try to follow up once we make some progress. In the meantime, I guess I'll be doing a lot of “hard-coding”…
- You must be logged in to reply to this topic.