Permalink
Browse files

Initial load

  • Loading branch information...
0 parents commit faa172fc1e3134151881d0b35df79f9fbf66ca55 @legislation committed Mar 20, 2012
Showing 302 changed files with 49,117 additions and 0 deletions.
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+© Crown copyright
+
+You may use and re-use this code free of charge under the terms of the Open Government Licence
+
+http://www.nationalarchives.gov.uk/doc/open-government-licence/
+
+-->
+<CodeLists>
+ <CodeList name="DocumentMainType">
+ <!-- spo = /slddata/metadata/type -->
+ <!-- schema = /Legislation/ukm:Metadata/*/ukm:DocumentClassification/ukm:DocumentMainType/@Value -->
+ <!-- uri = in identifier -->
+ <!-- status = in identifier -->
+ <Code spo="20100" schema="UnitedKingdomPublicGeneralAct" uri="ukpga" status="revised" authority="kqpap" />
+ <Code spo="20101" schema="UnitedKingdomLocalAct" uri="ukla" status="enacted" authority="kqpap" />
+ <Code spo="20102" schema="UnitedKingdomLocalAct" uri="ukla" status="revised" authority="kqpap" />
+ <Code spo="21000" schema="UnitedKingdomPrivateAct" uri="ukpa" status="enacted" authority="kqpap" />
+ <Code spo="20200" schema="GreatBritainAct" uri="apgb" status="revised" />
+ <Code spo="20300" schema="EnglandAct" uri="aep" status="revised" />
+ <Code spo="20400" schema="ScottishOldAct" uri="aosp" status="revised" authority="kqps" />
+ <Code spo="20401" schema="ScottishAct" uri="asp" status="revised" authority="kqps" />
+ <Code spo="20500" schema="IrelandAct" uri="aip" status="revised" />
+ <Code spo="20600" schema="NorthernIrelandParliamentAct" uri="apni" status="revised" />
+ <Code spo="20700" schema="NorthernIrelandAssemblyMeasure" uri="mnia" status="revised" />
+ <Code spo="20701" schema="NorthernIrelandAct" uri="nia" status="enacted" authority="gpni" />
+ <Code spo="20702" schema="NorthernIrelandAct" uri="nia" status="revised" />
+ <Code spo="20800" schema="UnitedKingdomChurchMeasure" uri="ukcm" status="revised" authority="kqpap" />
+ <Code spo="20900" schema="WelshAssemblyMeasure" uri="mwa" status="revised" authority="kqpap" />
+ <Code spo="30100" schema="UnitedKingdomStatutoryInstrument" uri="uksi" status="made" authority="kqpap" />
+ <Code spo="30101" schema="ScottishStatutoryInstrument" uri="ssi" status="made" authority="kqps" />
+ <Code spo="30102" schema="WelshStatutoryInstrument" uri="wsi" status="made" authority="kqpap" />
+ <Code spo="30400" schema="NorthernIrelandStatutoryRule" uri="nisr" status="made" authority="gpni" />
+ <Code spo="30500" schema="UnitedKingdomChurchInstrument" uri="ukci" status="created" authority="kqpap" />
+ <Code spo="30800" schema="NorthernIrelandOrderInCouncil" uri="nisi" status="made" authority="gpni" />
+ <Code spo="30801" schema="NorthernIrelandOrderInCouncil" uri="nisi" status="revised" />
+ <Code spo="30902" schema="UnitedKingdomMinisterialOrder" uri="ukmo" status="created" authority="kqpap" />
+ <Code spo="31000" schema="UnitedKingdomStatutoryInstrument" uri="uksi" status="made" authority="kqpap" />
+ <Code spo="31001" schema="ScottishStatutoryInstrument" uri="ssi" status="made" authority="kqps" />
+ <Code spo="31002" schema="WelshStatutoryInstrument" uri="wsi" status="made" authority="kqpap" />
+ <Code schema="UnitedKingdomStatutoryRuleOrOrder" uri="uksro" status="made" authority="kqpap" />
+ <Code schema="UnitedKingdomStatutoryInstrumentLocal" uri="uksi" status="made" authority="kqpap" />
+ <Code schema="ScottishStatutoryInstrumentLocal" uri="ssi" status="made" authority="kqps" />
+ <Code schema="WelshStatutoryInstrumentLocal" uri="wsi" status="made" authority="kqpap" />
+ <Code schema="NorthernIrelandStatutoryRuleLocal" uri="nisr" status="made" authority="gpni" />
+ <Code schema="UnitedKingdomDraftStatutoryInstrument" uri="ukdsi" status="draft" authority="kqpap" />
+ <Code schema="WelshDraftStatutoryInstrument" uri="wdsi" status="draft" authority="kqpap" />
+ <Code schema="ScottishDraftStatutoryInstrument" uri="sdsi" status="draft" authority="kqps" />
+ <Code schema="NorthernIrelandDraftStatutoryRule" uri="nidsr" status="draft" authority="gpni" />
+ <Code schema="NorthernIrelandDraftOrderInCouncil" uri="nidsi" status="draft" authority="gpni" />
+ <!--
+ |_. SPO code |_. Schema value |_. URI abbreviation |_. Status |_. Authority (for opsi data. Data from sld = sld)|
+ | 20100 | UnitedKingdomPublicGeneralAct | ukpga | revised/enacted | kqpap |
+ | 20101 | UnitedKingdomLocalAct | ukla | enacted | kqpap |
+ | 20102 | UnitedKingdomLocalActRevised | cukla | revised | n/a |
+ | 20200 | GreatBritainAct | apgb | revised | n/a |
+ | 20300 | EnglandAct | aep | revised | n/a |
+ | 20400 | ScottishAct* | aosp | revised | n/a |
+ | 20401 | ScottishAct | asp | revised/enacted | kqps |
+ | 20500 | IrelandAct | aip | revised | n/a |
+ | 20600 | NorthernIrelandParliamentAct | apni | revised | n/a |
+ | 20700 | NorthernIrelandAssemblyMeasure | mnia | revised | n/a |
+ | 20701 | NorthernIrelandAct | nia | enacted | gpni |
+ | 20702 | NorthernIrelandAct | nia | revised | n/a |
+ | 20800 | UnitedKingdomChurchMeasure | ukcm | revised | n/a |
+ | 20900 | WelshAssemblyMeasure | mwa | revised/enacted | kqpap |
+ | 30100 | UnitedKingdomStatutoryInstrument | uksi | made | kqpap |
+ | 30101 | ScottishStatutoryInstrument | ssi | made | kqps |
+ | 30102 | WelshStatutoryInstrument | wsi | made | kqpap |
+ | 30400 | NorthernIrelandStatutoryRule | nisr | made | gpni |
+ | 30500 | UnitedKingdomChurchInstrument | ukci | created | n/a |
+ | 30800 | NorthernIrelandOrderInCouncil | nisi | made | gpni |
+ | 30801 | NorthernIrelandOrderInCouncil | nisi | revised | n/a |
+ | 30902 | UnitedKingdomMinisterialOrder | ukmo | created | n/a |
+ | 31000 | UnitedKingdomStatutoryInstrument | uksi | made | kqpap |
+ | 31001 | ScottishStatutoryInstrument | ssi | made | n/a |
+ | 31002 | WelshStatutoryInstrument | wsi | made | n/a |
+ -->
+ </CodeList>
+</CodeLists>
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+© Crown copyright
+
+You may use and re-use this code free of charge under the terms of the Open Government Licence
+
+http://www.nationalarchives.gov.uk/doc/open-government-licence/
+
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:leg="http://www.legislation.gov.uk/namespaces/legislation"
+ xmlns:ukm="http://www.legislation.gov.uk/namespaces/metadata"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:err="http://www.tso.co.uk/assets/namespace/error"
+ xmlns:tso="http://www.tso.co.uk/assets/namespaces/functions"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ exclude-result-prefixes="xs leg ukm err tso xhtml"
+ version="2.0">
+
+<xsl:output indent="no" />
+
+<xsl:key name="acronyms" match="leg:Acronym" use="." />
+<xsl:key name="abbreviations" match="leg:Abbreviation" use="." />
+<xsl:key name="matchText" match="leg:Contents" use="tokenize(@MatchTextEntries, ' ')" />
+
+<xsl:template match="/">
+ <xsl:apply-templates select="." mode="filter" />
+</xsl:template>
+
+<!-- These templates are used to filter the acronyms and abbreviations down to the first occurrence -->
+
+<xsl:template match="leg:Acronym" mode="filter">
+ <xsl:choose>
+ <xsl:when test="key('acronyms', .)[1] is .">
+ <xsl:next-match />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="filter" />
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="leg:Abbreviation" mode="filter">
+ <xsl:choose>
+ <xsl:when test="key('abbreviations', .)[1] is .">
+ <xsl:next-match />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="filter" />
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- These templates are used to add MatchText attributes on relevant contents items -->
+<xsl:template match="*[@ContentRef]" mode="filter">
+ <xsl:copy>
+ <xsl:if test="key('matchText', @ContentRef)">
+ <xsl:attribute name="MatchText" select="'true'" />
+ </xsl:if>
+ <xsl:apply-templates select="@*|node()" mode="filter" />
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="leg:Contents/@MatchTextEntries" mode="filter">
+ <xsl:variable name="values" as="xs:string*" select="tokenize(., ' ')[. = ('introduction', 'body', 'schedules', 'signature', 'note', 'earlier-orders')]" />
+ <xsl:if test="exists($values)">
+ <xsl:attribute name="MatchTextEntries" select="$values" />
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="node()|@*" mode="filter">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" mode="#current" />
+ </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>
Oops, something went wrong. Retry.

0 comments on commit faa172f

Please sign in to comment.