text
The text statement sends the enclosed string directly to the output stream.
Syntax
<text> ::= “text” ( “disable-output-escaping” )? <quote> <alphanumeric string> <quote>
Options
disable-output-escaping
|
specifies whether special characters are escaped when written to the output. For example, if present, "<div>" would be output as "<div>".. |
Elements
None.
Examples
For example from a stylesheet used when processing LaTeX files (note the use of '\\' to produce '\'
because a single backspace is an escape character).
stylesheet {
version "1.0"
proc nwmargintag {
text disable-output-escaping "\\nwmargintag{"
text "}"
}
}
will compile to
<template name="nwmargintag">
<text>\nwmargintag{</text>
<text>}</text>
</template>
Errors
Misspelling the option.
stylesheet {
version "1.0"
proc nwmargintag {
text disable-ouput-escaping "\\nwmargintag{"
text "}"
}
}
gives the error (there may also be other consequential errors here)
**** (106) Unexpected symbol "disable-ouput-escaping" in line 5
Check spelling, did you mean "disable-output-escaping" ?
In the unlikely case of forgetting the text expression.
stylesheet {
version "1.0"
proc nwmargintag {
text disable-output-escaping
text "}"
}
}
which is reported as
**** (119) Missing item string after text in line 5
Insert item.
Copyright 2024 Hugh Field-Richards. All Rights Reserved.