code

<div xmlns="http://www.w3.org/1999/xhtml">
  <h3>Code Text</h3>
</div>

Element Information

Model

Attributes

QName Type Fixed Default Use Inheritable Annotation
code-type xsd:string optional
code-version xsd:string optional
executable restriction of xsd:NMTOKEN optional
id xsd:ID optional
language xsd:string optional
language-version xsd:string optional
orientation restriction of xsd:NMTOKEN portrait optional
platforms xsd:string optional
position restriction of xsd:NMTOKEN float optional
specific-use xsd:string optional
xml:base xs:anyURI optional
<div>
  <h3>base (as an attribute name)</h3>
  <p>denotes an attribute whose value provides a URI to be used as the base for interpreting any relative URIs in the scope of the element on which it appears; its value is inherited. This name is reserved by virtue of its definition in the XML Base specification.</p>
  <p>See
    <a href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a>for information about this attribute.</p>
</div>
xml:lang union of(xs:language, restriction of xs:string) optional
<div>
  <h3>lang (as an attribute name)</h3>
  <p>denotes an attribute whose value is a language code for the natural language of the content of any element; its value is inherited. This name is reserved by virtue of its definition in the XML specification.</p>
</div>
<div>
  <h4>Notes</h4>
  <p>Attempting to install the relevant ISO 2- and 3-letter codes as the enumerated possible values is probably never going to be a realistic possibility.</p>
  <p>See BCP 47 at
    <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a>and the IANA language subtag registry at
    <a href="http://www.iana.org/assignments/language-subtag-registry">http://www.iana.org/assignments/language-subtag-registry</a>for further information.</p>
  <p>The union allows for the 'un-declaration' of xml:lang with the empty string.</p>
</div>
xml:space restriction of xs:NCName preserve optional
<div>
  <h3>space (as an attribute name)</h3>
  <p>denotes an attribute whose value is a keyword indicating what whitespace processing discipline is intended for the content of the element; its value is inherited. This name is reserved by virtue of its definition in the XML specification.</p>
</div>

Used By

Source

<xsd:element name="code">
  <xsd:annotation>
    <xsd:documentation>
      <div xmlns="http://www.w3.org/1999/xhtml">
        <h3>Code Text</h3>
      </div>
    </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType mixed="true">
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:group ref="code-elements"/>
    </xsd:choice>
    <xsd:attribute name="code-type" use="optional" type="xsd:string"/>
    <xsd:attribute name="code-version" use="optional" type="xsd:string"/>
    <xsd:attribute name="executable" use="optional">
      <xsd:simpleType>
        <xsd:annotation>
          <xsd:documentation/>
        </xsd:annotation>
        <xsd:restriction base="xsd:NMTOKEN">
          <xsd:enumeration value="no"/>
          <xsd:enumeration value="yes"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
    <xsd:attribute name="id" use="optional" type="xsd:ID"/>
    <xsd:attribute name="language" use="optional" type="xsd:string"/>
    <xsd:attribute name="language-version" use="optional" type="xsd:string"/>
    <xsd:attribute name="orientation" use="optional" default="portrait">
      <xsd:simpleType>
        <xsd:annotation>
          <xsd:documentation/>
        </xsd:annotation>
        <xsd:restriction base="xsd:NMTOKEN">
          <xsd:enumeration value="landscape"/>
          <xsd:enumeration value="portrait"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
    <xsd:attribute name="platforms" use="optional" type="xsd:string"/>
    <xsd:attribute name="position" use="optional" default="float">
      <xsd:simpleType>
        <xsd:annotation>
          <xsd:documentation/>
        </xsd:annotation>
        <xsd:restriction base="xsd:NMTOKEN">
          <xsd:enumeration value="anchor"/>
          <xsd:enumeration value="background"/>
          <xsd:enumeration value="float"/>
          <xsd:enumeration value="margin"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
    <xsd:attribute name="specific-use" use="optional" type="xsd:string"/>
    <xsd:attribute ref="xml:base" use="optional"/>
    <xsd:attribute ref="xml:lang" use="optional"/>
    <xsd:attribute ref="xml:space" fixed="preserve"/>
  </xsd:complexType>
</xsd:element>

Sample