<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- WFB stylesheet: XML to PAT - Ian Macky 2007 -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:variable name="new_line" select="'&#xA;'"/>

<xsl:template match="PLACE">
    <xsl:value-of select="normalize-space(NAME)"/>|<xsl:apply-templates select="INTRODUCTION"/>|<xsl:apply-templates select="GEOGRAPHY"/>|<xsl:apply-templates select="PEOPLE"/>|<xsl:apply-templates select="GOVERNMENT"/>|<xsl:apply-templates select="ECONOMY"/>|<xsl:apply-templates select="COMMUNICATIONS"/>|<xsl:apply-templates select="TRANSPORTATION"/>|<xsl:apply-templates select="MILITARY"/>|<xsl:apply-templates select="TRANSNATIONAL"/><xsl:value-of select="$new_line"/>
</xsl:template>

<!-- ********************************************************************** -->
<!-- **************************** INTRODUCTION **************************** -->
<!-- ********************************************************************** -->

<xsl:template match="INTRODUCTION">
    <xsl:value-of select="normalize-space(Background)"/>
</xsl:template>

<!-- ********************************************************************** -->
<!-- ****************************** GEOGRAPHY ***************************** -->
<!-- ********************************************************************** -->

<xsl:template match="GEOGRAPHY">
    <xsl:value-of select="normalize-space(Location)"/>|<xsl:value-of select="normalize-space(latitude)"/>|<xsl:value-of select="normalize-space(longitude)"/>|<xsl:apply-templates select="Area"/>|<xsl:value-of select="normalize-space(Area_comparative)"/>|<xsl:apply-templates select="Land_boundaries"/>|<xsl:apply-templates select="Coastline"/>|<xsl:apply-templates select="Maritime_claims"/>|<xsl:apply-templates select="Climate"/>|<xsl:apply-templates select="Terrain"/>|<xsl:apply-templates select="Elevation_extremes"/>|<xsl:apply-templates select="Natural_resources"/>|<xsl:apply-templates select="Land_use"/>|<xsl:apply-templates select="Irrigated_land"/>|<xsl:value-of select="normalize-space(Natural_hazards)"/>|<xsl:apply-templates select="Environment_current_issues"/>|<xsl:apply-templates select="Environment_international_agreements"/>|<xsl:value-of select="normalize-space(Geography_note)"/>
</xsl:template>

<xsl:template match="Coastline|Terrain|Natural_resources|Irrigated_land|Environment_current_issues">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Area">
    <xsl:value-of select="normalize-space(total)"/>|<xsl:value-of select="normalize-space(land)"/>|<xsl:value-of select="normalize-space(water)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Land_boundaries">
    <xsl:choose>
	<xsl:when test="total"><xsl:value-of select="normalize-space(total)"/></xsl:when>
	<xsl:otherwise><xsl:value-of select="normalize-space(text())"/></xsl:otherwise>
    </xsl:choose>|<xsl:value-of select="normalize-space(border_countries)"/>|<xsl:value-of select="normalize-space(regional_borders)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Maritime_claims">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(contiguous_zone)"/>|<xsl:value-of select="normalize-space(continental_shelf)"/>|<xsl:value-of select="normalize-space(exclusive_economic_zone)"/>|<xsl:value-of select="normalize-space(exclusive_fishing_zone)"/>|<xsl:value-of select="normalize-space(territorial_sea)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Elevation_extremes">
    <xsl:value-of select="normalize-space(lowest_point)"/>|<xsl:value-of select="normalize-space(lowest_elevation)"/>|<xsl:value-of select="normalize-space(lowest_note)"/>|<xsl:value-of select="normalize-space(highest_point)"/>|<xsl:value-of select="normalize-space(highest_elevation)"/>|<xsl:value-of select="normalize-space(highest_note)"/>
</xsl:template>

<xsl:template match="Land_use">
    <xsl:value-of select="normalize-space(arable_land)"/>|<xsl:value-of select="normalize-space(permanent_crops)"/>|<xsl:value-of select="normalize-space(other)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Environment_international_agreements">
    <xsl:value-of select="normalize-space(party_to)"/>|<xsl:value-of select="normalize-space(signed_but_not_ratified)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<!-- ********************************************************************** -->
<!-- ******************************** PEOPLE ****************************** -->
<!-- ********************************************************************** -->

<xsl:template match="PEOPLE">
    <xsl:apply-templates select="Population"/>|<xsl:apply-templates select="Age_structure"/>|<xsl:apply-templates select="Median_age"/>|<xsl:apply-templates select="Population_growth_rate"/>|<xsl:value-of select="normalize-space(Birth_rate)"/>|<xsl:value-of select="normalize-space(Death_rate)"/>|<xsl:value-of select="normalize-space(Net_migration_rate)"/>|<xsl:apply-templates select="Sex_ratio"/>|<xsl:apply-templates select="Infant_mortality_rate"/>|<xsl:apply-templates select="Life_expectancy_at_birth"/>|<xsl:value-of select="normalize-space(Total_fertility_rate)"/>|<xsl:value-of select="normalize-space(HIV_AIDS_adult_prevalence_rate)"/>|<xsl:apply-templates select="HIV_AIDS_people_living_with_HIV_AIDS"/>|<xsl:value-of select="normalize-space(HIV_AIDS_deaths)"/>|<xsl:apply-templates select="Major_infectious_diseases"/>|<xsl:apply-templates select="Nationality"/>|<xsl:apply-templates select="Ethnic_groups"/>|<xsl:apply-templates select="Religions"/>|<xsl:apply-templates select="Languages"/>|<xsl:apply-templates select="Literacy"/>|<xsl:value-of select="normalize-space(People_note)"/>
</xsl:template>

<xsl:template match="Population|Population_growth_rate|Net_migration_rate|Religions|Languages">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Age_structure">
    <xsl:value-of select="normalize-space(age_0_14_years)"/>|<xsl:value-of select="normalize-space(age_15_64_years)"/>|<xsl:value-of select="normalize-space(age_65_years_and_over)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Median_age">
    <xsl:value-of select="normalize-space(total)"/>|<xsl:value-of select="normalize-space(male)"/>|<xsl:value-of select="normalize-space(female)"/>
</xsl:template>

<xsl:template match="Sex_ratio">
    <xsl:value-of select="normalize-space(at_birth)"/>|<xsl:value-of select="normalize-space(under_15_years)"/>|<xsl:value-of select="normalize-space(age_15_64_years)"/>|<xsl:value-of select="normalize-space(age_65_years_and_over)"/>|<xsl:value-of select="normalize-space(total_population)"/>
</xsl:template>

<xsl:template match="Infant_mortality_rate">
    <xsl:value-of select="normalize-space(total)"/>|<xsl:value-of select="normalize-space(male)"/>|<xsl:value-of select="normalize-space(female)"/>
</xsl:template>

<xsl:template match="Life_expectancy_at_birth">
    <xsl:value-of select="normalize-space(total_population)"/>|<xsl:value-of select="normalize-space(male)"/>|<xsl:value-of select="normalize-space(female)"/>
</xsl:template>

<xsl:template match="Major_infectious_diseases">
    <xsl:value-of select="normalize-space(degree_of_risk)"/>|<xsl:value-of select="normalize-space(food_or_waterborne_diseases)"/>|<xsl:value-of select="normalize-space(vectorborne_diseases)"/>|<xsl:value-of select="normalize-space(respiratory_diseases)"/>|<xsl:value-of select="normalize-space(water_contact_diseases)"/>|<xsl:value-of select="normalize-space(animal_contact_diseases)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Nationality">
    <xsl:value-of select="normalize-space(noun)"/>|<xsl:value-of select="normalize-space(noun_note)"/>|<xsl:value-of select="normalize-space(adjective)"/>|<xsl:value-of select="normalize-space(adjective_note)"/>
</xsl:template>

<xsl:template match="Ethnic_groups">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(indigenous_population)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Literacy">
    <xsl:value-of select="normalize-space(definition)"/>|<xsl:value-of select="normalize-space(total_population)"/>|<xsl:value-of select="normalize-space(male)"/>|<xsl:value-of select="normalize-space(female)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<!-- ********************************************************************** -->
<!-- ****************************** GOVERNMENT **************************** -->
<!-- ********************************************************************** -->

<xsl:template match="GOVERNMENT">
    <xsl:apply-templates select="Country_name"/>|<xsl:apply-templates select="Dependency_status"/>|<xsl:apply-templates select="Government_type"/>|<xsl:apply-templates select="Capital"/>|<xsl:apply-templates select="Administrative_divisions"/>|<xsl:apply-templates select="Dependent_areas"/>|<xsl:value-of select="normalize-space(Independence)"/>|<xsl:apply-templates select="National_holiday"/>|<xsl:apply-templates select="Constitution"/>|<xsl:apply-templates select="Legal_system"/>|<xsl:apply-templates select="Suffrage"/>|<xsl:apply-templates select="Executive_branch"/>|<xsl:apply-templates select="Legislative_branch"/>|<xsl:apply-templates select="Judicial_branch"/>|<xsl:apply-templates select="Political_parties_and_leaders"/>|<xsl:apply-templates select="Political_pressure_groups_and_leaders"/>|<xsl:apply-templates select="International_organization_participation"/>|<xsl:apply-templates select="Diplomatic_representation_in_the_US"/>|<xsl:apply-templates select="Diplomatic_representation_from_the_US"/>|<xsl:apply-templates select="Flag_description"/>|<xsl:value-of select="normalize-space(Government_note)"/>
</xsl:template>

<xsl:template match="Dependency_status|Government_type|Dependent_areas|National_holiday|Constitution|Legal_system|Suffrage|Judicial_branch|Political_pressure_groups_and_leaders|Flag_description">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Country_name">
    <xsl:value-of select="normalize-space(conventional_long_form)"/>|<xsl:value-of select="normalize-space(conventional_short_form)"/>|<xsl:value-of select="normalize-space(local_long_form)"/>|<xsl:value-of select="normalize-space(local_short_form)"/>|<xsl:value-of select="normalize-space(former)"/>|<xsl:value-of select="normalize-space(abbreviation)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Capital">
    <xsl:value-of select="normalize-space(name)"/>|<xsl:value-of select="normalize-space(latitude)"/>|<xsl:value-of select="normalize-space(longitude)"/>|<xsl:value-of select="normalize-space(time_difference)"/>|<xsl:value-of select="normalize-space(daylight_saving_time)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Administrative_divisions">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(autonomous_oblasts)"/>|<xsl:value-of select="normalize-space(autonomous_okrugs)"/>|<xsl:value-of select="normalize-space(autonomous_regions)"/>|<xsl:value-of select="normalize-space(autonomous_republics)"/>|<xsl:value-of select="normalize-space(autonomous_territorial_units)"/>|<xsl:value-of select="normalize-space(borough_corporations)"/>|<xsl:value-of select="normalize-space(boroughs)"/>|<xsl:value-of select="normalize-space(capital_city)"/>|<xsl:value-of select="normalize-space(chartered_cities)"/>|<xsl:value-of select="normalize-space(cities)"/>|<xsl:value-of select="normalize-space(cities_and_boroughs)"/>|<xsl:value-of select="normalize-space(cities_and_counties)"/>|<xsl:value-of select="normalize-space(city_corporations)"/>|<xsl:value-of select="normalize-space(counties)"/>|<xsl:value-of select="normalize-space(county_boroughs)"/>|<xsl:value-of select="normalize-space(districts)"/>|<xsl:value-of select="normalize-space(divisions)"/>|<xsl:value-of select="normalize-space(federal_cities)"/>|<xsl:value-of select="normalize-space(krays)"/>|<xsl:value-of select="normalize-space(metropolitan_cities)"/>|<xsl:value-of select="normalize-space(municipalities)"/>|<xsl:value-of select="normalize-space(oblasts)"/>|<xsl:value-of select="normalize-space(provinces)"/>|<xsl:value-of select="normalize-space(raions)"/>|<xsl:value-of select="normalize-space(rayons)"/>|<xsl:value-of select="normalize-space(regional_corporations)"/>|<xsl:value-of select="normalize-space(regions)"/>|<xsl:value-of select="normalize-space(republics)"/>|<xsl:value-of select="normalize-space(royal_boroughs)"/>|<xsl:value-of select="normalize-space(special_municipalities)"/>|<xsl:value-of select="normalize-space(states)"/>|<xsl:value-of select="normalize-space(territorial_units)"/>|<xsl:value-of select="normalize-space(urban_counties)"/>|<xsl:value-of select="normalize-space(wards)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Executive_branch">
    <xsl:value-of select="normalize-space(executive_note)"/>|<xsl:value-of select="normalize-space(chief_of_state)"/>|<xsl:value-of select="normalize-space(chief_of_union)"/>|<xsl:value-of select="normalize-space(chief_note)"/>|<xsl:value-of select="normalize-space(head_of_government)"/>|<xsl:value-of select="normalize-space(head_note)"/>|<xsl:value-of select="normalize-space(cabinet)"/>|<xsl:value-of select="normalize-space(cabinet_note)"/>|<xsl:value-of select="normalize-space(elections)"/>|<xsl:value-of select="normalize-space(elections_note)"/>|<xsl:value-of select="normalize-space(election_results)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Legislative_branch">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(note)"/>|<xsl:value-of select="normalize-space(elections)"/>|<xsl:value-of select="normalize-space(election_results)"/>
</xsl:template>

<xsl:template match="Political_parties_and_leaders">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(governing_party)"/>|<xsl:value-of select="normalize-space(pro_government_parties)"/>|<xsl:value-of select="normalize-space(opposition_parties)"/>|<xsl:value-of select="normalize-space(other_opposition_includes)"/>|<xsl:value-of select="normalize-space(flemish_parties)"/>|<xsl:value-of select="normalize-space(francophone_parties)"/>|<xsl:value-of select="normalize-space(other_non_allied_parties)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="International_organization_participation">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(european_union)"/>|<xsl:value-of select="normalize-space(european_commission)"/>|<xsl:value-of select="normalize-space(european_central_bank)"/>|<xsl:value-of select="normalize-space(european_investment_bank)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Diplomatic_representation_in_the_US">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(chief_of_mission)"/>|<xsl:value-of select="normalize-space(embassy)"/>|<xsl:value-of select="normalize-space(chancery)"/>|<xsl:value-of select="normalize-space(mailing_address)"/>|<xsl:value-of select="normalize-space(telephone)"/>|<xsl:value-of select="normalize-space(fax)"/>|<xsl:value-of select="normalize-space(consulates_general)"/>|<xsl:value-of select="normalize-space(consulates)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Diplomatic_representation_from_the_US">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(chief_of_mission)"/>|<xsl:value-of select="normalize-space(embassy)"/>|<xsl:value-of select="normalize-space(mailing_address)"/>|<xsl:value-of select="normalize-space(telephone)"/>|<xsl:value-of select="normalize-space(fax)"/>|<xsl:value-of select="normalize-space(information_office)"/>|<xsl:value-of select="normalize-space(consulates_general)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<!-- ********************************************************************** -->
<!-- ******************************* ECONOMY ****************************** -->
<!-- ********************************************************************** -->

<xsl:template match="ECONOMY">
    <xsl:apply-templates select="Economy_overview"/>|<xsl:apply-templates select="GDP_purchasing_power_parity"/>|<xsl:value-of select="normalize-space(GDP_official_exchange_rate)"/>|<xsl:apply-templates select="GDP_real_growth_rate"/>|<xsl:value-of select="normalize-space(GDP_per_capita)"/>|<xsl:apply-templates select="GDP_composition_by_sector"/>|<xsl:apply-templates select="Labor_force"/>|<xsl:apply-templates select="Labor_force_by_occupation"/>|<xsl:value-of select="normalize-space(Unemployment_rate)"/>|<xsl:apply-templates select="Population_below_poverty_line"/>|<xsl:apply-templates select="Household_income_or_consumption_by_percentage_share"/>|<xsl:apply-templates select="Distribution_of_family_income_Gini_index"/>|<xsl:value-of select="normalize-space(Inflation_rate_consumer_prices)"/>|<xsl:value-of select="normalize-space(Investment_gross_fixed)"/>|<xsl:apply-templates select="Budget"/>|<xsl:value-of select="normalize-space(Public_debt)"/>|<xsl:value-of select="normalize-space(Agriculture_products)"/>|<xsl:value-of select="normalize-space(Industries)"/>|<xsl:apply-templates select="Industrial_production_growth_rate"/>|<xsl:value-of select="normalize-space(Electricity_production)"/>|<xsl:value-of select="normalize-space(Electricity_consumption)"/>|<xsl:value-of select="normalize-space(Electricity_exports)"/>|<xsl:apply-templates select="Electricity_imports"/>|<xsl:value-of select="normalize-space(Oil_production)"/>|<xsl:value-of select="normalize-space(Oil_consumption)"/>|<xsl:value-of select="normalize-space(Oil_exports)"/>|<xsl:value-of select="normalize-space(Oil_imports)"/>|<xsl:apply-templates select="Oil_proved_reserves"/>|<xsl:value-of select="normalize-space(Natural_gas_production)"/>|<xsl:value-of select="normalize-space(Natural_gas_consumption)"/>|<xsl:value-of select="normalize-space(Natural_gas_exports)"/>|<xsl:apply-templates select="Natural_gas_imports"/>|<xsl:value-of select="normalize-space(Natural_gas_proved_reserves)"/>|<xsl:value-of select="normalize-space(Current_account_balance)"/>|<xsl:apply-templates select="Exports"/>|<xsl:value-of select="normalize-space(Exports_commodities)"/>|<xsl:value-of select="normalize-space(Exports_partners)"/>|<xsl:apply-templates select="Imports"/>|<xsl:value-of select="normalize-space(Imports_commodities)"/>|<xsl:value-of select="normalize-space(Imports_partners)"/>|<xsl:value-of select="normalize-space(Reserves_of_foreign_exchange_and_gold)"/>|<xsl:apply-templates select="Debt_external"/>|<xsl:value-of select="normalize-space(Economic_aid_donor)"/>|<xsl:apply-templates select="Economic_aid_recipient"/>|<xsl:apply-templates select="Currency"/>|<xsl:apply-templates select="Exchange_rates"/>|<xsl:value-of select="normalize-space(Fiscal_year)"/>
</xsl:template>

<xsl:template match="Economy_overview|GDP_purchasing_power_parity|Labor_force|Unemployment_rate|Population_below_poverty_line|Distribution_of_family_income_Gini_index|Electricity_imports|Oil_proved_reserves|Natural_gas_imports|Exports|Imports|Debt_external|Economic_aid_recipient|Currency">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="GDP_real_growth_rate">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(imf_estimate)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="GDP_composition_by_sector">
    <xsl:value-of select="normalize-space(agriculture)"/>|<xsl:value-of select="normalize-space(industry)"/>|<xsl:value-of select="normalize-space(industry_and_construction)"/>|<xsl:value-of select="normalize-space(services)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Labor_force_by_occupation">
    <xsl:value-of select="normalize-space(agriculture)"/>|<xsl:value-of select="normalize-space(industry_and_services)"/>|<xsl:value-of select="normalize-space(industry)"/>|<xsl:value-of select="normalize-space(services)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Household_income_or_consumption_by_percentage_share">
    <xsl:value-of select="normalize-space(lowest_10pct)"/>|<xsl:value-of select="normalize-space(highest_10pct)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Budget">
    <xsl:value-of select="normalize-space(revenues)"/>|<xsl:value-of select="normalize-space(expenditures)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Industrial_production_growth_rate">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(official_government_estimate)"/>
</xsl:template>

<xsl:template match="Exchange_rates">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(official)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<!-- ********************************************************************** -->
<!-- **************************** COMMUNICATIONS ************************** -->
<!-- ********************************************************************** -->

<xsl:template match="COMMUNICATIONS">
    <xsl:apply-templates select="Telephones_main_lines_in_use"/>|<xsl:apply-templates select="Telephones_mobile_cellular"/>|<xsl:apply-templates select="Telephone_system"/>|<xsl:apply-templates select="Radio_broadcast_stations"/>|<xsl:apply-templates select="Television_broadcast_stations"/>|<xsl:value-of select="normalize-space(Internet_country_code)"/>|<xsl:value-of select="normalize-space(Internet_hosts)"/>|<xsl:apply-templates select="Internet_users"/>|<xsl:value-of select="normalize-space(Communications_note)"/>
</xsl:template>

<xsl:template match="Telephones_main_lines_in_use|Telephones_mobile_cellular|Radio_broadcast_stations|Television_broadcast_stations|Internet_users">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Telephone_system">
    <xsl:value-of select="normalize-space(general_assessment)"/>|<xsl:value-of select="normalize-space(domestic)"/>|<xsl:value-of select="normalize-space(international)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<!-- ********************************************************************** -->
<!-- **************************** TRANSPORTATION ************************** -->
<!-- ********************************************************************** -->

<xsl:template match="TRANSPORTATION">
    <xsl:apply-templates select="Airports"/>|<xsl:apply-templates select="Airports_with_paved_runways"/>|<xsl:apply-templates select="Airports_with_unpaved_runways"/>|<xsl:apply-templates select="Heliports"/>|<xsl:value-of select="normalize-space(Pipelines)"/>|<xsl:apply-templates select="Railways"/>|<xsl:apply-templates select="Roadways"/>|<xsl:apply-templates select="Waterways"/>|<xsl:apply-templates select="Merchant_marine"/>|<xsl:apply-templates select="Ports_and_terminals"/>|<xsl:value-of select="normalize-space(Transportation_note)"/>
</xsl:template>

<xsl:template match="Airports_with_paved_runways">
    <xsl:value-of select="normalize-space(total)"/>|<xsl:value-of select="normalize-space(over_3047_m)"/>|<xsl:value-of select="normalize-space(length_2438_to_3047_m)"/>|<xsl:value-of select="normalize-space(length_1524_to_2437_m)"/>|<xsl:value-of select="normalize-space(length_914_to_1523_m)"/>|<xsl:value-of select="normalize-space(under_914_m)"/>
</xsl:template>

<xsl:template match="Airports_with_unpaved_runways">
    <xsl:value-of select="normalize-space(total)"/>|<xsl:value-of select="normalize-space(over_3047_m)"/>|<xsl:value-of select="normalize-space(length_2438_to_3047_m)"/>|<xsl:value-of select="normalize-space(length_1524_to_2437_m)"/>|<xsl:value-of select="normalize-space(length_914_to_1523_m)"/>|<xsl:value-of select="normalize-space(under_914_m)"/>|<xsl:value-of select="normalize-space(length_unknown_or_variable)"/>
</xsl:template>

<xsl:template match="Airports|Heliports|Waterways|Ports_and_terminals">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Railways">
    <xsl:value-of select="normalize-space(total)"/>|<xsl:value-of select="normalize-space(broad_gauge)"/>|<xsl:value-of select="normalize-space(standard_gauge)"/>|<xsl:value-of select="normalize-space(narrow_gauge)"/>|<xsl:value-of select="normalize-space(dual_gauge)"/>|<xsl:value-of select="normalize-space(other)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Roadways">
    <xsl:value-of select="normalize-space(total)"/>|<xsl:value-of select="normalize-space(total_note)"/>|<xsl:value-of select="normalize-space(paved)"/>|<xsl:value-of select="normalize-space(paved_oiled_gravel)"/>|<xsl:value-of select="normalize-space(unpaved)"/>|<xsl:value-of select="normalize-space(unpaved_note)"/>
</xsl:template>

<xsl:template match="Merchant_marine">
    <xsl:value-of select="normalize-space(total)"/>|<xsl:value-of select="normalize-space(by_type)"/>|<xsl:value-of select="normalize-space(foreign_owned)"/>|<xsl:value-of select="normalize-space(registered_in_other_countries)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<!-- ********************************************************************** -->
<!-- ******************************* MILITARY ***************************** -->
<!-- ********************************************************************** -->

<xsl:template match="MILITARY">
    <xsl:apply-templates select="Military_branches"/>|<xsl:value-of select="normalize-space(Military_service_age_and_obligation)"/>|<xsl:apply-templates select="Manpower_available_for_military_service"/>|<xsl:apply-templates select="Manpower_fit_for_military_service"/>|<xsl:apply-templates select="Manpower_reaching_military_service_age_annually"/>|<xsl:value-of select="normalize-space(Military_expenditures_dollar_figure)"/>|<xsl:value-of select="normalize-space(Military_expenditures_percent_of_GDP)"/>|<xsl:value-of select="normalize-space(Military_note)"/>
</xsl:template>

<xsl:template match="Military_branches">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Manpower_available_for_military_service">
    <xsl:value-of select="normalize-space(male_minimum_age)"/>|<xsl:value-of select="normalize-space(males)"/>|<xsl:value-of select="normalize-space(female_minimum_age)"/>|<xsl:value-of select="normalize-space(females)"/>|<xsl:value-of select="normalize-space(note)"/>
</xsl:template>

<xsl:template match="Manpower_fit_for_military_service">
    <xsl:value-of select="normalize-space(male_minimum_age)"/>|<xsl:value-of select="normalize-space(males)"/>|<xsl:value-of select="normalize-space(female_minimum_age)"/>|<xsl:value-of select="normalize-space(females)"/>
</xsl:template>

<xsl:template match="Manpower_reaching_military_service_age_annually">
    <xsl:value-of select="normalize-space(male_minimum_age)"/>|<xsl:value-of select="normalize-space(males)"/>|<xsl:value-of select="normalize-space(female_minimum_age)"/>|<xsl:value-of select="normalize-space(females)"/>
</xsl:template>

<!-- ********************************************************************** -->
<!-- ***************************** TRANSNATIONAL ************************** -->
<!-- ********************************************************************** -->

<xsl:template match="TRANSNATIONAL">
    <xsl:value-of select="normalize-space(Disputes_international)"/>|<xsl:apply-templates select="Refugees_and_internally_displaced_persons"/>|<xsl:apply-templates select="Trafficking_in_persons"/>|<xsl:apply-templates select="Illicit_drugs"/>
</xsl:template>

<xsl:template match="Refugees_and_internally_displaced_persons">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(refugees_country_of_origin)"/>|<xsl:value-of select="normalize-space(idps)"/>
</xsl:template>

<xsl:template match="Trafficking_in_persons">
    <xsl:value-of select="normalize-space(current_situation)"/>|<xsl:value-of select="normalize-space(tier_rating)"/>
</xsl:template>

<xsl:template match="Illicit_drugs">
    <xsl:value-of select="normalize-space(text())"/>|<xsl:value-of select="normalize-space(cocaine)"/>|<xsl:value-of select="normalize-space(opiates)"/>
</xsl:template>

</xsl:stylesheet>

