<convert name="sdf">

  <!-- Rename //pose/@frame to //pose/@relative_to -->
  <convert descendant_name="pose">
    <move>
      <from attribute="frame"/>
      <to attribute="relative_to"/>
    </move>
  </convert>

  <!-- Convert use_parent_model_frame==TRUE to axis/xyz/@expressed_in='__model__' -->
  <!-- and remove use_parent_model_frame from joints -->
  <convert descendant_name="joint">
    <convert name="axis">
      <map>
        <from name="use_parent_model_frame">
          <value>true</value>
          <value>True</value>
          <value>TRUE</value>
          <value>1</value>
        </from>
        <to name="xyz/@expressed_in">
          <value>__model__</value>
        </to>
      </map>
      <remove element="use_parent_model_frame"/>
    </convert>
    <convert name="axis2">
      <map>
        <from name="use_parent_model_frame">
          <value>true</value>
          <value>True</value>
          <value>TRUE</value>
          <value>1</value>
        </from>
        <to name="xyz/@expressed_in">
          <value>__model__</value>
        </to>
      </map>
      <remove element="use_parent_model_frame"/>
    </convert>
  </convert>

</convert> <!-- End SDF -->
