<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>About oXygen XML Editor</title>
</head>
<body>
<style type="text/css">

                        h1 a:hover {background-color:#888;color:#fff ! important;}

                        div#emailbody table#itemcontentlist tr td div ul {
                                        list-style-type:square;
                                        padding-left:1em;
                        }
        
                        div#emailbody table#itemcontentlist tr td div blockquote {
                                padding-left:6px;
                                border-left: 6px solid #dadada;
                                margin-left:1em;
                        }
        
                        div#emailbody table#itemcontentlist tr td div li {
                                margin-bottom:1em;
                                margin-left:1em;
                        }


                        table#itemcontentlist tr td a:link, table#itemcontentlist tr td a:visited, table#itemcontentlist tr td a:active, ul#summarylist li a {
                                color:#000099;
                                font-weight:bold;
                                text-decoration:none;
                        }       

                        img {border:none;}


                </style>
<div xmlns="http://www.w3.org/1999/xhtml" id="emailbody" style="margin:0 2em;font-family:Georgia,Helvetica,Arial,Sans-Serif;line-height:140%;font-size:13px;color:#000000;">
<table style="border:0;padding:0;margin:0;width:100%">
<tr>
<td style="vertical-align:top" width="99%">
<h1 style="margin:0;padding-bottom:6px;">
<a style="color:#888;font-size:22px;font-family:Arial,Helvetica,Sans-Serif;font-weight:normal;text-decoration:none;" href="http://blog.oxygenxml.com/" title="(http://blog.oxygenxml.com/)">About oXygen XML Editor</a>
</h1>
</td>
<td width="1%" />
</tr>
</table>
<hr style="border:1px solid #ccc;padding:0;margin:0" />
<table id="itemcontentlist">
<tr xmlns="">
<td style="margin-bottom:0;line-height:1.4em;">
<p style="margin:1em 0 3px 0;">
<a name="1" style="font-family:Arial,Helvetica,Sans-Serif;font-size:18px;" href="http://feedproxy.google.com/~r/AboutOxygenXmlEditor/~3/AGTBTAnCxA0/controlled-attribute-values-for-your.html?utm_source=feedburner&utm_medium=email">Controlled Attribute Values for your DITA Project</a>
</p>
<p style="font-size:13px;color:#555;margin:9px 0 3px 0;font-family:Georgia,Helvetica,Arial,Sans-Serif;line-height:140%;font-size:13px;">
<span>Posted:</span> 15 Jul 2015 03:31 AM PDT</p>
<div style="margin:0;font-family:Georgia,Helvetica,Arial,Sans-Serif;line-height:140%;font-size:13px;color:#000000;"><div class="body">    <p class="p">Frequently when editing DITA content you will feel the need to enforce a controlled set of       values when editing certain attributes. For example you may want to impose that the values for       the <strong class="ph b">@outputclass</strong> attribute on the element <strong class="ph b">codeblock</strong> are either         <strong class="ph b">language-xml</strong> or <strong class="ph b">language-css</strong>. This is useful in order to remind writers that       any other value will not be interpreted by the build process in a significant manner.</p>     <div class="p">Oxygen has a couple of easy ways in which controlled values can be imposed for certain         attributes:<ol class="ol" id="topic_exv_hwt_rs__ol_qw5_gyt_rs">        <li class="li">You can edit the XML configuration file             <strong class="ph b">OXYGEN_INSTALL_DIR/frameworks/dita/resources/cc_value_config.xml</strong> and provide           additional entries. In the case of our small example for providing controlled values for           the <strong class="ph b">@attribute</strong> the configuration file should contain an additional           entry:<pre class="pre codeblock language-xml"><strong class="hl-tag" style="color:#000096">&lt;match</strong> <span class="hl-attribute" style="color: #ff7935">elementName</span>=<span class="hl-value" style="color: #993300">"codeblock"</span> <span class="hl-attribute" style="color: #ff7935">attributeName</span>=<span class="hl-value" style="color: #993300">"outputclass"</span><strong class="hl-tag" style="color:#000096">&gt;</strong><br /> <strong class="hl-tag" style="color:#000096">&lt;items</strong> <span class="hl-attribute" style="color: #ff7935">action</span>=<span class="hl-value" style="color: #993300">"addIfEmpty"</span><strong class="hl-tag" style="color:#000096">&gt;</strong><br />  <strong class="hl-tag" style="color:#000096">&lt;item</strong> <span class="hl-attribute" style="color: #ff7935">value</span>=<span class="hl-value" style="color: #993300">"language-xml"</span> <span class="hl-attribute" style="color: #ff7935">annotation</span>=<span class="hl-value" style="color: #993300">"XML Syntax Highlight"</span><strong class="hl-tag" style="color:#000096">/&gt;</strong><br />  <strong class="hl-tag" style="color:#000096">&lt;item</strong> <span class="hl-attribute" style="color: #ff7935">value</span>=<span class="hl-value" style="color: #993300">"language-css"</span> <span class="hl-attribute" style="color: #ff7935">annotation</span>=<span class="hl-value" style="color: #993300">"CSS Syntax Highlight"</span><strong class="hl-tag" style="color:#000096">/&gt;</strong><br /> <strong class="hl-tag" style="color:#000096">&lt;/items&gt;</strong>     <br /><strong class="hl-tag" style="color:#000096">&lt;/match&gt;</strong></pre>Besides           providing a hard-coded list of values the content completion configuration file is           flexible enough to allow <a class="xref" href="http://www.oxygenxml.com/doc/versions/17.0/ug-editor/#topics/configuring-content-completion-proposals.html" target="_blank">calling an XSLT stylesheet</a> which could retrieve           those values from other sources (for example via HTTP from an Exist database). </li>         <li class="li">Provide those controlled values via a <a class="xref" href="http://www.oxygenxml.com/doc/versions/17.0/ug-editor/#topics/subject-scheme-map.html" target="_blank">Subject Scheme Map</a> (my favorite). Coming back to           our example, you can create a small Subject Scheme map with the file name             <span class="ph filepath">controlledValues.ditamap</span> and the           content:<pre class="pre codeblock language-xml"><span class="hl-tag" style="color: #0000ff">&lt;!DOCTYPE subjectScheme PUBLIC "-//OASIS//DTD DITA Subject Scheme Map//EN""map.dtd"&gt;</span> <br /><strong class="hl-tag" style="color:#000096">&lt;subjectScheme&gt;</strong><br />    <strong class="hl-tag" style="color:#000096">&lt;subjectHead&gt;</strong><br />        <strong class="hl-tag" style="color:#000096">&lt;subjectHeadMeta&gt;</strong><br />            <strong class="hl-tag" style="color:#000096">&lt;navtitle&gt;</strong>Provide controlled attributes<strong class="hl-tag" style="color:#000096">&lt;/navtitle&gt;</strong><br />        <strong class="hl-tag" style="color:#000096">&lt;/subjectHeadMeta&gt;</strong><br />    <strong class="hl-tag" style="color:#000096">&lt;/subjectHead&gt;</strong><br />    <strong class="hl-tag" style="color:#000096">&lt;hasInstance&gt;</strong><br />        <strong class="hl-tag" style="color:#000096">&lt;subjectdef</strong> <span class="hl-attribute" style="color: #ff7935">keys</span>=<span class="hl-value" style="color: #993300">"languageTypeKey"</span><strong class="hl-tag" style="color:#000096">&gt;</strong><br />            <strong class="hl-tag" style="color:#000096">&lt;subjectdef</strong> <span class="hl-attribute" style="color: #ff7935">keys</span>=<span class="hl-value" style="color: #993300">"language-xml"</span><strong class="hl-tag" style="color:#000096">&gt;</strong><br />                <strong class="hl-tag" style="color:#000096">&lt;topicmeta&gt;</strong><br />                    <strong class="hl-tag" style="color:#000096">&lt;navtitle&gt;</strong>XML Syntax Highlight<strong class="hl-tag" style="color:#000096">&lt;/navtitle&gt;</strong><br />                <strong class="hl-tag" style="color:#000096">&lt;/topicmeta&gt;</strong><br />            <strong class="hl-tag" style="color:#000096">&lt;/subjectdef&gt;</strong><br />            <strong class="hl-tag" style="color:#000096">&lt;subjectdef</strong> <span class="hl-attribute" style="color: #ff7935">keys</span>=<span class="hl-value" style="color: #993300">"language-css"</span><strong class="hl-tag" style="color:#000096">&gt;</strong><br />                <strong class="hl-tag" style="color:#000096">&lt;topicmeta&gt;</strong><br />                    <strong class="hl-tag" style="color:#000096">&lt;navtitle&gt;</strong>CSS Syntax Highlight<strong class="hl-tag" style="color:#000096">&lt;/navtitle&gt;</strong><br />                <strong class="hl-tag" style="color:#000096">&lt;/topicmeta&gt;</strong><br />            <strong class="hl-tag" style="color:#000096">&lt;/subjectdef&gt;</strong><br />        <strong class="hl-tag" style="color:#000096">&lt;/subjectdef&gt;</strong><br />    <strong class="hl-tag" style="color:#000096">&lt;/hasInstance&gt;</strong><br />    <strong class="hl-tag" style="color:#000096">&lt;enumerationdef&gt;</strong><br />        <strong class="hl-tag" style="color:#000096">&lt;elementdef</strong> <span class="hl-attribute" style="color: #ff7935">name</span>=<span class="hl-value" style="color: #993300">"codeblock"</span><strong class="hl-tag" style="color:#000096">/&gt;</strong><br />        <strong class="hl-tag" style="color:#000096">&lt;attributedef</strong> <span class="hl-attribute" style="color: #ff7935">name</span>=<span class="hl-value" style="color: #993300">"outputclass"</span><strong class="hl-tag" style="color:#000096">/&gt;</strong><br />        <strong class="hl-tag" style="color:#000096">&lt;subjectdef</strong> <span class="hl-attribute" style="color: #ff7935">keyref</span>=<span class="hl-value" style="color: #993300">"languageTypeKey"</span><strong class="hl-tag" style="color:#000096">/&gt;</strong><br />    <strong class="hl-tag" style="color:#000096">&lt;/enumerationdef&gt;</strong><br /><strong class="hl-tag" style="color:#000096">&lt;/subjectScheme&gt;</strong></pre>then           you can refer to it from your main DITA Map           like:<pre class="pre codeblock language-xml"><strong class="hl-tag" style="color:#000096">&lt;topicref</strong> <span class="hl-attribute" style="color: #ff7935">href</span>=<span class="hl-value" style="color: #993300">"controlledValues.ditamap"</span> <span class="hl-attribute" style="color: #ff7935">format</span>=<span class="hl-value" style="color: #993300">"ditamap"</span> <span class="hl-attribute" style="color: #ff7935">type</span>=<span class="hl-value" style="color: #993300">"subjectScheme"</span><strong class="hl-tag" style="color:#000096">/&gt;</strong></pre></li>         <li class="li">If the attributes on which you want to impose certain values are <a class="xref" href="http://docs.oasis-open.org/dita/v1.2/os/spec/archSpec/condproc.html#condproc" target="_blank">DITA profiling attributes</a>, you can go to the           Oxygen <strong class="ph b">Preferences</strong>-&gt;<strong class="ph b">Editor / Edit modes / Author / Profiling/Conditional             Text</strong> page and define the set of allowed values for them.</li>       </ol></div>     <p class="p">The only problem with the first approach is the fact that validation will not impose those       values and writers will not receive validation error messages if they set another value for       the specific attribute. So you will probably need to add a Schematron check in order to signal       errors when a certain attribute's value does not match the list of controlled attribute       values. For both the second and third approaches, validation will warn the writers if certain       attribute values do not match values in the controller values list.</p>   </div><img src="http://feeds.feedburner.com/~r/AboutOxygenXmlEditor/~4/AGTBTAnCxA0?utm_source=feedburner&utm_medium=email" height="1" width="1" alt=""/></div>
</td>
</tr>
</table>
<table style="border-top:1px solid #999;padding-top:4px;margin-top:1.5em;width:100%" id="footer">
<tr>
<td style="text-align:left;font-family:Helvetica,Arial,Sans-Serif;font-size:11px;margin:0 6px 1.2em 0;color:#333;">You are subscribed to email updates from <a href="http://blog.oxygenxml.com/">About oXygen XML Editor</a>
<br />To stop receiving these emails, you may <a href="https://feedburner.google.com/fb/a/mailunsubscribe?k=y_tRXtumvTurKTedh51JnlYsGXw">unsubscribe now</a>.</td>
<td style="font-family:Helvetica,Arial,Sans-Serif;font-size:11px;margin:0 6px 1.2em 0;color:#333;text-align:right;vertical-align:top">Email delivery powered by Google</td>
</tr>
<tr>
<td colspan="2" style="text-align:left;font-family:Helvetica,Arial,Sans-Serif;font-size:11px;margin:0 6px 1.2em 0;color:#333;">Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States</td>
</tr>
</table>
</div>
</body>
</html>