<page xmlns="http://projectmallard.org/1.0/"
      type="topic"
      id="mal_inline_span">

<info>
  <link type="guide" xref="mal_inline#elements"/>
  <link type="seealso" xref="mal_attr_link"/>

  <revision version="0.1" date="2009-05-13" status="review"/>

  <credit type="author">
    <name>Shaun McCance</name>
    <email>shaunm@gnome.org</email>
    <years>2007-2009</years>
  </credit>

  <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude" />

  <desc>A generic inline element that can be used for semantic,
  localization, and styling purpose.</desc>
</info>

<title>Spans</title>

<synopsis><code mime="application/relax-ng-compact-syntax">
mal_inline_span = element span {
  <link xref="mal_attr_link">mal_attr_link</link> ?,
  attribute style { xsd:NMTOKENS } ?,
  attribute * - (mal:* | local:*) { text } *,

  <link xref="mal_inline">mal_inline</link>
}
</code></synopsis>

<p>Use the <code>span</code> element to surround a run of text
without using any of the semantic <link xref="mal_inline">inline
elements</link>.  This is frequently necessary for extensions
using attributes from external namespaces.</p>


<!-- BEGIN notes -->
<section id="notes">
  <title>Notes</title>
  <list>
    <item><p>The <code>span</code> element can contain a mixture of text and
    any <link xref="mal_inline">general inline elements</link>.</p></item>

    <item><p>The <code>span</code> element can occur in any
    general inline context, including inside most
    <link xref="mal_inline">inline elements</link>, some
    <link xref="mal_block#basic">basic block elements</link>, and certain
    <link xref="mal_info">informational elements</link>.</p></item>

    <item><p>The <code>span</code> element can link to other pages or documents.
    See <link xref="mal_attr_link"/> for more information.</p></item>

    <item><p>The <code>style</code> attribute takes a space-separated list of
    style hints.  Processing tools should adjust their behavior according to
    those style hints they understand.</p></item>

    <item><p>The <code>span</code> element can have attributes from external
    namespaces.  See <link xref="mal_external"/> for more information
    on external-namespace attributes.</p></item>
  </list>
</section>
<!-- END notes -->


<!-- BEGIN examples -->
<section id="examples">
  <title>Examples</title>

  <p>Use <code>span</code> with an external-namespace attribute to mark a word
  as untranslatable using the
  <link href="http://www.w3.org/TR/its/">Internationalization Tag Set</link>:</p>

  <example>
    <code><![CDATA[
This <span its:translate="no">word</span> should not be translated.]]></code>
    <p>This <span xmlns:its="http://www.w3.org/2005/11/its" its:version="1.0"
    its:translate="no">word</span> should not be translated.</p>
  </example>
</section>
<!-- END examples -->


<!-- BEGIN processing -->
<section id="processing">
  <title>Processing Expectations</title>

  <p>No particular special rendering is required for <code>span</code> elements.
  Processing tools may have special processing rules for certain style hints or
  external-namespace attributes.</p>
</section>
<!-- END processing -->


<!-- BEGIN comparison -->
<section id="comparison">
  <title>Comparison to Other Formats</title>
  <p>The <code>span</code> element is similar to the
  <code href="http://www.docbook.org/tdg/en/html/phrase.html">phrase</code>
  element in DocBook.</p>
</section>
<!-- END comparison -->

</page>
