|
|||||
|
||||||
Related Concepts | Other Library Functions |
function |
rtf |
Library: XML and Parsing, Rich Text Format (RTF) (OMRTF)
Import: omrtf.xmd |
define external markup-parser function rtf-parse scan value parser-input data
Argument definitions
The RTF Parser is invoked in a manner similar to OmniMark's built-in SGML and XML parsers, differing only in specifying "markup-parse rtf
" instead of "do xml-parse
" or "do sgml-parse
".
import "omrtf.xmd" unprefixed process do markup-parse rtf scan file #args[1] output "%c" done
markup-parse
tells OmniMark to invoke an external markup parser, and rtf
tells OmniMark which external markup parser it is.
The scan
argument is used for the same purpose as with OmniMark's built-in parsers to provide input to the parser. It can be any OmniMark source.
The omrtf.xmd
library defines the rtf
markup parser function and the information that can be passed to it on invocation. The RTF parser invokes element
and other OmniMark markup rules in the same manner as OmniMark's built-in parsers.
The following markup rules can be fired by the rtf parser:
element
data-content
translate
Within an element rule the following items are avaialble:
attribute
attributes
ancestor queries
%q
%v
Related Concepts Markup rules |
Other Library Functions omrtf-version rtf |