|
|||||
|
|||||
Related Syntax | Related Concepts | ||||
format item |
%c |
Syntax
% format-modifier* c
The %c
format item causes OmniMark to resume parsing at the point it is encountered. %c
must
be placed within a text string. Any data output as the result of subsequent parsing is output at the place %c
occurs in the string.
For example, to output the content generated by parsing element list
, surrounded by HTML
unordered list tags, use the following code:
element "list" output "<ul>%c</ul>"
The <ul>
will be output followed by the result of parsing element list
, followed
by </ul>
. Assuming that element list
consists of item
elements, the rule fired when list
is being processed would be the item
rule:
element "item" output "<li>%c%n"
%c
must be executed once and once only within the processing of a markup rule. The
%c
may occur in the rule body or in any code executed as a result of actions in the rule body. It is a
run-time error if a %c
is executed more than once, or if it not executed at all in the course of
processing the rule.
The %c
format item may have modifiers, called element content format modifiers.
These modifiers apply to the stream (or streams) to which the %c
is written to.
These modifiers apply only to data content characters that are written as a result of parsing the content.
Literal text written to these streams is not affected by the modifiers.
It is possible to override the subcomponents, even those going into the same stream, by removing the modifier
with the following syntax:
put my-stream with "" "%c"
Related Syntax |
Related Concepts |
Copyright © Stilo International plc, 1988-2010.