Export (0) Print
Expand All

MoveFromRangeEnd class

Defines the MoveFromRangeEnd Class. When the object is serialized out as xml, its qualified name is w:moveFromRangeEnd.

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

public class MoveFromRangeEnd : MarkupRangeType

[ISO/IEC 29500-1 1st Edition]

moveFromRangeEnd (Move Source Location Container - End)

This element specifies the end of a region whose move source contents are part of a single named move. When a move source is stored as a revision in a WordprocessingML document, two pieces of information shall be stored about that move source:

  • A set of pieces of content which were moved - both inline-level content (§17.13.5.22) and paragraphs (§17.13.5.21)

  • A move source container (or "bookmark") which specifies that all content within it which marked as a move source is part of a single named move. The name attribute on the move container links a group of move source content with the corresponding group of move destination content.

This element defines the end of the latter piece of the move revision data - the container. The id attribute on this element shall be used to link this element with the corresponding start of a move source container in the document.

The following restrictions are applied to the use of this element:

  • If this element occurs without a corresponding moveFromRangeStart element (§17.13.5.24) with a matching id attribute value, then the document is non-conformant.

  • If this element and its paired end occur without a matching move destination container (§17.13.5.28; §17.13.5.27), then the document is non-conformant.

  • If multiple move source containers surround the same text, the document is non-conformant.

[Example: Consider a WordprocessingML document in which the first paragraph contains two sentences, and the first sentence is moved before the second sentence, and this move is tracked as a revision, as follows (in this image, green underline indicates the move destination and the green strikethrough indicates the move source location):

This document has the sentence Some moved text. moved to the first sentence in the document. This revision is represented using the following WordprocessingML:

<w:p>
  <w:moveToRangeStart w:id="0" … w:name="move1" />
  <w:moveTo w:id="1" … >
    <w:r>
      <w:t>Some moved text.</w:t>
    </w:r>
  </w:moveTo>
  <w:moveToRangeEnd w:id="0" />
  <w:r>
    <w:t xml:space="preserve">Some text.</w:t>
  </w:r>
  <w:moveFromRangeStart w:id="2" … w:name="move1" />
  <w:moveFrom w:id="3" … >
    <w:r>
      <w:t>Some moved text.</w:t>
    </w:r>
  </w:moveFrom>
  <w:moveFromRangeEnd w:id="2" />
</w:p>

The moveFromRangeEnd element specifies the end of the move source container within which all moved content is part of the move named move1. end example]

Parent Elements

bdo (§17.3.2.3); body (§17.2.2); comment (§17.13.4.2); customXml (§17.5.1.6); customXml (§17.5.1.4); customXml (§17.5.1.5); customXml (§17.5.1.3); deg (§22.1.2.26); del (§17.13.5.14); den (§22.1.2.28); dir (§17.3.2.8); docPartBody (§17.12.6); e (§22.1.2.32); endnote (§17.11.2); fldSimple (§17.16.19); fName (§22.1.2.37); footnote (§17.11.10); ftr (§17.10.3); hdr (§17.10.4); hyperlink (§17.16.22); ins (§17.13.5.18); lim (§22.1.2.52); moveFrom (§17.13.5.22); moveTo (§17.13.5.25); num (§22.1.2.75); oMath (§22.1.2.77); p (§17.3.1.22); rt (§17.3.3.24); rubyBase (§17.3.3.27); sdtContent (§17.5.2.34); sdtContent (§17.5.2.33); sdtContent (§17.5.2.35); sdtContent (§17.5.2.36); smartTag (§17.5.1.9); sub (§22.1.2.112); sup (§22.1.2.114); tbl (§17.4.38); tc (§17.4.66); tr (§17.4.79)

Attributes

Description

displacedByCustomXml (Annotation Marker Relocated For Custom XML Markup)

Specifies that the parent annotation's placement shall be directly linked with the location of the physical presentation of a custom XML element in the document. This element only has an effect when the custom XML element is block-level (i.e. surrounds an entire paragraph), as in this scenario the logical and physical placement of the annotation and custom XML element can differ.

Specifically, in this case, the custom XML is presented *around* the block-level object it encloses (the paragraph, table, table row, or table cell), but is physically represented within that same object (i.e. within the paragraph, table, table row or table cell). This requirement stems from the fact that there is no location for the location of the annotation within the document at its logical location (around a table, for example).

If this element is omitted, then the annotation shall be anchored inside of all block-level custom XML elements in the paragraph. If this element is present, but no block-level custom XML tag is located at the position it specifies (before or after), then it shall be ignored.

[Example: Consider a paragraph with block level custom XML markup and two comment anchor annotations (one before and one after the custom XML element's physical representation), as follows:

Since all three of these items are around the entire paragraph, they are stored outside of the paragraph. However, in order to ensure that their relative positions are stored correctly, any annotation which must be displaced by the physical custom XML element specifies this information, resulting in the following WordprocessingML:

…<w:commentRangeStart w:id="0" />
<w:commentRangeStart w:id="1" w:displaced byCustomXml="next" />
<w:customXml w:element="spec" … />
<w:p>
  …</w:p>
…

The displacedByCustomXml attribute specifies that even though all three of these items are around the paragraph and is moved inside the paragraph to be represented physically, the comment with ID 0 must be inside the custom XML, but the comment with ID 1 must be displaced to stay outside of the relative location of the next custom XML element (the spec element). end example]

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

id (Annotation Identifier)

Specifies a unique identifier for an annotation within a WordprocessingML document. The restrictions on the id attribute, if any, are defined by the parent XML element.

If this attribute is omitted, then the document is non-conformant.

[Example: Consider an annotation represented using the following WordprocessingML fragment:

<… w:id="1" … >
  …
</…>

The id attribute specifies that the ID of the current annotation is 1. This value is used to uniquely identify this annotation within the document content. end example]

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

[Note: The W3C XML Schema definition of this element’s content model (CT_MarkupRange) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

Show:
© 2014 Microsoft