<swapBordersFacingPages> (Swap Paragraph Borders on Odd Numbered Pages)

This element specifies whether left and right paragraph borders defined under the <pBdr> element (§2.3.1.24) shall be swapped under conditions where it is possible that the those pages are intended to be used to create a book-like publication.

Typically, no changes shall be made to the positions of paragraph borders defined under the <pBdr> element - a right border is always on the right, and a left border is always on the left. This element, when present with a @val attribute value of true (or equivalent), specifies that under the two following conditions:

  • The margins in this document are mirrored using the <mirrorMargins> element (§2.15.1.57)

  • The header/footers in this document are different on even and odd numbered pages using the <evenAndOddHeaders> element (§2.10.1)

That paragraph borders on odd-numbered pages will be swapped - that is, left borders shall be displayed on the right and right borders shall be displayed on the left.

example:
<w:style w:type="paragraph" w:default="1" w:styleId="Normal" ><w:pPr>
    <w:pBdr>
      <w:right w:val="single" w:color="auto" />
    </w:pBdr></w:pPr>
</w:style>

If a two-page document is created using this default paragraph style, then all paragraphs will have a border on the right side, as follows:

However, if this compatibility setting is turned on:

<w:compat>
  <w:swapBordersFacingPages />
</w:compat>

Then the borders on the first page (being an odd-numbered page) shall be swapped, resulting in the following output:

Parent Elements

<compat>2.15.3.9)

Attributes

Description

<val> (On/Off Value)

Specifies a binary value for the property defined by the parent XML element.

A value of on, 1, or true specifies that the property shall be explicitly applied. This is the default value for this attribute, and is implied when the parent element is present, but this attribute is omitted.

A value of off, 0, or false specifies that the property shall be explicitly turned off.

example:
<w:… w:val="off"/>

The @val attribute explicitly declares that the property is turned off. ]

The possible values for this attribute are defined by the ST_OnOff simple type (§2.18.67).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_OnOff">
	<attribute name="val" type="ST_OnOff"/>
</complexType>