<?xml version='1.0' encoding='ISO-8859-1'?>
<configuration 
  xmlns="http://www.xmlmind.com/xmleditor/schema/configuration"
  xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration">

  <binding>
    <keyPressed code="F2" />
    <command name="convertToBold" />
  </binding>

  <command name="convertToBold">
    <macro>
      <sequence>
	<command name="convert" 
                 parameter="[implicitElement] emphasis" />
        <command name="putAttribute" parameter="role bold" />
      </sequence>
    </macro>
  </command>

  <command name="convertToBold2">
    <macro>
      <sequence>
        <choice>
          <command name="selectNode" 
                   parameter="self[implicitElement] emphasis" />
          <command name="convert" 
                   parameter="[implicitElement] emphasis" />
        </choice>
        <command name="putAttribute" parameter="role bold" />
      </sequence>
    </macro>
  </command>

  <command name="insertLineBreak">
    <macro>
      <sequence>
        <command name="insert" parameter="into br" />

        <sequence>
          <pass><command name="selectNode"
                         parameter="parent p li dt dd th td" /></pass>
          <command name="insertNode" parameter="textAfter" />
          <command name="cancelSelection" />
        </sequence>
      </sequence>
    </macro>
  </command>

  <command name="insertCommandOutput">
    <macro>
      <sequence>
	<command name="run" />
	<command name="insertString" parameter="%_" />
      </sequence>
    </macro>
  </command>

  <command name="insertAfterAsParagraphs">
    <macro>
      <sequence>
	<command name="makeParagraphs" parameter="%0" />
	<command name="paste" parameter="after[implicitElement] %_" />
      </sequence>
    </macro>
  </command>

  <binding>
    <keyPressed code="F3" />
    <command name="insertAfterAsParagraphs" parameter="para" />
  </binding>

  <command name="insertFamousUlink">
    <macro>
      <sequence>
        <command name="pick" 
                 parameter="Favorites true
                            W3C
                            http://www.w3.org/TR/
                            'DocBook Oasis'
                            http://www.oasis-open.org/docbook/xml/
                            Java
                            http://java.sun.com/" />
        <set variable="url" expression="%_" plainString="true" />

        <command name="insert" parameter="into ulink" />

        <get expression="$url" />
        <command name="putAttribute" parameter="url %_" />

        <get expression="$url" />
        <command name="insertString" parameter="%_" />
      </sequence>
    </macro>
  </command>

  <command name="startImageViewer">
    <macro trace="false">
      <sequence>
	<get context="$implicitElement/@fileref" 
             expression="uri-to-file-name(resolve-uri(.))" />
	<command name="start" parameter='xv "%_"' />
      </sequence>
    </macro>
  </command>

  <command name="moveListItemUp">
    <macro trace="false">
      <sequence>
        <command name="selectNode" 
          parameter="ancestorOrSelf[implicitElement] listitem callout step" />
        <match context="$selected" pattern="*[position() &gt; 1]" />
        <set variable="anchor" context="$selected" 
             expression="./preceding-sibling::*[1]" />
	<command name="cut" />
	<set variable="selected" expression="$anchor" />
	<command name="paste" parameter="before" />
      </sequence>
    </macro>
  </command>

  <command name="moveListItemDown">
    <macro trace="false">
      <sequence>
        <command name="selectNode" 
          parameter="ancestorOrSelf[implicitElement] listitem callout step" />
        <match context="$selected" pattern="*[position() &lt; last()]" />
        <set variable="anchor" context="$selected" 
             expression="./following-sibling::*[1]" />
	<command name="cut" />
	<set variable="selected" expression="$anchor" />
	<command name="paste" parameter="after" />
      </sequence>
    </macro>
  </command>

  <command name="transposeChars">
    <macro>
      <sequence>
        <test expression="not($selected) and not($mark) and 
                          $dotOffset &gt; 0 and 
                          $dotOffset &lt; string-length($dot)"/>
        <command name="selectTo" parameter="previousChar" />
        <command name="cut" />
        <command name="moveDotTo" parameter="nextChar" />
        <command name="paste" parameter="into" />
      </sequence>
    </macro>
  </command>

</configuration>
