<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version='1.0'
				xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
				xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns" 
				xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema" 
				xmlns:dc="http://purl.org/metadata/dublin_core" 
				xmlns:dcn="DCN150.DTD">

<xsl:template match='/'>
	<HTML>
	<HEAD>
	<STYLE type='text/css'>
	H5 {text-italic}
	*.CategoryDictionaryTitle {display:none}
	*.CategoryDictionaryName {display:div;font:bold}
	*.Button	{background-color:6666cc; text-align:center;font-variant:smallcaps}
	*.ThisButton	{background-color:white; text-align:center;font-variant:smallcaps}
	*.Button a:link {color:white;font:bold};
	*.Button a:visited {color:white;font:bold};
	a:visited{color:black; text-decoration:none}
	a:link {color:black; text-decoration:none}
	a:hover {color:blue; text-decoration:none}
	td {vertical-align:top}
	td.col1st {width:10%}
	</STYLE>
	<TITLE>Data Consortium Dictionary [April 30, 2002]</TITLE>
	</HEAD>
	<BODY>
		<xsl:apply-templates select='rdf:RDF'/>
	</BODY>
	</HTML>
</xsl:template>

<xsl:template match='rdf:RDF'>
	<xsl:call-template name="buttonBar" />
	<H1>Introduction to the Data Consortium Taxonomy</H1>
	<table cellspacing='10'>
	<tr><td><b>Document<br/>Abstract</b></td>
	<td>This publication contains the vocabulary referenced by XML elements defined by the Data Consortium Namespace (DCN).
	The DCN defines 8 XML elements that correspond to the types of <u>resources</u> that are referenced by real estate investor
	and other practitioners. The DCN also defines <u>attributes</u> for these resource-types. This dictionary contains the names
	of resources, and names for values of attributes, which are used when datastreams representing real estate documents
	of one kind or another are encoded using the DCN elements. For more information about the encoding of DCN datastreams,
	please see <a href='http://www.dataconsortium.org'>http://www.dataconsortium.org</a>.
	</td>
	</tr>
	<tr><td><b>Organization</b></td>
	<td>This document contains a list of the terms in the DCN's vocabulary, sorted by resource-type and attribute-type. The definitions for terms are 
	provided by a companion (alphabetically-organized) publication. The objective of this publication is to identify the <u>taxonomy</u> of the
	terms in the DCN's vocabulary. The DCD's taxonomy is a hierarchical classification of its terms into (1) base classes, which are also called
	resource-types (2) categories within the base classes, which are also called <i>xsi-type</i>s and (3) classes, which are the terms. 
	However, depending on the resource-type, further levels of classificaton are established to relate vocabulary terms as sub-types of other terms. 
	</td>
	</tr>
	<tr><td><b>Status</b></td>
	<td>This is an update to the 5th working draft for review by the public and by members of the Data Consortium. 
	The Consortium expects to clarify points of uncertainty and ommission that arise in the on-going review of this draft.
	Following that period of review, it is the Data Consortium's intent to issue a Last Call for Review, and to then freeze this Dictionary for publication. 
	This schedule may vary, depending on the comments of the public on this draft. Such comments are instrumental in the Data Consortium's deliberations, and we 
	encourage readers to review the draft and send comments to the 	<a href='http://www.dataconsortium.org'>Data Consortium Bulletin Board </a>
	or by contacting: <a href='mailto:hypergrove@olympus.net'>John McClure</a>, <a href='mailto:fisher@indiana.edu'>Jeff Fisher</a>, or 
	<a href='mailto:myoung@rreef.com'>Mike Young </a>.
	</td>
	</tr>
	<tr><td><b>Log</b></td>
	<td>Since the last draft update the "Product" and "Service" classes have been converted to categories under a new "Item" Class.
        The "Topic" class has been eliminated and topics added as a category to the "Entry" class.  
	</td>
	</tr>
	<tr><td><b>Copyright</b></td>
	<td>	<u><b>Copyright Data Consortium. All Rights Reserved.</b></u> Data Consortium rules for document use apply.<br/>
     <span class="p quote boxed" style="font-size:smaller">
                      <span style="display:block;height:1em"/>
By using or copying this document, you, the licensee, agree that you have read, 
understood, and will comply with the following terms and conditions: 
<span class="ol quote">
                        <span class="li">
                          <span class="p">(1) You, the licensee, have permission to use, copy, and distribute the contents of this 
	document, or the Data Consortium document from which this statement is linked, in any 
	medium, for any purpose, and without fee or royalty, provided that you include the 
	following on all copies of the document, or portions thereof, that you use, copy, or 
	distribute:</span>
                          <span class="indent">
                            <span class="li p">(a) A link or URL to the original Data Consortium document or to the Data Consortium 
		web site if a direct link to the document is not available.
		</span>
                            <span class="li p">(b) The pre-existing copyright notice of the original author, or, if it does not exist,
		a notice with appropriate links of the form: 
		'Copyright Data Consortium. All Rights Reserved. 
		Data Consortium rules for document use, software, and liability apply.'
		</span>
                            <span class="li p">(c) If it exists, the status of the Data Consortium document and its document prefix and number.</span>
                            <span class="li p">(d) Authorship attribution in any software, documents, or other items or products that 
		you create pursuant to the implementation of the contents of this document, or any 
		portion thereof.</span>
                            <span class="li p">(e) The full text of this license granted perpetually with respect to Data Consortium 
		intellectual property to future licensees.</span>
                          </span>
                        </span>
                        <span class="li p">(2) You, the licensee, have no right to create modifications or derivatives of this 
document or any Data Consortium documents.
</span>
                      </span>
                      <span class="li p">(3) Individuals who are not Data Consortium Members may not use the names or trademarks 
of copyright holders in advertising or publicity pertaining to this document or its 
contents without specific, written, prior permission. A Data Consortium Member may, 
however, use the Data Consortium logo in advertising or publicity provided that the 
Member's products comply with Data Consortium standards.
</span>
                    </span>
	</td>
	</tr>
	</table>
	
	<hr/>
	<h1>The Data Consortium Taxonomy</h1>
<!--
	<h2>Entries with multiple superclasses</h2>
	<xsl:apply-templates select="//rdfs:Class[count(rdfs:subClassOf)>1]"/></xsl:if>
-->
	<xsl:for-each select="//rdfs:Class[rdfs:subClassOf/@rdf:resource='#DCNResource']">
		<xsl:variable name="rdfID" select='@rdf:ID'/>
		<xsl:element name="H2">
			<xsl:attribute name="id"><xsl:value-of select="$rdfID"/>Taxonomy</xsl:attribute>
			<xsl:value-of select="$rdfID"/> Taxonomy
		</xsl:element>
		<xsl:call-template name='classTree.list'><xsl:with-param name="roots" select='//rdfs:Class[@rdf:ID=$rdfID]'/></xsl:call-template>
		<hr/>
	</xsl:for-each>
	<H2>Data Consortium Dictionary</H2>
	<xsl:apply-templates select='//rdf:Property|//rdfs:Class' mode='alpha'>
		<xsl:sort select='@rdf:ID'/>
	</xsl:apply-templates>
</xsl:template>
<xsl:template match='rdfs:Class' mode='alpha'>
	<xsl:element name='div'>
	<xsl:attribute name="class">ClassName</xsl:attribute>
	<xsl:attribute name='id'><xsl:value-of select='@rdf:ID'/></xsl:attribute>
	<span style='font:bold italic'><xsl:value-of select='rdfs:label'/></span>
	<xsl:value-of select='rdfs:comment'/>
	</xsl:element>
</xsl:template>
<xsl:template name='classTree.list'>
	<xsl:param name="roots" />
	<div style='margin-left:3em'>
	<xsl:for-each select="$roots">
		<xsl:sort select='./@rdf:ID'/>
		<xsl:variable name="classID" select="concat('#',./@rdf:ID)"/>
		<xsl:variable name="children" select="//rdfs:Class[rdfs:subClassOf/@rdf:resource=$classID]"/>
		<xsl:if test="$children">
			<xsl:for-each select="$children">
				<xsl:sort select='./@rdf:ID'/>
				<xsl:variable name="subclassID" select="concat('#',./@rdf:ID)"/>
				<xsl:if test="not(//rdfs:Class[rdfs:subClassOf/@rdf:resource=$subclassID])">
					<span style='font-variant:none'><xsl:apply-templates select='.'/></span>
				</xsl:if>
			</xsl:for-each>
			<xsl:for-each select="$children">
				<xsl:sort select='./@rdf:ID'/>
				<xsl:variable name="subclassID" select="concat('#',./@rdf:ID)"/>
				<xsl:if test="//rdfs:Class[rdfs:subClassOf/@rdf:resource=$subclassID]">
					<div><span style='text-decoration:underline;color:gray;font:bold;font:italic bold'><xsl:apply-templates select='.'/></span></div>
					<xsl:call-template name="classTree.list">
						<xsl:with-param name='roots' select="."/>
					</xsl:call-template>
				</xsl:if>
			</xsl:for-each>
		</xsl:if>
	</xsl:for-each>
	</div>
</xsl:template>

<!--
<xsl:template name='find-branches'>
<xsl:param name="nodes" />
	find-branches nNodes: <xsl:value-of select="count($nodes)"/>?
	<xsl:for-each select="$nodes">
		<xsl:sort select='./@rdf:ID'/>
		<xsl:variable name="classID" select="concat('#',./@rdf:ID)"/>
		<xsl:if test="//rdfs:Class[rdfs:subClassOf/@rdf:resource=$classID]">
			<xsl:copy-of select='.'/>
		</xsl:if>
	</xsl:for-each>
</xsl:template>
<xsl:template name='find-leaves'>
<xsl:param name="nodes" />
	find-leaves nNodes: <xsl:value-of select="count($nodes)"/>?
	check nodes: <xsl:if test="$nodes">hello nodes!</xsl:if>
	<xsl:for-each select="$nodes">
		<xsl:sort select='./@rdf:ID'/>
		[<xsl:value-of select="@rdf:ID"/>]
		<xsl:variable name="classID" select="concat('#',./@rdf:ID)"/><xsl:message><xsl:value-of select="$classID"/></xsl:message>
		<xsl:choose>
    			<xsl:when test="//rdfs:Class[rdfs:subClassOf/@rdf:resource=$classID]"></xsl:when>
			<xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
	    </xsl:choose>
	</xsl:for-each>
</xsl:template>
-->
<xsl:template match='rdfs:Class'>
     <xsl:variable name="rdfID"><xsl:value-of select="@rdf:ID"/></xsl:variable>
     <xsl:variable name="refID">#<xsl:value-of select="@rdf:ID"/></xsl:variable>
	<xsl:element name='span'>
		<xsl:attribute name="class">ClassName</xsl:attribute>
		<xsl:attribute name='style'>wdth:12em</xsl:attribute>
		<xsl:element name="a">
			<xsl:attribute name="href"><xsl:value-of select="$refID"/></xsl:attribute>
			<xsl:value-of select='$rdfID'/>
		</xsl:element>
		<span style='width:2em'/>
	</xsl:element>
</xsl:template>
<xsl:template match='rdf:Property'>
	<xsl:element name='span'>
		<xsl:attribute name="class">AttributeName</xsl:attribute>
		<xsl:attribute name='style'>width:13em</xsl:attribute>
		<xsl:attribute name='id'><xsl:value-of select='@rdf:ID'/></xsl:attribute>
		<xsl:value-of select='@rdf:ID'/>
	</xsl:element>
</xsl:template>

<xsl:template match='baseClass'>
	<br/>=&gt;<xsl:element name='a'><xsl:attribute name='href'><xsl:value-of select='@rdf:resource'/></xsl:attribute><xsl:value-of select='@rdf:resource'/></xsl:element>
</xsl:template>

<xsl:template match='rdfs:subPropertyOf'>
	(=&gt;<xsl:value-of select='@rdf:resource'/>) 
</xsl:template>

<xsl:template name='buttonBar'>
	<table width='100%'>
	<tr>
	<td class='Button'><a class='TopPtr' href='#Alphabetic'>All <br/>Names</a></td>
	<td style='width:1em'/>
	<td class='Button'><a class='TopPtr' href='#ActorTaxonomy'>Actor <br/>Taxonomy</a></td>
	<td class='Button'><a class='TopPtr' href='#DocumentTaxonomy'>Document <br/>Taxonomy</a></td>
	<td class='Button'><a class='TopPtr' href='#EntryTaxonomy'>Entry<br/>Taxonomy</a></td>
	<td class='Button'><a class='TopPtr' href='#EventTaxonomy'>Event<br/>Taxonomy</a></td>
	<td style='width:1em'/>
	</tr><tr>
	<td class='Button'><a class='TopPtr'><br/></a></td>
	<td style='width:1em'/>
	<td class='Button'><a class='TopPtr' href='#ItemTaxonomy'>Item<br/>Taxonomy</a></td>
	<td class='Button'><a class='TopPtr' href='#LocationTaxonomy'>Location<br/>Taxonomy</a></td>
	<td class='Button'><a class='TopPtr' href='#PropertyTaxonomy'>Property<br/>Taxonomy</a></td>
	<td class='Button'><a class='TopPtr' href='#QualifiedResource'>Qualified<br/>Resource</a></td>
	<td style='width:1em'/>
	</tr>
	</table>
</xsl:template>
</xsl:stylesheet>
