- -attlistdeclcommand
-
-attlistdeclcommand script
Specifies the prefix of a Tcl command to be evaluated whenever
an attribute list declaration is encountered in the DTD subset of
an XML document. The command evaluated is:
script name
attrname type
default value
where:
| name |
Element type name |
| attrname |
Attribute name being declared |
| type |
Attribute type |
| default |
Attribute default, such as #IMPLIED |
| value |
Default attribute value. Empty string if none
given. |
- -baseurl
-
-baseurl URI
Specifies the base URI for resolving relative URIs that may be
used in the XML document to refer to external entities.
- -characterdatacommand
-
-characterdatacommand script
Specifies the prefix of a Tcl command to be evaluated whenever
character data is encountered in the XML document being parsed. The
command evaluated is:
where:
| data |
Character data in the document |
- -commentcommand
-
-commentcommand script
Specifies the prefix of a Tcl command to be evaluated whenever a
comment is encountered in the XML document being parsed. The
command evaluated is:
where:
- -defaultcommand
-
-defaultcommand script
Specifies the prefix of a Tcl command to be evaluated when no
other callback has been defined for a document feature which has
been encountered. The command evaluated is:
where:
- -defaultexpandinternalentities
-
-defaultexpandinternalentities
boolean
Specifies whether entities declared in the internal DTD subset
are expanded with their replacement text. If entities are not
expanded then the entity references will be reported with no
expansion.
- -doctypecommand
-
-doctypecommand script
Specifies the prefix of a Tcl command to be evaluated when the
document type declaration is encountered. The command evaluated
is:
script name
public system
dtd
where:
| name |
The name of the document element |
| public |
Public identifier for the external DTD subset |
| system |
System identifier for the external DTD subset.
Usually a URI. |
| dtd |
The internal DTD subset |
See also -startdoctypedeclcommand and
-enddoctypedeclcommand.
- -elementdeclcommand
-
-elementdeclcommand script
Specifies the prefix of a Tcl command to be evaluated when an
element markup declaration is encountered. The command evaluated
is:
where:
| name |
The element type name |
| model |
Content model specification |
- -elementendcommand
-
-elementendcommand script
Specifies the prefix of a Tcl command to be evaluated when an
element end tag is encountered. The command evaluated is:
where:
| name |
The element type name that has ended |
| args |
Additional information about this element |
Additional information about the element takes the form of
configuration options. Possible options are:
| -empty
boolean |
The empty element syntax was used for this
element |
| -namespace
uri |
The element is in the XML namespace associated
with the given URI |
- -elementstartcommand
-
-elementstartcommand script
Specifies the prefix of a Tcl command to be evaluated when an
element start tag is encountered. The command evaluated is:
where:
| name |
The element type name that has started |
| attlist |
A Tcl list containing the attributes for this
element. The list of attributes is formatted as pairs of attribute
names and their values. |
| args |
Additional information about this element |
Additional information about the element takes the form of
configuration options. Possible options are:
| -empty
boolean |
The empty element syntax was used for this
element |
| -namespace
uri |
The element is in the XML namespace associated
with the given URI |
| -namespacedecls
list |
The start tag included one or more XML Namespace
declarations. list is a Tcl list giving
the namespaces declared. The list is formatted as pairs of values,
the first value is the namespace URI and the second value is the
prefix used for the namespace in this document. A default XML
namespace declaration will have an empty string for the
prefix. |
- -endcdatasectioncommand
-
-endcdatasectioncommand
script
Specifies the prefix of a Tcl command to be evaluated when end
of a CDATA section is encountered. The command is evaluated with no
further arguments.
- -enddoctypedeclcommand
-
-enddoctypedeclcommand
script
Specifies the prefix of a Tcl command to be evaluated when end
of the document type declaration is encountered. The command is
evaluated with no further arguments.
- -entitydeclcommand
-
-entitydeclcommand script
Specifies the prefix of a Tcl command to be evaluated when an
entity declaration is encountered. The command evaluated is:
where:
| name |
The name of the entity being declared |
| args |
Additional information about the entity
declaration. An internal entity shall have a single argument, the
replacement text. An external parsed entity shall have two
additional arguments, the public and system indentifiers of the
external resource. An external unparsed entity shall have three
additional arguments, the public and system identifiers followed by
the notation name. |
- -entityreferencecommand
-
-entityreferencecommand
script
Specifies the prefix of a Tcl command to be evaluated when an
entity reference is encountered. The command evaluated is:
where:
| name |
The name of the entity being referenced |
- -errrocommand
-
-errorcommand script
Specifies the prefix of a Tcl command to be evaluated when a
fatal error is detected. The error may be due to the XML document
not being well-formed. In the case of a validating parser class,
the error may also be due to the XML document not obeying validity
constraints. By default, a callback script is provided which causes
an error return code, but an application may supply a script which
attempts to continue parsing. The command evaluated is:
script errorcode
errormsg
where:
| errorcode |
A single word description of the error, intended
for use by an application |
| errormsg |
A human-readable description of the error |
- -externalentitycommand
-
-externalentitycommand
script
Specifies the prefix of a Tcl command to be evaluated to resolve
an external entity reference. If the parser has been configured to
validate the XML document, a default script is supplied that
resolves the URI given as the system identifier of the external
entity and recursively parses the entity's data. If the parser has
been configured as a non-validating parser, then by default
external entities are not resolved. This option can be used to
override the default behaviour. The command evaluated is:
script name
baseuri uri
id
where:
| name |
The Tcl command name of the current parser |
| baseuri |
An absolute URI for the current entity which is to
be used to resolve relative URIs |
| uri |
The system identifier of the external entity,
usually a URI |
| id |
The public identifier of the external entity. If
no public identifier was given in the entity declaration then
id will be an empty string. |
- -final
-
-final boolean
Specifies whether the XML document being parsed is complete. If
the document is to be incrementally parsed then this option will be
set to false, and when the last fragment of document is parsed it
is set to true. For example,
- -ignorewhitespace
-
-ignorewhitespace boolean
If this option is set to true then spans of character data in
the XML document which are composed only of white-space (CR, LF,
space, tab) will not be reported to the application. In other
words, the data passed to every invocation of the
-characterdatacommand script will contain at least one
non-white-space character.
- -notationdeclcommand
-
-notationdeclcommand script
Specifies the prefix of a Tcl command to be evaluated when a
notation declaration is encountered. The command evaluated is:
where:
| name |
The name of the notation |
| uri |
An external identifier for the notation, usually a
URI. |
- -notstandalonecommand
-
-notstandalonecommand script
Specifies the prefix of a Tcl command to be evaluated when the
parser determines that the XML document being parsed is not a
standalone document.
- -paramentityparsing
-
-paramentityparsing boolean
Controls whether external parameter entities are parsed.
- -parameterentitydeclcommand
-
-parameterentitydeclcommand
script
Specifies the prefix of a Tcl command to be evaluated when a
parameter entity declaration is encountered. The command evaluated
is:
where:
| name |
The name of the parameter entity |
| args |
For an internal parameter entity there is only one
additional argument, the replacement text. For external parameter
entities there are two additional arguments, the system and public
identifiers respectively. |
- -parser
-
-parser name
The name of the parser class to instantiate for this parser
object. This option may only be specified when the parser instance
is created.
- -processinginstructioncommand
-
-processinginstructioncommand
script
Specifies the prefix of a Tcl command to be evaluated when a
processing instruction is encountered. The command evaluated
is:
where:
| target |
The name of the processing instruction target |
| data |
Remaining data from the processing
instruction |
- -reportempty
-
-reportempty boolean
If this option is enabled then when an element is encountered
that uses the special empty element syntax, additional arguments
are appended to the -elementstartcommand and
-elementendcommand callbacks. The arguments [-empty 1] are
appended. For example:
- -startcdatasectioncommand
-
-startcdatasectioncommand
script
Specifies the prefix of a Tcl command to be evaluated when the
start of a CDATA section section is encountered. No arguments are
appended to the script.
- -startdoctypedeclcommand
-
-startdoctypedeclcommand
script
Specifies the prefix of a Tcl command to be evaluated at the
start of a document type declaration. No arguments are appended to
the script.
- -unknownencodingcommand
-
-unknownencodingcommand
script
Specifies the prefix of a Tcl command to be evaluated when a
character is encountered with an unknown encoding. This option has
not been implemented.
- -unparsedentitydeclcommand
-
-unparsedentitydeclcommand
script
Specifies the prefix of a Tcl command to be evaluated when a
declaration is encountered for an unparsed entity. The command
evaluated is:
script system
public notation
where:
| system |
The system identifier of the external entity,
usually a URI |
| public |
The public identifier of the external entity |
| notation |
The name of the notation for the external
entity |
- -validate
-
-validate boolean
Enables validation of the XML document to be parsed. Any changes
to this option are ignored after an XML document has started to be
parsed, but the option may be changed after a reset.
- -warningcommand
-
-warningcommand script
Specifies the prefix of a Tcl command to be evaluated when a
warning condition is detected. A warning condition is where the XML
document has not been authored correctly, but is still well-formed
and may be valid. For example, the special empty element syntax may
be used for an element which has not been declared to have empty
content. By default, a callback script is provided which silently
ignores the warning. The command evaluated is:
script warningcode
warningmsg
where:
| warningcode |
A single word description of the warning, intended
for use by an application |
| wanringmsg |
A human-readable description of the warning |
- -xmldeclcommand
-
-xmldeclcommand script
Specifies the prefix of a Tcl command to be evaluated when the
XML declaration is encountered. The command evaluated is:
script version
encoding standalone
where:
| version |
The version number of the XML specification to
which this document purports to conform |
| encoding |
The character encoding of the document |
| standalone |
A boolean declaring whether the document is
standalone |