XMetaL Tips and Tricks

XMetaL Community Forum XMetaL Tips and Tricks Tutorial: Configuring XMetaL to use a constrained DITA 1.2 DTD

  • Su-Laine Yeo

    Tutorial: Configuring XMetaL to use a constrained DITA 1.2 DTD

    Participants 0
    Replies 1
    Last Activity 12 years ago

    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,

    elements can contain multiple elements, block elements such as </p> <p>, and text. In the constrained version, </p> <section> elements can contain one and only one <title> element, optionally followed by some types of block elements and tables. </p> <p><b>Before you begin:</b> Make sure that XMetaL Author Enterprise 6.0.x is installed, with the DITA 1.2 Configuration Kit (<a href="http://forums.xmetal.com/index.php/topic,747.msg2380.html#msg2380" rel="nofollow">http://forums.xmetal.com/index.php/topic,747.msg2380.html#msg2380</a>).</p> <p><b>To configure XMetaL Author Enterprise:</b><br />1) Back up the <tt>C:Program FilesXMetaL 6.0AuthorTemplateDITA Topic</tt> folder.<br />2) Download and unzip the attached set of files.<br />3) Copy the <tt>constrainedConcept.dtd</tt> and the <tt>oneTitleSectionConstraint.mod</tt> files to BOTH of the following folders: </p> <ul></p> <li><tt>C:Program FilesXMetaL 6.0AuthorDITADITA_OT_DTDtechnicalContentdtd</tt></li> <p></p> <li><tt>(Your DITA Open Toolkit 1.5 folder)dtdtechnicalContentdtd</tt>. If you are using Windows XP, this folder is usually <tt>C:Documents and Settings<username>Application DataSoftQuadXMetaL SharedDITA_OT1.5dtdtechnicalContentdtd</username></tt>. If this folder doesn't exist, see <a href="http://forums.xmetal.com/index.php/topic,939.0.html" rel="nofollow">http://forums.xmetal.com/index.php/topic,939.0.html</a> for details.</li> <p></ul> <p>4) Copy the <tt>Concept.xml</tt> file to the <tt>C:Program FilesXMetaL 6.0AuthorTemplateDITA Topic</tt> folder and accept the prompt to overwrite the existing file.<br />5) Start XMetaL Author Enterprise.<br />6) Click <b>Tools </b>> <b>Select Specialized DITA DT</b>D.<br />7) Browse to and select the <tt>constrainedConcept.dtd</tt> file in <tt>C:Program FilesXMetaL 6.0AuthorDITADITA_OT_DTDtechnicalContentdtd</tt>.<br />8) Click <b>Open</b>. <br />9) The <b>Choose Base Document Type</b> dialog appears. In the <b>Base document type</b> drop-down, select <b>Topic</b>. In the <b>Specialized Public ID</b> field, type <tt>-//OASIS//DTD DITA Constrained Concept//EN</tt> </p> <p>[center][img]http://img27.imageshack.us/img27/796/choosebasedoctype.png[/img][/center]</p> <p>10) Restart XMetaL Author Enterprise.</p> <p><b><br />To test your “Constrained Concept” document type:</b><br />1) Click <b>File </b>> <b>New</b>. <br />2) On the <b>DITA Topic</b> tab, select the <b>Concept</b> icon and then click OK. A new Concept topic document appears. <br />3) Click anywhere in the document.<br />4) Click <b>Insert </b>> <b>Section </b>> <b>Generic Section</b>. A new </p> <section> element is added to the end of the concept body.<br />5) In Tags On View, try to copy the <title> element in the </p> <section> and paste it somewhere else in the section. Note that XMetaL does not allow you to paste it elsewhere within the </p> <section>.</p> <p><b>To configure the DITA Open Toolkit to use the “Constrained Concept” DTD:</b><br />1) In your copy of DITA Open Toolkit 1.5, open the <tt>catalog-dita_template.xml</tt> file.<br />2) Scroll to the bottom of the file. Paste the following code immediately before the tag.<br />[code] <group xml:base="dtd/technicalContent/dtd/"><public publicId="-//OASIS//DTD DITA Constrained Concept//EN" uri="constrainedConcept.dtd"></public> <public publicId="-//OASIS//ELEMENTS DITA One Title Section Constraint//EN" uri="oneTitleSectionConstraint.mod"></public></group>[/code]<br />3) Save the file.</p> <p><b>Legal:</b><br />* Licensed Materials – Property of JustSystems, Canada, Inc.<br />*<br />* (c) Copyright JustSystems Canada, Inc. 2010<br />* All rights reserved.<br />*<br />*——————————————————————-<br />* The sample contained herein is provided to you “AS IS”.<br />*<br />* It is furnished by JustSystems Corporation as a simple example and has not been<br />* thoroughly tested under all conditions. JustSystems Canada, Inc., therefore, cannot<br />* guarantee its reliability, serviceability or functionality.<br />*<br />* This sample may include the names of individuals, companies, brands and products<br />* in order to illustrate concepts as completely as possible. All of these names are<br />* fictitious and any similarity to the names and addresses used by actual persons or<br />* business enterprises is entirely coincidental.<br />*———————————————————————<br /></section> </section> <p>

    Reply

    adream

    Reply to: Tutorial: Configuring XMetaL to use a constrained DITA 1.2 DTD

    This post is goona be really helpful for me thanks

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support