Public Access to Legislation Project
Creating links to the New Zealand Legislation website
1. Purpose
2. Introduction
3. Linking to the New Zealand Legislation website
3.1. Linking to individual HTML contents pages
3.2. Linking to individual HTML versions pages
3.3. Linking to download PDF pages
3.4. Linking to HTML whole pages
3.5. Linking to individual provisions
1. Purpose
The purpose of this document is to explain the process by which external websites can link to legislation available on the new New Zealand Legislation website.
2. Introduction
Content on the New Zealand Legislation website will be available as a set of HTML (both whole and fragmented) and as a PDF for each title of legislation. A fragment refers to the splitting of a document into smaller (lower level) components, for storage and retrieval. Examples of fragments are:
- Commentaries
- Explanatory Notes
- Provisions
- Reprints Notes
- Schedules
- Skeletons
- Tables of content
For most purposes, the PCO recommends linking to the HTML table of contents for each individual legislative document.
3. Linking to the New Zealand Legislation website
Stable links can be created to legislative documents by using the methods outlined later in this section.
The basis for linking is a schema that uniquely identifies each legislative document. This schema consists of:
- the information type (Act, Regulation, Bill, SOP)
- the legislation type or category (public, local, members, government, imperial etc)
- the year
- the number, padded with initial zeros to 4 digits. For Bills, the number will also include the Bar number and split letter (if applicable).
| Information Type | Legislation Type | Example |
|---|---|---|
| Acts | ‘imperial’ | ‘local’ | ‘private ’| ‘provincial’ | ‘public’ | /act/imperial/2001/0055 /act/local/2001/0055 /act/private/2001/0055 /act/provincial/2001/0055 /act/public/2001/0055 |
| Bills | ‘government’ | ‘local’ | ‘member’ | 'private’ | /bill/government/2001/0004-1 /bill/government/2001/0004A-2 /bill/local/2001/0004-1 /bill/local/2001/0004A-2 /bill/member/2001/0004-1 /bill/member/2001/0004A-1 /bill/private/2001/0004-1 /bill/private/2001/0004A-2 |
| Regulations | ‘imperial’ | ‘public’ | /regulation/imperial/1974/0045 /regulation/public/1999/0055 |
| SOPs | ‘government’ | ‘members’ | /sop/government/2001/0002 /sop/members/2001/0005 |
3.1. Linking to individual HTML contents pages
Linking to individual HTML contents pages is the method recommended by the PCO as being appropriate for most purposes. It takes the user to a page that is quickly downloaded, while providing all appropriate navigation options.
Method:
- Attach the schema above to the URL of the website (www.legislation.govt.nz)
- Add /latest/contents.html to the end of the URL
For example, to link to the contents page of public Regulation No 123 of 2007, use: http://www.legislation.govt.nz/regulation/public/2007/0123/latest/contents.html
3.2. Linking to individual HTML versions pages
This method takes users to the versions page for a legislative document. The versions page for an Act or Regulation lists, and links to, all versions available for that item of legislation. The versions page for an Act also lists, and links to, related Bill information (if applicable).
For Bills, the versions page lists, and links to, the following if applicable: Acts from this Bill, related Bills, Acts from related Bills, related SOPs.
Method:
- Attach the schema above to the URL of the website (www.legislation.govt.nz)
- Add /latest/versions.aspx to the end of the URL
For example, to link to the versions page of public Regulation No 123 of 2007, use: http://www.legislation.govt.nz/regulation/public/2007/0123/latest/versions.aspx
3.3. Linking to download PDF pages
This method takes users to the PDF download page. The PDF download page specifies the document’s size and provides a link to download the PDF. For larger documents, eg Income Tax Act 2004, downloading the PDF version may take some time and use a large amount of bandwidth.
Method:
- Attach the schema above to the URL of the website (www.legislation.govt.nz)
- Add /latest/viewpdf.aspx to the end of the URL
For example, to link to the download PDF page of public Regulation No 123 of 2007, use: http://www.legislation.govt.nz/regulation/public/2007/0123/latest/viewpdf.aspx
3.4. Linking to HTML whole pages
The following method enables users to view the entire legislative document on a single HTML page. For larger documents, eg Income Tax Act 2004, accessing this page may take some time and use a large amount of bandwidth.
Method:
- Attach the schema above to the URL of the website (www.legislation.govt.nz)
- Add /latest/whole.html to the end of the URL
For example, to link to the whole HTML page of public Regulation No 123 of 2007, use: http://www.legislation.govt.nz/regulation/public/2007/0123/latest/whole.html
3.5. Linking to individual provisions
Because legislative documents are continually being amended, the PCO does not recommend linking to individual provisions. When a legislative document is amended and republished, links to provisions within the document can become invalid.
Individual provisions are identified within the website by a unique, randomly generated ID. It is possible to create a link to an individual provision, by navigating to it and using the URL displayed in the browser as the basis for the link. However, the link may become invalid if, for example, the provision is later repealed.
