• Skip to main content
  • Skip to navigation

Cookies on Legislation.gov.uk

The cookies on legislation.gov.uk do two things: they remember any settings you've chosen so you don't have to choose them on every page, and they help us understand how people browse our website, so we can make improvements and fix problems. We need your consent to use some of these cookies.

  • Find out more or set individual cookie preferences

legislation.gov.uk

http://www.nationalarchives.gov.uk
  • Cymraeg
  • Home
  • Explore our collections
  • Research tools
  • Help and guidance
  • What's new
  • About us
  • Search LegislationHide

Search Legislation

Advanced Search

Section Navigation

  • XML
  • HTML
  • RDF/XML
  • Atom Feeds

Back to top

Formats

This page describes the formats that are currently available within Legislation API. Although only a few formats are available at the moment, we intend to make legislation content including metadata and the results of searches, available in a variety of different formats so that you can pick one that suits your needs. The available formats, their mime type and the filename used within the representation URI for the document are listed in the following table.

Format Mime Type Filename
XML application/xml or text/xml data.xml
HTML application/xhtml+xml data.rdf
RDF/XML application/rdf+xml data.rdf
Atom application/atom+xml data.feed

XML

We provide the content of legislation in XML format using a Legislation Schema that includes both metadata and the content of legislation. The Legislation Schema uses Dublin Core for metadata, XHTML for tables and MathML for formulae.

Both the table of contents and the full content of the legislation includes links to other parts of the legislation. The IdURI attribute provides the identifier URI for the section. This URI identifies the section, but not the particular version that should be linked to from the view of the legislation that you are looking at. The DocumentURI attribute provides the document URI for the section, which includes any selected extent and the currently viewed version.

Read more...

HTML

HTML Format

We provide the content of sections and tables of contents in a ready-transformed HTML format that is suitable for embedding within a web page. These HTML snippets are only available through their representation URI and not through content negotiation.

Read more...

RDF/XML

We are publishing RDF about the legislation that is provided here using the vocabularies:

Vocabulary Prefix Namespace
RDF Schema rdfs http://www.w3.org/2000/01/rdf-schema#
OWL owl http://www.w3.org/2002/07/owl#
Dublin Core Terms dct http://purl.org/dc/terms/
FOAF foaf http://xmlns.com/foaf/0.1/
XHTML Vocabulary xhv http://www.w3.org/1999/xhtml/vocab#
FRBR frbr http://purl.org/vocab/frbr/core#
Metalex metalex http://purl.org/vocab/frbr/core#

We are using these vocabularies because they will provide high recognition and ability for reuse without developers having to understand a specific legislation ontology. We do intend to use a specific legislation ontology in addition.

Read more...

Atom Feeds

We provide lists of legislation in Atom.

Read more...

  • New site design
  • Help
  • About us
  • Site map
  • Accessibility
  • Contact us
  • Privacy notice
  • Cookies

OGL logoAll content is available under the Open Government Licence v3.0 except where otherwise stated. This site additionally contains content derived from EUR-Lex, reused under the terms of the Commission Decision 2011/833/EU on the reuse of documents from the EU institutions. For more information see the EUR-Lex public statement on re-use.

© Crown and database right