<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" xmlns:m="http://www.w3.org/1998/Math/MathML" id="m11215">
  <name>CNXML Reference Extensions</name>
  <metadata>
  <md:version>1.6</md:version>
  <md:created>2003/06/01 19:00:00 GMT-5</md:created>
  <md:revised>2004-02-24T17:37:49Z</md:revised>
  <md:authorlist>
    <md:author id="jago">
      <md:firstname>Adan</md:firstname>
      
      <md:surname>Galvan</md:surname>
      <md:email>jago@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="jago">
      <md:firstname>Adan</md:firstname>
      
      <md:surname>Galvan</md:surname>
      <md:email>jago@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>bibtexml</md:keyword>
    <md:keyword>glossary</md:keyword>
    <md:keyword>definition</md:keyword>
  </md:keywordlist>

  <md:abstract>A module describing the use of bibtexml with cnxml, as well as as introduction to the glossary tag.</md:abstract>
</metadata>

  <content>		
    <section id="introduction">
      <name>Introduction</name>
      <para id="intro_me">
	As an author/editor, you will often times need a way to
      include additional information in a document that does not
      actually appear in the flow of text. This information may
      include a glossary, and bibliographic references. There are many
      ways to include this type of information, but for our purposes,
      we have chosen to create a new CNXML tag named
      <code>glossary</code>, and have chosen to use an xml language
      called bibteXML for references. The two are described below. I
      have also included the glossary and bibteXML file examples in
      the source of this document. Scroll to the bottom of the page to
      see how these examples would be rendered.
      </para>
      <section id="introbibtex">
	<name>BibteXML</name>
	<para id="p1">
	  <quote type="block" src="http://freshmeat.net/projects/bibtexml/?topic_id=87">
	  "BibteXML is a bibliography DTD for XML that expresses the
	  content model of BibTeX, the bibliographic system for use
	  with LaTeX. It provides conversion tools for tagging your
	  bibliographic data in XML, or export it to HTML or native
	  BibTeX syntax, saving typing time."
	  </quote>
	  In plain language, this means that bibtexml is an XML version
	  of the popular and widely accepted latex extension
	  bibtex. One can markup references in their document using semantic
	  tags such as <code>author</code> and
	  <code>editor</code>. More info will be provided below.
	</para>
      </section>
      <section id="introglossary">
	<name>The 'Glossary' Tag</name>
	<para id="p2">
	  Often in textbooks there will be a list of definitions
	  included at the end of the book. In the same way, the
	  <code>glossary</code> tag will contain a list of definitions
	  that will be included at the end of a module. One can link
	  to these definitions using the <code>term</code> tag (see
	  <cnxn target="linking_to_definitions"/>).
	</para>
      </section>
    </section>

    <section id="gloosarymore">
      <name>Including a Glossary</name>
      <para id="cnxml_glossary">
	It is very easy to include a glossary in your CNXML
	document. In the <cnxn document="m9000">Basic CNXML
	Tutorial</cnxn> it is stated that the structure usually
	resembles the following:

	<list id="structure">
	  <name>Document</name>
	  <item><code>name</code></item>
	  <item><code>metadata</code>(optional)</item>
	  <item><code>content</code></item>
	</list>

	When one wishes to add a glossary the structure will change to
	match the following:

	<list id="structure2">
	  <name>Document</name>
	  <item><code>name</code></item>
	  <item><code>metadata</code>(optional)</item>
	  <item><code>content</code></item>
	  <item><code>glossary</code></item>
	</list>

	Inside of the glossary tag one can add as many definitions as
	one wishes. For more information on the definition tag, see
	the <link src="http://cnx.rice.edu/technology/cnxml/0.5/spec">CNXML 0.5 specification</link>.
      </para>

      <example id="glossary_example">
	<name>Glossary Example</name>
	<para id="glossary_examplepara">
	  Following is an example of the code necessary to add a
	  glossary with one definition.
	  <code type="block">
<![CDATA[<glossary>
  <definition id='quardef'>
    <term>quarter</term>
    <meaning><name>Meaning Name</name>One fourth of something.</meaning>
    <example id='def'>
      <para id='par'>
	"He cut the pie into quarters and gave all four people a
	piece."
      </para>
    </example>
    <meaning>25 cents, a quarter of a dollar.</meaning>
    <example id='def2'>
      <para id='par2'>
	"The drink cost a quarter."
      </para>
    </example>
    <example id='def3'>
      <para id='par3'>
	"She picked up a roll of quarters so that she could do
	laundry."
      </para>
    </example>
  </definition>
</glossary>]]>
	  </code>
	</para>
      </example>

      <example id="linking_to_definitions">
	<name>Linking to Definitions in a Glossary</name>
	<para id="linkingdef">
	  Often, one will need to refer to a definition in the
	  glossary. To do this, one can use the <code>term</code>
	  tag. By putting the <code>src</code> attribute in the term
	  tag, one can link to a definition. Simply set the value of
	  the <code>src</code> attribute to the <code>id</code> of the
	  definition in the glossary, and that term will automatically
	  become a link to the definition in the glossary. Shown below
	  is an example of the term tag being used to link to the
	  definition in the <cnxn target="glossary_example">definition
	  example</cnxn>:
	  <code type="block">
	    <![CDATA[<term src='#quardef'>quarter</term>]]>
	  </code>
	</para>
      </example>
    </section>      

    <section id="including_bibtexml">
      <name>Including BibteXML</name>
      <para id="cnxml_bibtexml">
	It is very easy to include a bibteXML reference section in your CNXML
	document. In the <cnxn document="m0000">Basic CNXML
	Tutorial</cnxn> it is stated that the structure usually
	resembles the following:

	<list id="structure3">
	  <name>Document</name>
	  <item><code>name</code></item>
	  <item><code>metadata</code>(optional)</item>
	  <item><code>content</code></item>
	</list>

	When one wishes to add a bibteXML reference section the
	structure will change to match the following:

	<list id="structure4">
	  <name>Document</name>
	  <item><code>name</code></item>
	  <item><code>metadata</code>(optional)</item>
	  <item><code>content</code></item>
	  <item><code>glossary</code></item>
	  <item><code>file</code></item>
	</list>

	<note>
	  It is possible to include either a glossary or a bibteXML
	  file or both. The only restriction is that if you include
	  both the glossary must precede the bibteXML file.
	</note>
	
	The <code>file</code> tag is the root tag of the bibteXML
	language. Inside of the file tag one will add other tags that
	correspond to the different type of bibliographical
	references. An example of a bibliography is given below:
      </para>
      <example id="bibtex_example">
	<name>BibteXML Example</name>
	<para id="bibtex_examplepara">
	  <code type="block">
<![CDATA[<bib:file>
  <bib:entry id="esbensen">
    <bib:book>
      <bib:author>Kim Esbensen; Tonje Midtgaard; Suzanne Schonkopf</bib:author>
      <bib:title>Multivariate Analysis in Practice</bib:title>
      <bib:publisher>Camo AS</bib:publisher>
      <bib:year>1994</bib:year>
      <bib:address>Trondheim</bib:address>
    </bib:book>
  </bib:entry>

  <bib:entry id="martens.nes">
    <bib:book>
      <bib:author>Harald Martens; Tormod Nas</bib:author>
      <bib:title>Multivariate Calibration</bib:title>
      <bib:publisher>John Wiley &amp; Sons Ltd.</bib:publisher>
      <bib:year>1989</bib:year>
      <bib:address>Chichester</bib:address>
    </bib:book>
  </bib:entry>
</bib:file>]]>
	  </code>
	  <note>Each tag in the example code begins with a namespace
	  prefix. In the case of bibteXML, the prefix is
	  <code>bib:</code>.</note>
	</para>
      </example>

      <example id="linking_to_bibliography">
	<name>Linking to Bibliography</name>
	<para id="linkingbib">
	  You will want to refer to an entry in the bibliography. To
	  do this, one can use the <code>cite</code> tag. By putting
	  the <code>src</code> attribute in the cite tag, one can link
	  to a bibliographic entry. Simply set the value of the
	  <code>src</code> attribute to the <code>id</code> of the
	  <code>bib:entry</code>, and that reference will automatically
	  become a link to the bibliographic entry. Shown below
	  is an example of the cite tag being used to link to the
	  bibliography in <cnxn target="bibtex_example"/>:
	  <code type="block">
	    <![CDATA[<cite src='#esbensen'>Multivariate Analysis in Practice</cite>]]>
	  </code>
	</para>
      </example>
      <section id="bibteXMLtags">
	<name>BibteXML Tags</name>
	<para id="bibteXMLtagspara">
	  By looking at <cnxn target="bibtex_example"/> one can see
	  the types of tags that are available for use in
	  bibteXML. Below I will attempt to give a brief explanation
	  on the use of some of the bibteXML tags. For more
	  information and the complete specification please see <link src="http://bibtexml.sourceforge.net/">BibteXML
	  Homepage</link>.
	</para>
	<section id="file">
	  <name>File</name>
	  <para id="file_para">
	    The <code>file</code> tag is the root tag of the bibteXML
	    language. It denotes the beginning of the bibliography.
	  </para>
	  <para id="file_para2">
	    <name>Children</name> The <code>file</code> tag must
	    contain one or more <code><cnxn target="entry">entry</cnxn></code> tags.
	  </para>
	</section>
	<section id="entry">
	  <name>Entry</name>
	  <para id="entry1">
	    The <code>entry</code> tag denotes the beginning of an
	    individual bibliographical reference.
	  </para>
	  <para id="entry2">
	    <name>Children</name> The <code>entry</code> must contain
	    one of the following containers:

	    <list id="entry_children"> 
	      <item>article</item>
	      <item>book</item>
	      <item>booklet</item>
	      <item>manual</item>
	      <item>techreport</item>
	      <item>mastersthesis</item>
	      <item>phdthesis</item>
	      <item>inbook</item>
	      <item>incollection</item>
	      <item>proceedings</item>
	      <item>inproceedings</item>
	      <item>conference</item>
	      <item>unpublished</item>
	      <item>misc</item>
	    </list>
	  </para>
	</section>

	<section id="containers">
	  <name>Containers</name>
	  <para id="contain_para">
	    Each of the possible children of <code>entry</code>
	    (article, book, booklet, etc.) are containers for metadata
	    on that specific type of entry.
	  </para>
	  <para id="container_children">
	    <name>Children</name> Every container tag must contain a
	    different combination of bibteXML <code><cnxn target="metadata_tags">metadata tags</cnxn></code>. For
	    more information on exactly which children a specific
	    container may possess, please see the <link src="http://bibtexml.sourceforge.net/">BibteXMLHomepage</link>.
	  </para>
	</section>
	<section id="metadata_tags">
	  <name>BibteXML Metadata Tags</name>
	  <para id="para1meta">
	    Every child listed as a possible child of <code><cnxn target="entry">entry</cnxn></code> can contain metadata
	    tags. These metadata tags are now listed.
	    <list id="meta_list">
	      <name>Metadata Tag List</name>
	      <item>address</item>
	      <item>author</item>
	      <item>booktitle</item>
	      <item>chapter</item>
	      <item>edition</item>
	      <item>editor</item>
	      <item>howpublished</item>
	      <item>institution</item>
	      <item>journal</item>
	      <item>month</item>
	      <item>note</item>
	      <item>number</item>
	      <item>organization</item>
	      <item>pages</item>
	      <item>publisher</item>
	      <item>school</item>
	      <item>series</item>
	      <item>title</item>
	      <item>type</item>
	      <item>volume</item>
	      <item>year</item>
	    </list>
	</para>
	  <para id="para2meta">
	    <name>Children</name>
	    Every metadata tag can contain unicode text.
	  </para>
	</section>
      </section>
    </section>
  </content>

   <glossary>
    <definition id="quardef">
      <term>quarter</term>
      <meaning><name>Meaning Name</name>One fourth of something.</meaning>
      <example id="def">
	<para id="par">
	  "He cut the pie into quarters and gave all four people a
	  piece."
	</para>
      </example>
      <meaning>25 cents, a quarter of a dollar.</meaning>
      <example id="def2">
	<para id="par2">
	  "The drink cost a quarter."
	</para>
      </example>
      <example id="def3">
	<para id="par3">
	  "She picked up a roll of quarters so that she could do
	  laundry."
	</para>
      </example>
    </definition>
  </glossary>
  
   <bib:file>
	      <bib:entry id="esbensen">
      <bib:book>
	<bib:author>Kim Esbensen; Tonje Midtgaard; Suzanne Schonkopf</bib:author>
	<bib:title>Multivariate Analysis in Practice</bib:title>
	<bib:publisher>Camo AS</bib:publisher>
	<bib:year>1994</bib:year>
	<bib:address>Trondheim</bib:address>
      </bib:book>
    </bib:entry>

    <bib:entry id="martens.nes">
      <bib:book>
	<bib:author>Harald Martens; Tormod Nas</bib:author>
	<bib:title>Multivariate Calibration</bib:title>
	<bib:publisher>John Wiley &amp; Sons Ltd.</bib:publisher>
	<bib:year>1989</bib:year>
	<bib:address>Chichester</bib:address>
      </bib:book>
    </bib:entry>
  </bib:file>

</document>
