| Did you know ... | Search Documentation: |
| Predicate sgml_parse/2 |
Input is a stream. A full description of the option-list is below.
Note that, because call(Event, Pred) is a two-argument
option, these options are processed by a dedicated routine rather than
the common option handling. As a result Options must be a
list and cannot be given as a dict.
atom (default), and string. See load_structure/3
for details.source(Stream), this implies reading is stopped as soon as
the element is complete, and another call may be issued on the same
stream to read the next element.content is like element but assumes
the element has already been opened. It may be used in a call-back from
call(on_begin, Pred) to parse individual
elements after validating their headers.doctype
declaration.allowed(Elements) option of get_sgml_parser/2.
It disables the parser's default to complete the parse-tree by closing
all open elements.max_errors(-1)
makes the parser continue, no matter how many errors it encounters.
error(limit_exceeded(max_errors, Max), _)
informational.quiet, the error is suppressed. Can be used
together with call(urlns, Closure) to provide external
expansion of namespaces. See also section
3.3.1.Handler(+Tag, +Attributes, +Parser).Handler(+Tag, +Parser).Handler(+CDATA, +Parser), where CDATA is an atom
representing the data.Handler(+Text, +Parser),
where
Text is the text of the processing instruction.<!...>) has been read. The named
handler is called with two arguments: Handler(+Text,
+Parser), where Text is the text of the declaration
with comments removed.
This option is expecially useful for highlighting declarations and comments in editor support, where the location of the declaration is extracted using get_sgml_parser/2.
Handler(+Severity, +Message, +Parser),
where
Severity is one of warning or error
and
Message is an atom representing the diagnostic message. The
location of the error can be determined using get_sgml_parser/2
If this option is present, errors and warnings are not reported using print_message/3
xmlns mode, a new namespace declaraction
is pushed on the environment. The named handler is called with three
arguments: Handler(+NameSpace, +URL, +Parser).
See section 3.3.1 for details.xmlns mode, this predicate can be used
to map a url into either a canonical URL for this namespace or another
internal identifier. See section 3.3.1
for details.