Project | WXT | Basics | Download | Documentation | Samples

References

You can manage references in WXT in may ways. You can of course introduce a webreference anywhere as simple html (a-tag). In addition to that WXT has some mechanismes for reference handling.

  1. Crossrefs References within a site (as defined in a script), from module to module is best handled with an xlink, see Xlink . The PI takes a modules id as parameter and will work as long you have unique id for modules in the script. You may thus rename the module and/or move it on your disk without breaking the link.
  2. Demolink a demolink, see Demolink , is a general PI that has been introduced to produce a XHTML-fragment that links to any webpage, with any style. Since the PI lets you control the styleclass, you may work with many categories of links, each with its own styling.
  3. General references This is the most ambitious referencehandling in WXT. It attempts to organize references of many types and display them in three basic forms: SIMPLE, IEEE and HARVARD. This referencehandling involves three steps:
    • One or more files with a description of all references you intend to use, References .
    • a PI to display one reference in the running text, Ref .
    • a PI to display reference lists, RefList .

The schema for controlling reference files:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="reflist">
        <xs:complexType>
            <xs:choice maxOccurs="unbounded">
               <xs:element ref="ref" maxOccurs="unbounded"/>
            </xs:choice>
            <xs:attribute name="version" type="xs:decimal" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="ref">
        <xs:complexType>
            <xs:all>
                <xs:element ref="title" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="authors" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="year" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="chaptertitle" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="journal" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="editor" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="place" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="publisher" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="pages" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="isbn" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="uri" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="text" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="categories" minOccurs="0" maxOccurs="1"/>
             </xs:all>
            <xs:attribute name="id" type="xs:string" use="required"/>
        </xs:complexType>
    </xs:element>
    <!-- this is the definitions -->
    <xs:element name="title" type="xs:string"/>
    <xs:element name="authors" type="xs:string"/>
    <xs:element name="year" type="xs:short"/>
    <xs:element name="chaptertitle" type="xs:string"/>
    <xs:element name="journal" type="xs:string"/>
    <xs:element name="editor" type="xs:string"/>
    <xs:element name="place" type="xs:string"/>
    <xs:element name="publisher" type="xs:string"/>
    <xs:element name="pages" type="xs:string"/>
    <xs:element name="isbn" type="xs:string"/>
    <xs:element name="uri">
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="xs:anyURI">
                    <xs:attribute name="dateread" type="xs:string" use="optional"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="text" type="xs:string"/>
    <xs:element name="categories" type="xs:string"/>
</xs:schema>

A sample file

<?xml version="1.0" encoding="UTF-8"?>
<reflist version="1.0">   
         
    <ref id="As we may think">
        <uri dateread="14-03-20009">http://www.theatlantic.com/doc/194507/bush</uri>
        <year>1945</year>
        <title>As we may think</title>
        <publisher>the Atlantic</publisher>
        <authors>Bush,Vannevar</authors>
        <categories>tec</categories>
    </ref>
    
    <ref id="Mindstorms">
        <authors>Papert,Seymour</authors>
        <publisher>Harvester Press</publisher>
        <title>Mindstorms, Children Computers and Powerful Ideas</title> 
        <year>1980</year>
        <isbn>0-85527-163-9</isbn>
        <categories>ped</categories>
    </ref>
    
    <ref id="web2">
        <title>Web 2.0</title>
        <year>2005</year>
        <uri dateread="14-03-20009">http://en.wikipedia.org/wiki/Web_2.0</uri>
    </ref>    
</reflist>