<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<!-- <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"> -->
	<xsl:template match="/">
		<HTML>
			<HEAD>
				<TITLE>
					<xsl:value-of select="/CRMset/CRM_Entity/text()"/>
				</TITLE>
				<STYLE TYPE="text/css">BODY { font-family: Georgia, Garamond, Palatino, "Times New Roman"; margin-top: 0px; margin-left: 10px; line-height: 14pt; margin-bottom: 0pt; 
text-align: left; } 
 H4, H5, H6 { font-family: Arial; font-style: normal;color: black; } 
 H4 {font-size: x-small;  margin-left: 1cm; margin-bottom: 0pt; margin-top: 0pt; padding-top: 0pt; padding-left: 0pt;} 
 H5 {font-size: x-small;   font-style: normal;  margin-left: 1cm; margin-bottom: 0pt; margin-top: 0pt; padding-top: 0pt; padding-left: 0pt;} 
 H6 {font-size: x-small;  font-style: italic; font-weight: normal; margin-left: 0cm; margin-top: 0pt; margin-bottom: 0pt;  padding-bottom: 0pt; }
 H7 {font-size: x-small;   font-style: normal; font-weight: bolder;  margin-left: 0cm; margin-bottom: 0pt; margin-top: 0pt; padding-top: 0pt; padding-left: 0pt;} 
 P { line-height: 13pt; text-indent: 5pt; margin-left: 2px; } .note { color: blue; }</STYLE>
			</HEAD>
			<BODY BGCOLOR="#FFFFFF">
				<xsl:apply-templates/>
			</BODY>
		</HTML>
	</xsl:template>
	
	<xsl:template match="CRMset">
		<xsl:apply-templates/>
	</xsl:template>
	
	<xsl:template match="E1.CRM_Entity">
		<H7>
		<br/>
		<p>
			<span style="font-weight:bold;">
				<xsl:value-of select="node()/text()"/>  
			</span>

			<xsl:if test="in_class!=''">
			<xsl:text> </xsl:text>
				<span style="font-weight:normal;">(<xsl:value-of select="in_class"/>)
				</span>	
			</xsl:if>		
		</p>	
		</H7>
		<H4>
			<xsl:apply-templates/>
		</H4>
	</xsl:template>
	
	
	 <xsl:template match="P70F.documents | P70B.is_documented_in">
		<H6>
			<xsl:value-of select="name()"/>
   			 <H5>
				<xsl:value-of select="Identifier"/>
				<xsl:if test="in_class != ''">
					<xsl:text> </xsl:text>
					<span style="font-weight:normal;">(<xsl:value-of select="in_class"/>)</span>
				</xsl:if>
			</H5>
		</H6>
		<xsl:if test="in_class = 'E31.Document'">
			<img width="250">
				<xsl:attribute name="src">../photos/<xsl:value-of select="Identifier"/></xsl:attribute>
			</img>
		</xsl:if>
		<H4>
			<xsl:apply-templates/>
		</H4>
	</xsl:template> 
	
	<xsl:template match="P3F.has_note |  P14F.carried_out_by | P14B.performed | P16F.used_specific_object | P16B.was_used_for | P19F.was_intended_use_of | P19B.was_made_for | P62F.depicts | P62B.is_depicted_by | P67F.refers_to | P67B.is_referred_to_by | P69F.is_associated_with | P102F.has_title | P102B.is_title_of | P130F.shows_features_of | P130B.features_are_also_found_on | P136F.was_based_on | P136B.supported_type_creation  | P137F.is_exemplified_by | P137B.exemplifies | P138F.represents | P138B.has_representation  | P139F.has_alternative_form ">
	<H6>
	<xsl:value-of select="name()"/>
	   <H5>
				<xsl:value-of select="Identifier"/>
				<xsl:text> </xsl:text>
				<span style="font-weight:normal;">
						<xsl:value-of select="String"/>
				</span>
			</H5>
		</H6>	
		<H4>
			<xsl:apply-templates/>
		</H4>
	</xsl:template>
	
	<xsl:template match="P3.1F.has_type | //P14.1F.in_the_role_of | //P16.1F_mode_of_use | //P19.1F_mode_of_use | // P62.1F_mode_of_depiction | //P67.1F_has_type | //P69.1F_has_type | //P102.1F_has_type | //P130.1F_kind_of_similarity | //P136.1F_in_the_taxonomic_role | //P137.1F_in_the_taxonomic_role | //P138.1F_mode_of_representation | //P139.1F_has_type">
	 <H6>
		<xsl:value-of select="name()"/>
		<h5>
		<xsl:value-of select="//P3.1F_has_type | //P14.1F.in_the_role_of | //P16.1F_mode_of_use | //P19.1F_mode_of_use | // P62.1F_mode_of_depiction | //P67.1F_has_type | //P69.1F_has_type | //P102.1F_has_type | //P130.1F_kind_of_similarity | //P136.1F_in_the_taxonomic_role | //P137.1F_in_the_taxonomic_role | //P138.1F_mode_of_representation | //P139.1F_has_type"/>
		</h5>
	</H6>
	<H4>
		<xsl:apply-templates/>
	</H4>
	</xsl:template>
	
	
	<xsl:template match="P1F.is_identified_by | P1B.identifies | P2F.has_type | P2B.is_type_of |  P4F.has_time-span | P4B.is_time-span_of | P5F.consists_of | P5B.forms_part_of | P7F.took_place_at | P7B.witnessed | P8F.took_place_on_or_within | P8B.witnessed | P9F.consists_of | P9B.forms_part_of | P10F.falls_within | P10B.contains | P11F.had_participant | P11B.participated_in | P12F.occurred_in_the_presence_of | P12B.was_present_at | P13F.destroyed | P13B.was_destroyed_by |  P15F.was_influenced_by | P15B.influenced |  P17F.was_motivated_by | P17B.motivated |  P20F.had_specific_purpose | P20B.was_purpose_of | P21F.had_general_purpose | P21B.was_purpose_of | P22F.transferred_title_to | P22B.acquired_title_through | P23F.transferred_title_from | P23B.surrendered_title_through | P24F.transferred_title_of | P24B.changed_ownership_through | P25F.moved | P25B.moved_by | P26F.moved_to |   P26B.was_destination_of | P27F.moved_from | P27B.was_origin_of | P28F.custody_surrendered_by | P28B.surrendered_custody_through | P29F.custody_received_by | P29B.received_custody_through | P30F.transferred_custody_of | P30B.custody_transferred_through | P31F.has_modified | P31B.was_modified_by | P32F.used_general_technique | P32B.was_technique_of | P33F.used_specific_technique | P33B.was_used_by | P34F.concerned | P34B.was_assessed_by | P35F.has_identified | P35B.identified_by | P36F.registered | P36B.was_registered_by | P37F.assigned | P37B.was_assigned_by | P38F.deassigned | P38B.was_deassigned_by | P39F.measured | P39B.was_measured_by | P40F.observed_dimension | P40B.was_observed_in | P41F.classified | P41B.was_classified_by | P42F.assigned | P42B.was_assigned_by | P43F.has_dimension | P43B.is_dimension_of | P44F.has_condition | P44B.condition_of | P45F.consists_of | P45B.is_incorporated_in | P46F.is_composed_of | P46B.forms_part_of | P47F.is_identified_by | P47B.identifies | P48F.has_preferred_identifier | P48B.is_preferred_identifier_of | P49F.has_former_or_current_keeper | P49B.is_former_or_current_keeper_of | P50F.has_current_keeper | P50B.is_current_keeper_of | P51F.has_former_or_current_owner | P51B.is_former_or_current_owner_of | P52F.has_current_owner | P52B.is_current_owner_of | P53F.has_former_or_current_location | P53B.is_former_or_current_location_of | P54F.has_current_permanent_location | P54B.is_current_permanent_location_of | P55F.has_current_location | P55B.currently_holds | P56F.bears_feature | P56B.is_found_on | P57F.has_number_of_parts | P58F.has_section_definition | P58B.defines_section | P59F.has_section | P59B.is_located_on_or_within |  P65F.shows_visual_item | P65B.is_shown_by |  P68F.usually_employs | P68B.is_usually_employed_by |  P71F.lists | P71B.is_listed_in | P72F.has_language | P72B.is_language_of | P73F.has_translation | P73B.is_translation_of  | P74F.has_current_or_former_residence | P74B.is_current_or_former_residence_of | P75F.possesses | P75B.is_possessed_by | P76F.has_contact_point | P76B.provides_access_to | P78F.is_identified_by | P78B.identifies | P79F.beginning_is_qualified_by | P80F.end_is_qualified_by | P81F.ongoing_throughout | P82F.at_some_time_within | P83F.had_at_least_duration | P83B.was_minimum_duration_of | P84F.had_at_most_duration | P84B.was_maximum_duration_of | P86F.falls_within | P86B.contains | P87F.is_identified_by | P87B.identifies | P88F.consists_of | P88B.forms_part_of | P89F.falls_within | P89B.contains | P90F.has_value | P91F.has_unit | P91B.is_unit_of | P92F.brought_into_existence | P92B.was_brought_into_existence_by | P93F.took_out_of_existence | P93B.was_taken_out_of_existence_by | P94F.has_created | P94B.was_created_by | P95F.has_formed | P95B.was_formed_by | P96F.by_mother | P96B.gave_birth | P97F.from_father | P97B.was_father_for | P98F.brought_into_life | P98B.was_born | P99F.dissolved | P99B.was_dissolved_by | P100F.was_death_of | P100B.died_in | P101F.had_as_general_use | P101B.was_use_of |  P103F.was_intended_for | P103B.was_intention_of | P104F.is_subject_to | P104B.applies_to | P105F.right_held_by | P105B.has_right_on | P106F.is_composed_of | P106B.forms_part_of | P107F.has_current_or_former_member | P107B.is_current_or_former_member_of | P108F.has_produced | P108B.was_produced_by | P109F.has_current_or_former_curator | P109B.is_current_or_former_curator_of | P110F.augmented | P110B.was_augmented_by | P111F.added | P111B.was_added_by | P112F.diminished | P112B.was_diminished_by | P113F.removed | P113B.was_removed_by | P114F.is_equal_in_time_to | P115F.finishes | P115B.is_finished_by | P116F.starts | P116B.is_started_by | P117F.occurs_during | P117B.includes | P118F.overlaps_in_time_with | P118B.is_overlapped_in_time_by | P119F.meets_in_time_with | P119B.is_met_in_time_by | P120F.occurs_before | P120B.occurs_after | P121F.overlaps_with | P122F.borders_with | P123F.resulted_in | P123B.resulted_from | P124F.transformed | P124B.was_transformed_by | P125F.used_object_of_type | P125B.was_type_of_object_used_in | P126F.employed | P126B.was_employed_in | P127F.has_broader_term | P127B.has_narrower_term | P128F.carries | P128B.is_carried_by | P129F.is_about | P129B.is_subject_of |  P131F.is_identified_by | P131B.identifies | P132F.overlaps_with | P133F.is_separated_from | P134F.continued | P134B.was_continued_by | P135F.created_type | P135B.was_created_by | P140F.assigned_attribute_to  | P140B.was_attributed_by | P141F.assigned | P141B.was_assigned_by">
	
	<H6>
<xsl:value-of select="name()"/>
   <H5>
				<xsl:value-of select="Identifier"/>
				<xsl:text> </xsl:text>
				<span style="font-weight:normal;">
				<xsl:if test="in_class">(<xsl:for-each select="in_class">
					<xsl:value-of select="."/>
					<xsl:if test="position() !=last()">,</xsl:if>
					
					</xsl:for-each>)</xsl:if>
						<xsl:value-of select="String"/>
					</span>
			</H5>
		</H6>
		<H4>
			<xsl:apply-templates/>
		</H4>
	</xsl:template>
	
	
	<xsl:template match="*">
			<xsl:apply-templates/>
	</xsl:template> 
	<xsl:template match="text()"/>
</xsl:stylesheet>
