Introduction
When inserting a grouping level provision around some lower-level provisions (e.g. a part around some sections), it is important that it is inserted correctly to ensure the correctly structure of the underlying XML. We call this action ‘wrapping’.
How to wrap a provision
Specify the lower-level provisions that you would like to ‘wrap’ within a grouping provision by:
Selecting one or more contiguous, sibling provisions using the structure view (Ctrl + mouse click), or
Highlighting the provisions in the Editor
Specify you would like to ‘wrap’ by
Placing your cursor in the highlighted text and using the right-click menu and select ‘Wrap element…’,
From the upper toolbar, select ‘Tools > Wrap element…’
Using the keyboard shortcut Alt + w
If your selection is valid, the system will present a list of valid grouping level provisions that you can insert
Select one to insert it
The system will attempt to acquire a lock on the appropriate document fragment if it hasn’t got one already and then will insert the selected grouping-level provision, wrapping it around the selected lower-level provisions to create valid XML
The following tables show the provisions that can be ‘wrapped’ and the specific rules governing when they can be inserted.
In bills (including Acts)
Selected provisions being wrapped | Wrap option | Rules |
Part | Group of Parts | If the part isn’t already within a group of parts |
Chapter | Part | If the chapter isn’t already within a part |
Cross heading | Part | If the cross heading isn’t already within a part |
Cross heading | Chapter | If the cross heading isn’t already within a chapter; and the cross heading is within a part |
Section | Cross heading | If the section isn’t already within a cross heading; and the section is within a part, chapter or when section has no upper-level grouping provisions. |
Section | Part | If the section isn’t already within a part |
Section | Chapter | If the section isn’t already within a chapter; and the section is within a part |
Chapter (in a schedule) | Part | If the chapter isn’t already within a part |
Cross heading (in a schedule) | Part | If the cross heading isn’t already within a part |
Cross heading (in a schedule) | Chapter | If the cross heading isn’t already within a chapter; and the cross heading is within a part |
Schedule paragraph | Cross heading | If the schedule paragraph isn’t already within a cross heading; and the schedule paragraph is within a part, chapter or when the schedule paragraph has no upper-level grouping provisions |
Schedule paragraph | Part | If the schedule paragraph isn’t already within a part |
Schedule paragraph | Chapter | If the schedule paragraph isn’t already within a chapter; and the schedule paragraph is within a part |
In SI/SSIs
Selected provisions being wrapped | Wrap option | Rules |
Part | Group of parts | If the part isn’t already within a group of parts |
Chapter | Part | If the chapter is within a part; but not already within a chapter |
Section | Part | If the Section isn’t already within a part |
Section | Chapter | If the Section is already within a Part but is not within a chapter |
Sub-section | Part | If the Sub-section isn’t already within a part |
Sub-section | Chapter | If the Sub-section is within a Part but isn’t already within a chapter |
Sub-section | Section | If the Sub-section is within a Part and/or Chapter but isn’t already within a Section |
Cross heading | Part | If the cross heading isn’t already within a Part |
Cross heading | Chapter | If the cross heading is within a Part but isn’t already within a Chapter |
Cross heading | Section | If the cross heading is within a Part and Chapter but isn’t already within a Section |
Cross heading | Sub-section | If the cross heading is within a Part and/or Chapter and/or Section but isn’t already within a Sub-section |
Regulation (or article etc.) | Part | If the Regulation isn’t within a Part |
Regulation (or article etc.) | Chapter | If the Regulation is within a Part but isn’t already within a Chapter |
Regulation (or article etc.) | Section | If the Regulation is within a Part or Chapter but isn’t already within a Section |
Regulation (or article etc.) | Sub-section | If the Regulation is within a Part of Chapter or Section but isn’t already within a Sub-heading |
Regulation (or article etc.) | Cross heading | If the Regulation is within a Part or Chapter or Section or Subsection but isn’t already within a cross heading |
Sch Chapter | Sch Part | If the chapter is within a part; but not already within a chapter |
Sch Section | Sch Part | If the Section isn’t already within a part |
Sch Section | Sch Chapter | If the Section is already within a Part but is not within a chapter |
Sch Sub-section | Sch Part | If the Sub-section isn’t already within a part |
Sch Sub-section | Sch Chapter | If the Sub-section is within a Part but isn’t already within a chapter |
Sch Sub-section | Sch Section | If the Sub-section is within a Part and/or Chapter but isn’t already within a Section |
Sch Cross heading | Sch Part | If the cross heading isn’t already within a Part |
Sch Cross heading | Sch Chapter | If the cross heading is within a Part but isn’t already within a Chapter |
Sch Cross heading | Sch Section | If the cross heading is within a Part and Chapter but isn’t already within a Section |
Sch Cross heading | Sch Sub-section | If the cross heading is within a Part and/or Chapter and/or Section but isn’t already within a Sub-section |
Schedule paragraph | Sch Part | If the Schedule Paragraph isn’t within a Part |
Schedule paragraph | Sch Chapter | If the Schedule Paragraph is within a Part but isn’t already within a Chapter |
Schedule paragraph | Sch Section | If the Schedule Paragraph is within a Part or Chapter but isn’t already within a Section |
Schedule paragraph | Sch Sub-section | If the Schedule Paragraph is within a Part of Chapter or Section but isn’t already within a Sub-heading |
Schedule paragraph | Sch Cross heading | If the Schedule Paragraph is within a Part or Chapter or Section or Subsection but isn’t already within a cross heading |
Schedule paragraph | If the Schedule Paragraph is within a Part or Chapter or Section or Subsection but isn’t already within a cross heading |
Hints and tips
There are certain restrictions in place to stop you wrapping elements without the correct structure in place e.g. you cannot wrap a set of sections within a Chapter unless they are already wrapped within a Part
Check the structure view once you’ve wrapped your specified provisions to double-check that they have been correctly ‘wrapped’ (looking for a parent/child relationship)