Arbortext Command Language > Functions by Alphabetical Listing > selection_markup
  
selection_markup
selection_markup ([doc[, flags]])
This function returns a string representing the selected region in the given document (if no selection exists in that document, its value is null). The string includes any XML/SGML codes (markup).
flags — A bitmask that controls the markup included in the returned string and is constructed using OR with the following flags:
0x1 — Include the contents of the selected region. This is the default option if flags is 0 or unspecified.
0x2 — Include the XML or SGML header associated with the selected region. If the region does not include the entire document, this will be a fragment (file entity) header.
0x4 — Ignore the selection and act on the entire document instead.
0x8 — Use XML syntax in the string returned even if the selection is in an SGML document.
0x10 — Use SGML syntax in the string returned even if the selection is in an XML document.
0x20 — Don't convert non-ASCII characters into entity references (as though the set writenonasciichar=char option was in effect). If this bit is not specified, non-ASCII characters are converted according to the current set writenonasciichar setting.
0x40 — Don't include insignificant line breaks. If this bit is not specified, insignificant line breaks will be included based on the set outputrecordlength command setting.
0x80 — Suppress Arbortext processing instructions. Arbortext processing instructions can also be suppressed using the set writepi command.
0x100 — Don't include the markup in the result. This option takes precedence over any other flag bits that control how markup is generated.
Calling selection_markup with no parameters will return the same string as the predefined variable $selection if set sgmlselection=on.