Training module (SI): Validate your document through document checks and XML warnings
In this module, you will learn about document checks and XML warnings.
Tutorial
In the right-hand panel, Lawmaker provides a range of tabs relevant for editing and checking your document. For this module, two are relevant:
Document Checks - indications that something in your document has been drafted in a non-standard way
XML Warnings - technical issues with the underlying XML language in your document
This module will not cover everything you could possibly encounter in these two tabs; rather, it should give you an idea of how to use these tabs to check your document before you need to send it for registration.
Document Checks
Document checks occur when something in your document has been flagged as being drafted in a non-standard way.
Generally, they are divided into two groups:
Advisory - issues that are advisable to fix but will not cause registration issues; and
Mandatory - issues that are likely to cause registration issues.
Some warnings contain automatic fixes. For example, if some provisions have leading or trailing spaces - i.e. extra blank spaces - you can remove these by clicking the option within the warning.
Generally, warnings should contain sufficient information to fix the issue by yourself. See further information below for a link to information on some common document warnings.
XML Warnings
XML warnings indicate that something is incorrect within the XML structure of your document.
For example, if a ‘Content’ element contains a ‘Regulation’ element, this would be invalid structure and would trigger a warning.
This will likely cause issues with registration, and can also be problematic for PDF generation.
Therefore it is important to get XML errors fixed as early as possible.
Some XML warnings will include an option to automatically fix the issue. Note however that this may involve simply deleting the provision in which it has occurred.
If you have XML errors in your document, and these cannot be fixed using the inbuilt options or by redrafting the affected area, please contact the Service portal.
Hopefully, XML warnings won’t appear in your document as Lawmaker is set up to avoid them when you draft normally. Occasionally they could occur, e.g., through copy-and-paste operations.
Video
Please watch the following video to consolidate the above.
It comprises:
Further information
Information on some common and specific document checks can be found here: Document checks - additional guidance
(Optional:) Exercises
If you are pressed for time, it is sufficient to be aware of the concepts of Document checks and XML Warnings to complete this module.
However, if you want practice in resolving some of these checks, see the exercises below.
Getting started
For these exercises, you will need to be logged into the Training environment for Lawmaker (link here). If you already have a project with subtype Regulations, you can use this. Otherwise create a new project (see instructions in the expandable section below).
You should begin by uploading one of the documents below, as relevant for the type of document you are working with:
Northern Ireland Statutory Rule: Example_doc_NISR.xml
Scottish Statutory Instrument: Example_doc_SSI.xml
UK Statutory Instrument: Example_doc_UKSI.xml
Welsh Statutory Instrument (English): Example_doc_WSI_en.xml
(The content of these secondary instruments may not be realistic for your document type.)
For detailed instructions, see the expandable section below.
Exercise 1 - Fix the “Advisory: The body of the document is not divided into an even hierarchical structure… [etc.]” warning
Before doing this exercise, ensure you have read the page The body of the document is not divided into an even hierarchical structure. This is because not all provisions in the body are wrapped in the same kind of grouping provision (e.g. a Part).
Your document should contain a warning with the text:
Advisory: The body of the document is not divided into an even hierarchical structure. This is because not all provisions in the body are wrapped in the same kind of grouping provision (e.g. a Part). To fix, select the provisions that are not in the group and drag them (one by one) into an existing group.
Review your document to identify the cause of this warning, then fix it.
Exercise 2 - Fix “The legislative document relating to external reference… could not be located… [etc.]” warnings
Before doing this exercise, see The legislative document relating to the external reference _______ could not be located on Legislation.gov.uk . This may be because the document doesn't exist yet or because there is a typo in the name. .
You should have four warnings in your document of this type, referring to the definition for “offshore exploration licence” in Regulation 2.
Identify the cause of these warnings and fix them.
Hint: the reference is intended to link to this piece of legislation.
Exercise 3 - Fix “Mandatory: The SI's title could not be found in the first provision.”
Your document should contain a warning with the text:
Mandatory: The SI's title could not be found in the first provision.
Review your document to find the cause of this document warning and fix the issue.
