<page>

   <title>d20ML</title>
   <summary>A markup language for roleplaying content</summary>

   <head>Introduction</head>
 
     <p>d20ML is a d20 content markup language.  It is not restricted
     for use under the d20 STL, although it is designed for this
     use.</p>

     <p>d20ML is an XML vocabulary for representing common d20
     roleplaying concepts, like characters, spells, and feats.  There
     will eventually be tools that transform d20ML content into a
     variety of more useable forms, such as formatted HTML, PDF, and
     maybe others.</p>

     <p>Currently, d20ML consists of this document, nothing more.
     There are no tools, no documents other than the examples here.
     It may develop into something more, but there is no guarantee
     that this will ever happen.  I have a real life, too.</p>

   <head>An Example Document</head>
 
     <pre>
&lt;document id="SampleDocument"
          xmlns="http://d20ML.svincent.com/"&gt;
  &lt;name&gt;A sample Document&lt;/name&gt;
  &lt;summary&gt;A simple example document, to prove a point&lt;/summary&gt;

  &lt;body&gt;

    &lt;section id="Introduction"&gt;
      &lt;name&gt;Introduction&lt;/name&gt;
      &lt;summary&gt;An optional summary of this section.&lt;/summary&gt;

      &lt;body&gt;
	&lt;p&gt;Some normal paragraph text.  Paragraphs contain text and
	other &lt;strong&gt;inline&lt;/strong&gt; elements.&lt;/p&gt;
      &lt;/body&gt;
    &lt;/section&gt;

    &lt;item id="Boot"&gt;
      &lt;name&gt;Boot&lt;/name&gt;
      &lt;weight&gt;2 lb&lt;/weight&gt;
      &lt;cost&gt;4 gp&lt;/cost&gt;
      &lt;summary&gt;Hard external foot coverings.&lt;/summary&gt;

      &lt;description&gt;
	&lt;p&gt;Some explanatory text about boots&lt;/p&gt;

	&lt;p&gt;Can have links to &lt;a href="srd.xml#Monster-Griffon"&gt;
        other objects.&lt;/a&gt; &lt;/p&gt;
      &lt;/description&gt;
    &lt;/section&gt;

  &lt;/body&gt;

&lt;/document&gt;
     </pre>


   <head>Basic Document Structure</head>
 
   <head2>Namespace</head2>

     <p>All core elements in d20ML use the following namespace URI:
     <uri>http://d20ML.svincent.com/</uri></p>

     <head2>The &lt;document&gt; element</head2>

     <p>Every d20ML document contains, at its top-level, a &lt;document&gt;
     element.  This element will contain a nested name element, a
     nested summary element, and zero or more object elements.</p>

     <head2>Object elements</head2>

     <p>Object elements correspond to objects in the roleplaying
     world.  Characters, items, spells, gods, and feats are all
     represented as object elements.</p>

     <p>Also, block-level objects in the document itself are also
     object elements (such as paragraphs and tables).</p>

     <p>Object elements are rendered as block-level elements.  That
     is, when rendered, they will occupy a rectangular region of
     screen real estate.</p>

     <p>Object elements can have IDs, specified by an id attribute on
     the object element tag.  They can then be referred to by Object
     Element URIs, described below.</p>

     <p>The basic structure of an object element follows.</p>

     <pre>
&lt;tagName id="ObjectID"&gt;
  &lt;name&gt;Name of object (usually required)&lt;/name&gt;
  &lt;summary&gt;Summary of object (usually optional)&lt;/summary&gt;

  &lt;!-- Contents: other element-specific children. --&gt;

&lt;/tagName&gt;
     </pre>

     <p>Examples follow.</p>

     <pre>
&lt;item id="Item-Sword"&gt;
  &lt;name&gt;Sword&lt;/name&gt;
  &lt;summary&gt;Sharp object for hurting people.&lt;/summary&gt;
  &lt;price&gt;20gp&lt;/price&gt;
  &lt;weight&gt;2lb&lt;/weight&gt;
  &lt;description&gt;
    &lt;p&gt;This is your normal sword, basically.&lt;/p&gt;
  &lt;/description&gt;
&lt;/item&gt;

&lt;section id="Section-Introduction"&gt;
  &lt;name&gt;Introduction&lt;/name&gt;
  &lt;summary&gt;A basic introduction.&lt;/summary&gt;
  &lt;body&gt;
    &lt;p&gt;This is your normal sword, basically.&lt;/p&gt;
  &lt;/body&gt;
&lt;/section&gt;
     </pre>


   <head2>Attribute elements</head2>

     <p>Many Object elements have one or more 'attributes', which are
     named properties associated with the node.</p>

     <p>They look like this:</p>
     <pre>
&lt;name&gt;Value here, maybe with inline markup&lt;/name&gt;
     </pre>

     <p>Examples follow.</p>
     <pre>
&lt;price&gt;20gp&lt;/price&gt;

&lt;weight&gt;2lb&lt;/weight&gt;

&lt;friend&gt;friends.xml#Friend-Fred&lt;/friend&gt;

&lt;body&gt;
  &lt;p&gt;Attributes may contain object tags.&lt;/p&gt;
&lt;/body&gt;
     </pre>

   <head2>Object Element URIs</head2>

     <p>Often, you will want to refer to an object in your document,
     typically as a link.  For this reason, d20ML provides Object
     Element URIs, which are unique URIs corresponding </p>

     <p>The structure of such an URI is straightforward: it consists
     of the URI of the containing document file, with a fragment
     identifier equal to the object's ID appended.</p>

     <p>For example:</p>

     <pre>
http://www.svincent.com/d20/srd/srd.xml#Monster-UmberHulk

http://www.svincent.com/d20/Phade/characters.xml#Character-VishusVeeZul
     </pre>

   <head2>The &lt;ref&gt; Tag</head2>

     <p>Sometimes, you want to include an object in more than one
     document.  This can be used to include a character in more than
     one adventure, or just to reuse text (sortof an include
     mechanism).</p>

     <p>The core of this mechanism is the &lt;ref&gt; tag.  An example
     to illustrate:</p>

     <pre>
&lt;ref href="newFeats.xml#Feat-FireEyes"/&gt;
     </pre>

     <p>Using the &lt;ref&gt; tag is exactly equivalent to placing the
     object inline.  In this way, you can seperate objects into files
     independently of what document structure you would like them to
     have, as well as reuse content without copying-and-pasting.</p>

   <head>Issues</head>

     <ul>
       <li><p>table support</p></li>
       <li><p>licencing objects (open/PI/copyrighted)</p></li>
       <li><p>compatibility with d20-xml</p></li>
     </ul>

</page>
