skip to main content
Authoring Source Documents » DITA - XML » Using markopen and markclose
Using markopen and markclose
This default.wwconfig modification specifies the start and a stop of an element. This is especially useful for the implementation of the dropdown elements in WebWorks Help 5 or WebWorks Reverb output. ePublisher has preconfigured items such as the Defintion Term Elements, below is an example of the sample DITA markup:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="simplelist" xml:lang="en-us">
  <title>Definition List</title>
  <conbody>
    <p>Definition list</p>
    <dl>
     <dlhead>
      <dthd>Image File View Selection</dthd>
      <ddhd>Resulting Information</ddhd>
     </dlhead>
     <dlentry>
      <dt>File Type</dt>
      <dd>Image's file extension</dd>
     </dlentry>
     <dlentry>
      <dt>Image Class</dt>
      <dd>Image is raster, vector, metafile or 3D</dd>
     </dlentry>
     <dlentry>
      <dt>Number of pages</dt>
      <dd>Number of pages in the image</dd>
     </dlentry>
     <dlentry>
      <dt>Fonts</dt>
      <dd>Names of the fonts contained within a vector image</dd>
     </dlentry>
    </dl>
    <p>Content after the definition list.</p>
  </conbody>
</concept>
Without the use of the markclose in the default.wwconfig, the last paragraph would be underneath the last Definition Term element. To make sure that no other elements are inside the dropdown, you can assign markclosed to it by creating an override to default.wwconfig located in [project directory]\Formats\Adapters\xml\scripts\dita. For more information, refer to Creating Format Overrides Below is an example of the modification needed to get the desired output:
  <!-- Mark open/close on definition entries -->
  <!--                                       -->
  <Style match="//*[contains(@class, ' topic/dlentry ')]">
   <xsl:variable name="VarName" select="'Definition List Entry'" />
   <wwditaconfig:Head name="{$VarName}" markopen="{$VarName} Open" markclose="{$VarName} Close" />
 </Style>
Was this helpful?
Last modified date: 11/13/2024