<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output
    method="xml"
    indent="yes"
/>


<!-- Some keys used to ensure uniqueness of exported records -->

<xsl:key name="address-by-id" match="address" use="@address.id" />

<!-- Main -->

<xsl:template match="BIBDB/GROUP">
<AccessDB>
	<xsl:apply-templates select="//film"/>
	<xsl:apply-templates select="//censorship"/>
	<xsl:apply-templates select="//cinema"/>
	
	<!-- use the muenchian method to ensure that address are unique-->
	<xsl:for-each select="//address[generate-id() = generate-id(key('address-by-id',@address.id)[1])]">
		<xsl:apply-templates select="."/>
	</xsl:for-each>
	
	<xsl:apply-templates select="//programme"/>
	<xsl:apply-templates select="//company"/>
	<xsl:apply-templates select="//person"/>
	
</AccessDB>
</xsl:template>

<!-- This part is used to transform the film data from the download -->

<xsl:template match="film">
<tblTitle>
	<title.id>
		<xsl:value-of select="film.title/@title.id"/>
	</title.id>
	<film.title>
		<xsl:value-of select="normalize-space(film.title)"/>
	</film.title>
	<short_long>
		<xsl:value-of select="@short_long"/>
	</short_long>
	<xsl:apply-templates select="film.w_categories"/>
	<xsl:apply-templates select="film.year"/>
	<xsl:apply-templates select="film.country"/>
	<xsl:apply-templates select="film.w_directors"/>
	<xsl:apply-templates select="film.production_company"/>
	<xsl:apply-templates select="film.length"/>
	<xsl:apply-templates select="film.imdb"/>
	<xsl:apply-templates select="film.fmdb_id"/>
	<xsl:apply-templates select="film.cinegraph_id"/>
	<xsl:apply-templates select="film.id1"/>
	<xsl:apply-templates select="film.id2"/>
	<xsl:apply-templates select="film.id3"/>
	<xsl:apply-templates select="info"/>
</tblTitle>

	<xsl:apply-templates select="film.w_title_variations/film.title_variation" mode="Table"/>
	<xsl:apply-templates select="film.w_title_variations/film.title_variation" mode="Join"/>

	<xsl:apply-templates select="film.w_episodes/film.episode" mode="Table"/>
	<xsl:apply-templates select="film.w_episodes/film.episode" mode="Join"/>
	
	<xsl:apply-templates select="film.w_episodes/film.episode/episode.censorship.links/episode.censorship.link"/>
	
	<xsl:apply-templates select="film.w_companies/film.company"/>
	<xsl:apply-templates select="film.w_persons/film.person"/>
	
</xsl:template>

<xsl:template match="censorship">
<tblCensorship>
	<censorship.id>
		<xsl:value-of select="@censorship.id"/>
	</censorship.id>
	<kfc_ruling>
		<xsl:value-of select="@kfc_ruling"/>
	</kfc_ruling>
	<artikel1>
		<xsl:value-of select="@artikel1"/>
	</artikel1>
	<xsl:apply-templates select="censorship.file"/>
	<xsl:apply-templates select="censorship.d_date"/>
	<xsl:apply-templates select="censorship.rating"/>
	<xsl:apply-templates select="censorship.rating_info"/>
	<xsl:apply-templates select="censorship.length"/>
	<xsl:apply-templates select="censorship.source"/>	
	<xsl:apply-templates select="info"/>
</tblCensorship>

	<xsl:apply-templates select="censorship.w_ccf_titles/censorship.w_ccf_title"/>
	<xsl:apply-templates select="censorship.w_second_rulings/censorship.second_ruling"/>
	<xsl:apply-templates select="censorship.w_cuts/censorship.cut"/>
	<xsl:apply-templates select="censorship.w_related_files/censorship.related_file"/>
	<xsl:apply-templates select="censorship.film.links/censorship.film.link"/>
	
</xsl:template>

<xsl:template match="film.imdb|film.year|film.country|film.production_company|episode.year|
										 film.fmdb_id|film.cinegraph_id|film.id1|film.id2|film.id3|language_code|
										 censorship.file|censorship.d_date|censorship.rating|censorship.length|censorship.source|
										 censorship.ccf_title|censorship.comment|cut.number|cut.length|d_to|d_from">
<xsl:copy>
	<xsl:value-of select="normalize-space(.)"/>
</xsl:copy>
</xsl:template>

<xsl:template match="film.length|episode.length|censorship.length">
<xsl:copy>
	<xsl:value-of select="normalize-space(.)"/>
</xsl:copy>
<smalfilm>
	<xsl:value-of select="@smalfilm"/>
</smalfilm>
</xsl:template>

<xsl:template match="film.w_categories|film.w_directors">
<xsl:copy>
	<xsl:for-each select="*">
		<xsl:value-of select="normalize-space(.)"/><xsl:text> </xsl:text>
	</xsl:for-each>
</xsl:copy>
</xsl:template>

<xsl:template match="film.title_variation" mode="Table">
<tblTitleVariations>
	<variant.id>
		<xsl:value-of select="film.title/@title.id"/>
	</variant.id>

	<variant.title>
		<xsl:value-of select="normalize-space(film.title)"/>
	</variant.title>
	
	<xsl:apply-templates select="language_code"/>
	<xsl:apply-templates select="info"/>
	
</tblTitleVariations>
</xsl:template>

<xsl:template match="film.title_variation" mode="Join">
<tblJoinTitleTitleVariations>
	<title.id>
		<xsl:value-of select="../../film.title/@title.id"/>
	</title.id>
	
	<variant.id>
		<xsl:value-of select="film.title/@title.id"/>
	</variant.id>
</tblJoinTitleTitleVariations>
</xsl:template>

<xsl:template match="film.episode" mode="Table">
<tblEpisodes>
	<episode.id>
		<xsl:value-of select="film.title/@title.id"/>
	</episode.id>

	<episode.title>
		<xsl:value-of select="normalize-space(film.title)"/>
	</episode.title>
	
	<xsl:apply-templates select="episode.year"/>
	<xsl:apply-templates select="episode.length"/>
	<xsl:apply-templates select="info"/>
	
</tblEpisodes>
</xsl:template>

<xsl:template match="film.episode" mode="Join">
<tblJoinTitleEpisodes>
	<title.id>
		<xsl:value-of select="../../film.title/@title.id"/>
	</title.id>
	
	<episode.id>
		<xsl:value-of select="film.title/@title.id"/>
	</episode.id>
</tblJoinTitleEpisodes>
</xsl:template>

<xsl:template match="episode.censorship.link">
<tblJoinEpisodeCensorship>
	<episode.id>
		<xsl:value-of select="../../film.title/@title.id"/>
	</episode.id>
	
	<censorship.id>
		<xsl:value-of select="@target.id"/>
	</censorship.id>
</tblJoinEpisodeCensorship>
</xsl:template>

<xsl:template match="censorship.w_ccf_title">
<tblCensorshipCcfTitles>
	<censorship.id>
		<xsl:value-of select="../../@censorship.id"/>
	</censorship.id>
	
	<xsl:apply-templates select="censorship.ccf_title"/>
	<xsl:apply-templates select="censorship.comment"/>
	
</tblCensorshipCcfTitles>
</xsl:template>

<xsl:template match="censorship.second_ruling">
<tblCensorshipSecondRuling>
	<censorship.id>
		<xsl:value-of select="../../@censorship.id"/>
	</censorship.id>
	
	<xsl:apply-templates select="censorship.d_date"/>
	<xsl:apply-templates select="censorship.rating"/>
	<xsl:apply-templates select="censorship.rating_info"/>
	
</tblCensorshipSecondRuling>
</xsl:template>

<xsl:template match="censorship.cut">
<tblCensorshipCuts>
	<censorship.id>
		<xsl:value-of select="../../@censorship.id"/>
	</censorship.id>
	
	<second_rating>
		<xsl:value-of select="@second_rating"/>
	</second_rating>
	
	<xsl:apply-templates select="cut.number"/>
	<xsl:apply-templates select="cut.length"/>
	<xsl:apply-templates select="info"/>
	
</tblCensorshipCuts>
</xsl:template>

<xsl:template match="censorship.related_file">
<tblJoinCensorshipCensorship>
	<censorship.id>
		<xsl:value-of select="../../@censorship.id"/>
	</censorship.id>
	
	<censorship.targetid>
		<xsl:value-of select="censorship.related.link/@target.id"/>
	</censorship.targetid>
	
	<xsl:apply-templates select="info"/>
		
</tblJoinCensorshipCensorship>
</xsl:template>

<xsl:template match="censorship.film.link">
<tblJoinCensorshipTitle>
	<censorship.id>
		<xsl:value-of select="../../@censorship.id"/>
	</censorship.id>
	
	<title.id>
		<xsl:value-of select="@target.id"/>
	</title.id>
		
</tblJoinCensorshipTitle>
</xsl:template>

<xsl:template match="film.company">
<tblJoinTitlesCompanies>
	<title.id>
		<xsl:value-of select="../../film.title/@title.id"/>
	</title.id>
	
	<company.id>
	<xsl:value-of select="film.company.link/@target.id"/>
	</company.id>
	
	<xsl:apply-templates select="d_from"/>
	<xsl:apply-templates select="d_to"/>
	<xsl:apply-templates select="info"/>
	
</tblJoinTitlesCompanies>
</xsl:template>

<xsl:template match="film.person">
<tblJoinTitlesPersons>
	<title.id>
		<xsl:value-of select="../../film.title/@title.id"/>
	</title.id>
	
	<person.id>
	<xsl:value-of select="film.person.link/@target.id"/>
	</person.id>
	
	<xsl:apply-templates select="d_from"/>
	<xsl:apply-templates select="d_to"/>
	<xsl:apply-templates select="info"/>
	
</tblJoinTitlesPersons>
</xsl:template>

<!-- This part is used to transform the cinema data from the download -->

<xsl:template match="cinema">
<tblCinema>
	<cinema.id>
		<xsl:value-of select="@cinema.id"/>
	</cinema.id>
	
	<xsl:apply-templates select="cinema.name"/>
	
	<cinema.b_status>
		<xsl:value-of select="@cinema.b_status"/>
	</cinema.b_status>
	
	<xsl:apply-templates select="info"/>
	
</tblCinema>

	<xsl:apply-templates select="cinema.first_sound.link"/>
	<xsl:apply-templates select="cinema.address.link"/>
	<xsl:apply-templates select="cinema.w_seats/cinema.seats"/>
	<xsl:apply-templates select="cinema.w_active_periodes/cinema.active_periode"/>
	<xsl:apply-templates select="cinema.w_screens/cinema.screen"/>
	<xsl:apply-templates select="cinema.w_companies/cinema.company"/>
	<xsl:apply-templates select="cinema.w_persons/cinema.person"/>
</xsl:template>

<xsl:template match="cinema.name|year|number|d_opened|d_closed|cinema.company.job_title|cinema.person.job_title|
										 address.street|address.city|address.former_street|address.former_city|address.xy_id|address.person.job_title">
<xsl:copy>
	<xsl:value-of select="normalize-space(.)"/>
</xsl:copy>
</xsl:template>

<xsl:template match="cinema.first_sound.link">
<tblCinemaFirstSound>
	<cinema.id>
		<xsl:value-of select="../@cinema.id"/>
	</cinema.id>
	
	<programme.id>
		<xsl:value-of select="@target.id"/>
	</programme.id>
		
</tblCinemaFirstSound>
</xsl:template>

<xsl:template match="cinema.address.link">
<tblJoinCinemaAddress>
	<cinema.id>
		<xsl:value-of select="../@cinema.id"/>
	</cinema.id>
	
	<address.id>
		<xsl:value-of select="@target.id"/>
	</address.id>
		
</tblJoinCinemaAddress>
</xsl:template>

<xsl:template match="cinema.seats">
<tblCinemaSeats>
	<cinema.id>
		<xsl:value-of select="../../@cinema.id"/>
	</cinema.id>
	
	<xsl:apply-templates select="year"/>
	<xsl:apply-templates select="number"/>
	<xsl:apply-templates select="info"/>
		
</tblCinemaSeats>
</xsl:template>

<xsl:template match="cinema.active_periode">
<tblCinemaActivePeriode>
	<cinema.id>
		<xsl:value-of select="../../@cinema.id"/>
	</cinema.id>
	
	<xsl:apply-templates select="d_opened"/>
	<xsl:apply-templates select="d_closed"/>
		
</tblCinemaActivePeriode>
</xsl:template>

<xsl:template match="cinema.screen">
<tblCinemaScreens>
	<cinema.id>
		<xsl:value-of select="../../@cinema.id"/>
	</cinema.id>
	
	<xsl:apply-templates select="year"/>
	<xsl:apply-templates select="number"/>
	<xsl:apply-templates select="info"/>
		
</tblCinemaScreens>
</xsl:template>

<xsl:template match="cinema.company">
<tblJoinCinemasCompanies>
	<cinema.id>
		<xsl:value-of select="../../@cinema.id"/>
	</cinema.id>
	
	<company.id>
		<xsl:value-of select="cinema.company.link/@target.id"/>
	</company.id>
	
	<xsl:apply-templates select="cinema.company.job_title"/>
	<xsl:apply-templates select="d_from"/>
	<xsl:apply-templates select="d_to"/>
	<xsl:apply-templates select="info"/>
		
</tblJoinCinemasCompanies>
</xsl:template>

<xsl:template match="cinema.person">
<tblJoinCinemasPersons>
	<cinema.id>
		<xsl:value-of select="../../@cinema.id"/>
	</cinema.id>
	
	<person.id>
		<xsl:value-of select="cinema.person.link/@target.id"/>
	</person.id>
	
	<xsl:apply-templates select="cinema.person.job_title"/>
	<xsl:apply-templates select="d_from"/>
	<xsl:apply-templates select="d_to"/>
	<xsl:apply-templates select="info"/>
		
</tblJoinCinemasPersons>
</xsl:template>

<xsl:template match="address">
<tblAddress>
	<address.id>
		<xsl:value-of select="@address.id"/>
	</address.id>
	
	<xsl:apply-templates select="address.street"/>
	<xsl:apply-templates select="address.city"/>
	<xsl:apply-templates select="address.former_street"/>
	<xsl:apply-templates select="address.former_city"/>
	<xsl:apply-templates select="address.xy_id"/>
	<xsl:apply-templates select="info"/>
</tblAddress>

	<xsl:apply-templates select="address.w_construction_history/address.construction_history"/>
	<xsl:apply-templates select="address.w_companies/address.company"/>
	<xsl:apply-templates select="address.w_persons/address.person"/>
</xsl:template>

<xsl:template match="address.construction_history">
<xsl:choose>
	<xsl:when test="count(address.architect.links/address.architect.link) = 0">
		<tblConstructionHistory>
			<address.id>
				<xsl:value-of select="../../@address.id"/>
			</address.id>
			
			<architect.id>
			</architect.id>
			
			<construction_type>
				<xsl:value-of select="@type"/>
			</construction_type>
			
			<xsl:apply-templates select="year"/>
			<xsl:apply-templates select="info"/>
			
		</tblConstructionHistory>
	</xsl:when>
	<xsl:otherwise>
		<xsl:for-each select="address.architect.links/address.architect.link">
			<tblConstructionHistory>
			<address.id>
				<xsl:value-of select="../../../../@address.id"/>
			</address.id>
			
			<architect.id>
				<xsl:value-of select="@target.id"/>
			</architect.id>
			
			<construction_type>
				<xsl:value-of select="../../@type"/>
			</construction_type>
			
			<xsl:apply-templates select="../../year"/>
			<xsl:apply-templates select="../../info"/>
		</tblConstructionHistory>
	</xsl:for-each>
	</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="address.company">
<tblJoinAddressCompanies>
	<address.id>
		<xsl:value-of select="../../@address.id"/>
	</address.id>
	
	<company.id>
		<xsl:value-of select="address.company.link/@target.id"/>
	</company.id>
	
	<xsl:apply-templates select="d_from"/>
	<xsl:apply-templates select="d_to"/>
	<xsl:apply-templates select="info"/>
		
</tblJoinAddressCompanies>
</xsl:template>

<xsl:template match="address.person">
<tblJoinAddressPersons>
	<address.id>
		<xsl:value-of select="../../@address.id"/>
	</address.id>
	
	<person.id>
		<xsl:value-of select="address.person.link/@target.id"/>
	</person.id>
	
	<xsl:apply-templates select="address.person.job_title"/>
	<xsl:apply-templates select="d_from"/>
	<xsl:apply-templates select="d_to"/>
	<xsl:apply-templates select="info"/>
		
</tblJoinAddressPersons>
</xsl:template>

<!-- This part is used to transform the programme data from the download -->


<xsl:template match="programme">
<tblProgramme>
	<programme.id>
		<xsl:value-of select="@programme.id"/>
	</programme.id>
	<xsl:apply-templates select="programme.name"/>
	<xsl:apply-templates select="info"/>
	
</tblProgramme>

	<xsl:apply-templates select="programme.w_dates/programme.d_date"/>
	<xsl:apply-templates select="programme.w_items/programme.item"/>
	<xsl:apply-templates select="programme.cinema.link"/>
	<xsl:apply-templates select="programme.w_travelling_cinema/programme.travelling_cinema"/>
	<xsl:apply-templates select="programme.companies.links/programme.company.link"/>
	
</xsl:template>

<xsl:template match="programme.name|programme.order_number">
<xsl:copy>
	<xsl:value-of select="normalize-space(.)"/>
</xsl:copy>
</xsl:template>

<xsl:template match="programme.d_date">
<tblProgrammeDates>
	<programme.id>
		<xsl:value-of select="../../@programme.id"/>
	</programme.id>
	
	<continuous>
		<xsl:value-of select="../@continuous"/>
	</continuous>
	
	<date>
		<xsl:value-of select="normalize-space(.)"/>
	</date>
		
</tblProgrammeDates>
</xsl:template>

<xsl:template match="programme.item">
<xsl:for-each select="programme.film.link">
	<tblJoinProgrammeFilm>
		<programme.id>
			<xsl:value-of select="../../../@programme.id"/>
		</programme.id>
		
		<title.id>
			<xsl:value-of select="@target.id"/>
		</title.id>
		
		<xsl:apply-templates select="../programme.order_number"/>
		
	</tblJoinProgrammeFilm>
</xsl:for-each>
<xsl:for-each select=".//programme.live_performance">
	<tblProgrammeLivePerformance>
		<programme.id>
			<xsl:value-of select="../../../../@programme.id"/>
		</programme.id>
		<performance>
			<xsl:value-of select="normalize-space(.)"/>
		</performance>
		<xsl:apply-templates select="../info"/>
		<xsl:apply-templates select="../../programme.order_number"/>
		
	</tblProgrammeLivePerformance>
</xsl:for-each>
</xsl:template>

<xsl:template match="programme.cinema.link">
<tblJoinProgrammeCinema>
	<programme.id>
		<xsl:value-of select="../@programme.id"/>
	</programme.id>
	
	<cinema.id>
		<xsl:value-of select="@target.id"/>
	</cinema.id>
	
</tblJoinProgrammeCinema>
</xsl:template>

<xsl:template match="programme.travelling_cinema">
<tblProgrammeTravellingCinemaAddress>
	<programme.id>
		<xsl:value-of select="../../@programme.id"/>
	</programme.id>
	
	<address.id>
		<xsl:value-of select="programme.address.link/@target.id"/>
	</address.id>
	
	<xsl:apply-templates select="programme.acomm.info"/>
	<xsl:apply-templates select="programme.book_keeping"/>
	
</tblProgrammeTravellingCinemaAddress>
</xsl:template>

<xsl:template match="programme.acomm.info|programme.book_keeping">
<xsl:copy>
	<xsl:for-each select="p">
		<xsl:value-of select="normalize-space(.)"/><xsl:text> </xsl:text>
	</xsl:for-each>
</xsl:copy>
</xsl:template>

<xsl:template match="programme.company.link">
<tblProgrammeTravellingCinemaCompany>
	<programme.id>
		<xsl:value-of select="../../@programme.id"/>
	</programme.id>
	
	<company.id>
		<xsl:value-of select="@target.id"/>
	</company.id>
	
</tblProgrammeTravellingCinemaCompany>
</xsl:template>

<!-- This part is used to transform the company data from the download -->

<xsl:template match="company">
<tblCompany>
	<company.id>
		<xsl:value-of select="@company.id"/>
	</company.id>
	
	<xsl:apply-templates select="company.name"/>
	<xsl:apply-templates select="company.w_other_names"/>
	<xsl:apply-templates select="company.d_established"/>
	<xsl:apply-templates select="company.d_disabanded"/>
	<xsl:apply-templates select="company.fm_c_id"/>
	<xsl:apply-templates select="info"/>
	
</tblCompany>

	<xsl:apply-templates select="company.w_legal_forms/company.legal_form"/>
	<xsl:apply-templates select="company.w_branches/company.branche"/>
	<xsl:apply-templates select="company.w_daughter_companies/company.daughter_company"/>
	<xsl:apply-templates select="company.w_persons/company.person"/>
	
</xsl:template>

<xsl:template match="company.name|company.d_established|company.d_disabanded|company.fm_c_id|
										 d_begin|d_end|branche.name|daughter.share|company.person.job_title">
<xsl:copy>
	<xsl:value-of select="normalize-space(.)"/>
</xsl:copy>
</xsl:template>

<xsl:template match="company.w_other_names">
<company.w_other_names>
	<xsl:for-each select="company.other_name">
		<xsl:value-of select="normalize-space(.)"/><xsl:text> </xsl:text>
	</xsl:for-each>
</company.w_other_names>
</xsl:template>

<xsl:template match="company.legal_form">
<tblCompanyLegalForms>
	<company.id>
		<xsl:value-of select="../../@company.id"/>
	</company.id>
	
	<legal_form>
		<xsl:value-of select="@legal_form.name"/>
	</legal_form>
	
	<xsl:apply-templates select="d_begin"/>
	<xsl:apply-templates select="d_end"/>
		
</tblCompanyLegalForms>
</xsl:template>

<xsl:template match="company.branche">
<tblCompanyBranches>
	<company.id>
		<xsl:value-of select="../../@company.id"/>
	</company.id>
	
	<xsl:apply-templates select="branche.name"/>
	<xsl:apply-templates select="d_begin"/>
	<xsl:apply-templates select="d_end"/>
		
</tblCompanyBranches>
</xsl:template>

<xsl:template match="company.daughter_company">
<tblCompanyDaughters>
	<company.id>
		<xsl:value-of select="../../@company.id"/>
	</company.id>
	
	<daughter.id>
		<xsl:value-of select="company.daughter.link/@target.id"/>
	</daughter.id>
	
	<xsl:apply-templates select="d_from"/>
	<xsl:apply-templates select="d_to"/>
	<xsl:apply-templates select="daughter.share"/>
	<xsl:apply-templates select="info"/>
		
</tblCompanyDaughters>
</xsl:template>

<xsl:template match="company.person">
<tblJoinCompanyPerson>
	<company.id>
		<xsl:value-of select="../../@company.id"/>
	</company.id>
	
	<person.id>
		<xsl:value-of select="company.person.link/@target.id"/>
	</person.id>
	
	<xsl:apply-templates select="company.person.job_title"/>
	<xsl:apply-templates select="d_from"/>
	<xsl:apply-templates select="d_to"/>
	<xsl:apply-templates select="info"/>
		
</tblJoinCompanyPerson>
</xsl:template>

<!-- This part is used to transform the person data from the download -->

<xsl:template match="person">
<tblPerson>
	<person.id>
		<xsl:value-of select="@person.id"/>
	</person.id>
	
	<xsl:apply-templates select="person.last_name"/>
	<xsl:apply-templates select="person.w_other_names"/>
	<xsl:apply-templates select="person.w_first_names"/>
	<xsl:apply-templates select="person.middle"/>
	<xsl:apply-templates select="person.suffix"/>
	<xsl:apply-templates select="person.d_birth"/>
	<xsl:apply-templates select="person.place_birth"/>
	<xsl:apply-templates select="person.d_death"/>
	<xsl:apply-templates select="person.place_death"/>
	<xsl:apply-templates select="person.fm_p_id"/>
	<xsl:apply-templates select="info"/>
</tblPerson>
</xsl:template>

<xsl:template match="person.w_other_names|person.w_first_names">
<xsl:copy>
	<xsl:for-each select="*">
		<xsl:value-of select="normalize-space(.)"/><xsl:text> </xsl:text>
	</xsl:for-each>
</xsl:copy>
</xsl:template>

<xsl:template match="person.last_name|person.middle|person.suffix|person.d_birth|
										 person.d_birth|person.place_birth|person.d_death|person.place_death|person.fm_p_id">
<xsl:copy>
	<xsl:value-of select="normalize-space(.)"/>
</xsl:copy>
</xsl:template>

<!-- Default behaviour -->

<xsl:template match="info|censorship.rating_info">
<xsl:copy>
	<xsl:for-each select="p">
		<xsl:value-of select="normalize-space(.)"/><xsl:text> </xsl:text>
	</xsl:for-each>
</xsl:copy>
</xsl:template>


<xsl:template match="@*|text()">
</xsl:template>

</xsl:stylesheet>
