Pages: 1
Author Topic: Tutorial: Configuring XMetaL to use a constrained DITA 1.2 DTD  (Read 14042 times)
Su-Laine Yeo
Solutions Consultant

Posts: 260

« on: December 01, 2010, 06:25:49 PM »

This tutorial illustrates how to use the "constraints" feature in DITA 1.2 with XMetaL Author Enterprise. The files you need for this tutorial are attached, so you do not have to write any code.

Purpose: According to the draft DITA 1.2 specification, "Constraint modules define additional constraints for corresponding vocabulary modules in order to restrict content models." In this tutorial, you will set up XMetaL to use a constrained version of the "Concept" topic type. In the base "Concept" topic type, <section> elements can contain multiple <title> elements, block elements such as <p>, and text. In the constrained version, <section> elements can contain one and only one <title> element, optionally followed by some types of block elements and tables.

Before you begin: Make sure that XMetaL Author Enterprise 6.0.x is installed, with the DITA 1.2 Configuration Kit (,747.msg2380.html#msg2380).

To configure XMetaL Author Enterprise:
1) Back up the C:\Program Files\XMetaL 6.0\Author\Template\DITA Topic folder.
2) Download and unzip the attached set of files.
3) Copy the constrainedConcept.dtd and the oneTitleSectionConstraint.mod files to BOTH of the following folders:
  • C:\Program Files\XMetaL 6.0\Author\DITA\DITA_OT_DTD\technicalContent\dtd
  • (Your DITA Open Toolkit 1.5 folder)\dtd\technicalContent\dtd. If you are using Windows XP, this folder is usually C:\Documents and Settings\<username>\Application Data\SoftQuad\XMetaL Shared\DITA_OT1.5\dtd\technicalContent\dtd. If this folder doesn't exist, see,939.0.html for details.
4) Copy the Concept.xml file to the C:\Program Files\XMetaL 6.0\Author\Template\DITA Topic folder and accept the prompt to overwrite the existing file.
5) Start XMetaL Author Enterprise.
6) Click Tools > Select Specialized DITA DTD.
7) Browse to and select the constrainedConcept.dtd file in C:\Program Files\XMetaL 6.0\Author\DITA\DITA_OT_DTD\technicalContent\dtd.
8) Click Open.
9) The Choose Base Document Type dialog appears. In the Base document type drop-down, select Topic. In the Specialized Public ID field, type -//OASIS//DTD DITA Constrained Concept//EN

10) Restart XMetaL Author Enterprise.

To test your "Constrained Concept" document type:

1) Click File > New.
2) On the DITA Topic tab, select the Concept icon and then click OK. A new Concept topic document appears.
3) Click anywhere in the document.
4) Click Insert > Section > Generic Section. A new <section> element is added to the end of the concept body.
5) In Tags On View, try to copy the <title> element in the <section> and paste it somewhere else in the section. Note that XMetaL does not allow you to paste it elsewhere within the <section>.

To configure the DITA Open Toolkit to use the "Constrained Concept" DTD:
1) In your copy of DITA Open Toolkit 1.5, open the catalog-dita_template.xml file.
2) Scroll to the bottom of the file. Paste the following code immediately before the </catalog> tag.
<group xml:base="dtd/technicalContent/dtd/">
<public publicId="-//OASIS//DTD DITA Constrained Concept//EN" uri="constrainedConcept.dtd"/>
<public publicId="-//OASIS//ELEMENTS DITA One Title Section Constraint//EN" uri="oneTitleSectionConstraint.mod"/></group>
3) Save the file.

* Licensed Materials - Property of JustSystems, Canada, Inc.
* (c) Copyright JustSystems Canada, Inc. 2010
* All rights reserved.
* The sample contained herein is provided to you "AS IS".
* It is furnished by JustSystems Corporation as a simple example and has not been
* thoroughly tested under all conditions. JustSystems Canada, Inc., therefore, cannot
* guarantee its reliability, serviceability or functionality.
* This sample may include the names of individuals, companies, brands and products
* in order to illustrate concepts as completely as possible. All of these names are
* fictitious and any similarity to the names and addresses used by actual persons or
* business enterprises is entirely coincidental.

* (4.2 KB - downloaded 499 times.)
« Last Edit: December 02, 2010, 06:43:34 PM by Su-Laine Yeo » Logged

Su-Laine Yeo
Solutions Consultant
JustSystems Canada, Inc.

Posts: 1

« Reply #1 on: February 12, 2014, 08:36:47 AM »

This post is goona be really helpful for me thanks
Pages: 1
Jump to:  

email us