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:
Document_Check_Errors.xml
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