Training Module: Using document checks to validate your document
As you draft your document, there are a set of validation rules being applied to check the document is correct. These rules check both that the underlying XML is valid (and therefore the document can successfully be published downstream) and they also pick up some more general drafting and formatting issues.
Introduction
Document checks - validating your document
Exercises
Getting Started
Before you can complete this exercise, you will need your own training project containing a bill with document check errors.
If you haven’t got one already, create a project containing this bill containing various document check errors:
If you already have a training project, start from step 4 in the instructions below.
The following steps will allow you to create the data required for this exercise.
Exercise 1: Fix your document check errors
This exercise will show you how you can fix document check errors.
The document we’re using for this exercise has a good selection of document check warnings that will need reviewing before the document is fit for sharing/publishing.
Step 1: Address ‘The part is not divided into an even hierarchical structure’ and ‘part number'
The document is currently divided into 1 part only which isn’t a valid structure for a finished document. If you are still drafting the document you can safely ignore this document check. To fix the document check error, restructure your document so that the content is evenly divided. In this case, the simplest thing would be to remove the part and cross heading using Unwrap Elements.
Additionally, there is another document check warning that the part is incorrectly numbered. Both of these will be fixed with the following actions—
Step 2: Address ‘Both start and end quotation marks have been set to none'
Clicking on this document check will jump to the offending quoted structure. It is missing a start and end tag. There is a ‘quick fix’ link which will automatically resolve the issue—
Step 3: Address ‘there is a space at the end of the text'
Clicking on this document check will jump to the offending provision. There are other document check errors with similar warnings: space at the end of the text and space at the beginning of the text. There are also ‘quick fix’ links which will automatically resolve the issues. However, as there are a few, it’s quicker to use the single ‘remove space’ action—
Step 4: Address ‘Definitions are usually in alphabetical order'
This is purely advisory and not mandatory to fix. The easy fix would be to rearrange them in alphabetical order, but sometimes it makes more sense to leave them in a particular order which isn’t alphabetical.
On this occasion just delete the subsection with the definitions as they clearly are not relevant to the bill—
Step 5: Address ‘The target of internal reference cannot be found'
This document check appears when an existing cross reference has been broken e.g. the target provision has been deleted; or it can appear after automatic tagging of cross references where Lawmaker recognises it to be a cross reference but is unable to find the corresponding provision.
In this case, Lawmaker’s automatic tagging has created a false positive match: subsection (1) in this context refers to section 126 in the Local Government Act and not in this particular section in the document. You could remove the tag, but if you were likely to run another automatic tag on this provision in future, the same issue would reoccur. The best option would be to mark as ignored which will stop Lawmaker incorrectly marking it up as an internal reference again.
Exercise 2: View XML warnings
This exercise will show you how to view XML warnings.
Open the XML Warnings in the right-hand panel. The document you are using for this test does not have any XML warnings. If you did encounter an error in this panel that you can’t readily resolve (e.g. by clicking Undo or by renumbering the document) then raise a support request and the support team will help fix the issue.
When complete…
Save your changes and close the Editor using the Close Editor button