Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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’. To insert a Part, Chapter or other “grouping” level around existing provisions like sections, you need to use the wrap function.

To remove a Part, Chapter or other “grouping” level without removing the provisions within the Part etc., you use the unwrap function.

How to wrap a provision

  1. Specify the lower-level provisions that you would like to ‘wrap’ within a grouping provision by:
    1. Selecting one or more contiguous, sibling provisions using the structure view (Ctrl + mouse click), or
    2. Highlighting the provisions in the Editor
  2. Specify you would like to ‘wrap’ by
    1. Placing your cursor in the highlighted text and using the right-click menu and select ‘Wrap element…’,
    2. From the upper toolbar, select ‘Tools > Wrap element…’
    3. Using the keyboard shortcut Alt + w
  3. If your selection is valid, the system will present a list of valid grouping level provisions that you can insert
  4. Select one to insert it
  5. 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

Hints and tips

...

To wrap one or more provisions:

  1. Select the provisions you want to wrap

  2. Either:

    • right-click within the selected provisions in the structure view or the Editor and select Wrap element…,

    • from the toolbar select Tools>Wrap element… or

    • use the keyboard shortcut Alt+w.

  3. Select from the menu that appears the element (e.g. Part) that you want to wrap the provisions with.

Info
  • Lawmaker will only show the elements that you can validly wrap the selection in. This will depend on the document type and the provisions you have selected but can also depend on the parent provisions, e.g. you can only wrap provisions in a Chapter if they are already within a Part. You can’t wrap provisions in an element they are already wrapped with, e.g. provisions already within a cross-heading cannot be wrapped in a cross-heading.

  • To wrap provisions, Lawmaker will take a lock on the parent of those provisions. If it can’t get a lock (because someone else is editing the parent) then you won’t be able to complete the wrap operation.

Selecting provisions to wrap

To select the provisions you want you can either:

  • Select the provisions in the structure view - see Using the structure view.

  • Highlight the provisions in the Editor by dragging your cursor from the beginning to the end of them (or vice versa).

How to unwrap provisions

To unwrap provisions do one of the following:

  • Right-click on the grouping level provision you want to remove in the Structure view and select Unwrap element.

  • Right-click on the provisions in the Editor and select Unwrap element.

  • Use the keyboard shortcut Alt+e.

This will remove the grouping level provision but not the content within it, e.g. if you unwrap a Part then the Part will be deleted, but not any sections within the Part.

When you unwrap a provision, Lawmaker will move the existing contents of that provision into another sibling provision if it exists so as to maintain a valid document structure:

  • If the unwrapped provision was the first of its kind, its contents will be moved to the next provision of the same kind, e.g. if you unwrap the first Part in a document, then the contents of that Part will be moved to the beginning of what was the second Part.

  • if the unwrapped provision was the second or later one of its kind, its contents will be moved into the previous provision of the same kind, e.g. if you unwrap the last Chapter within a Part then the contents of that Chapter will be moved to the end of the previous Chapter.

Note

It is possible sometimes by unwrapping a specific provision to create an invalid document structure, e.g. in some cases by unwrapping a Part that contains Chapters. You will see a warning about this in the Document Checks panel. To fix the issue, you may need to unwrap further provisions.

Wrap options

The following tables summarise the wrap options dependent on your selection.

Bills and Acts

Selected provision(s)

Wrap option (depending on context)

Part

Group of Parts

Chapter

Part

Cross heading

Part, Chapter

Section

Part, Chapter, Cross heading

Schedule paragraph

Part, Chapter, Cross heading

SIs and SSIs

Selected provisions(s)

Wrap option (depending on context)

Part

Group of parts

Chapter

Part

Section

Part, Chapter

Sub-section

Part, Chapter, Section

Cross heading

Part, Chapter, Section, Sub-section

Regulation (or article etc.)

Part, Chapter, Section. Sub-section, Cross-heading

Schedule paragraph

Part, Chapter, Section, Sub-section, Cross-heading

Provisions that can be unwrapped

You can unwrap the following provisions:

  • Group of Parts

  • Part

  • Chapter

  • Section (SI/SSIs only)

  • Sub-section (SI/SSIs only)

  • Cross-heading