<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:r="http://nwalsh.com/xmlns/schema-remap/" xmlns:db="http://docbook.org/ns/docbook" ns="http://docbook.org/ns/docbook" xmlns="http://relaxng.org/ns/structure/1.0">
  <!-- new element for CPU registers -->
  <define name="db.register">
    <element name="register">
      <r:remap>
        <db:emphasis role="bold"/>
      </r:remap>
      <text/>
    </element>
  </define>
  <!-- new element for instructions -->
  <define name="db.instruction">
    <element name="instruction">
      <r:remap>
        <db:code/>
      </r:remap>
      <text/>
    </element>
  </define>
  <!-- combined pattern -->
  <define name="asm.inlines">
    <choice>
      <ref name="db.register"/>
      <ref name="db.instruction"/>
    </choice>
  </define>
  <include href="docbook.rng">
    <!-- register and instruction are permitted everywhere in inline content -->
    <define name="db.general.inlines" combine="choice">
      <ref name="asm.inlines"/>
    </define>
  </include>
</grammar>
