563 lines
25 KiB
HTML
563 lines
25 KiB
HTML
<html>
|
|
<head>
|
|
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domDoc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: domDoc.html,v $ $Revision: 1.19 $">
|
|
</head><body>
|
|
<div class="header">
|
|
<div class="navbar" align="center">
|
|
<a href="#SECTid0x80b6834">NAME</a> · <a href="#SECTid0x80b68b8">SYNOPSIS</a> · <a href="#SECTid0x80b6994">DESCRIPTION </a> · <a href="#SECTid0x80d5f40">SEE ALSO</a> · <a href="#SECTid0x80d5fc4">KEYWORDS</a>
|
|
</div><hr class="navsep">
|
|
</div><div class="body">
|
|
<h2><a name="SECTid0x80b6834">NAME</a></h2><p class="namesection">
|
|
<b class="names">domDoc - </b><br>Manipulates an instance of a DOM document object</p>
|
|
|
|
<h2><a name="SECTid0x80b68b8">SYNOPSIS</a></h2><pre class="syntax">
|
|
<b class="cmd">domDocObjCmd</b> <i class="m">method</i> ?<i class="m">arg arg ...</i>?</pre>
|
|
|
|
<h2><a name="SECTid0x80b6994">DESCRIPTION </a></h2><p>This command manipulates one particular instance of a document
|
|
object. <i class="m">method</i> indicates a specific method of the document class. These
|
|
methods should closely conform to the W3C recommendation "Document Object Model
|
|
(Core) Level 1" (<a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html">http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html</a>). Look
|
|
at these documents for a deeper understanding of the functionality.</p><p>The valid methods are:</p><dl class="commandlist">
|
|
|
|
<dt>
|
|
<b class="method">documentElement</b> ?<i class="m">objVar</i>?</dt>
|
|
<dd>Returns the top most element in the document (the root
|
|
element).</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">getElementsByTagName</b> <i class="m">name</i>
|
|
</dt>
|
|
<dd>Returns a list of all elements in the document matching
|
|
(glob style) <i class="m">name</i>.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">getElementsByTagNameNS</b> <i class="m">uri</i> <i class="m">localname</i>
|
|
</dt>
|
|
<dd> Returns a list of all elements in the subtree
|
|
matching (glob style) <i class="m">localname</i> and having the given namespace
|
|
<i class="m">uri</i>.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">createElement</b> <i class="m">tagName</i> ?<i class="m">objVar</i>?</dt>
|
|
<dd>Creates (allocates) a new element node with node name
|
|
<i class="m">tagName</i>, append it to the hidden fragment list in the document
|
|
object and returns the node object. If <i class="m">objVar</i> is given the new
|
|
node object store in this variable.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">createElementNS</b> <i class="m">url</i> <i class="m">tagName</i> ?<i class="m">objVar</i>?</dt>
|
|
<dd>Creates (allocates) a new element node within a namespace
|
|
having <i class="m">uri</i> as the URI and node name <i class="m">tagName</i>, which
|
|
could include the namespace prefix, append it to the hidden fragment list in
|
|
the document object and returns the node object. If <i class="m">objVar</i> is
|
|
given the new node object store in this variable.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">createTextNode</b> <i class="m">text</i> ?<i class="m">objVar</i>?</dt>
|
|
<dd>Creates (allocates) a new text node with node value
|
|
<i class="m">text</i>, appends it to the hidden fragment list in the document
|
|
object and returns the node object. If <i class="m">objVar</i> is given, the new
|
|
node object is stored in this variable.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">createComment</b> <i class="m">text</i> ?<i class="m">objVar</i>?</dt>
|
|
<dd>Creates (allocates) a new comment node with value
|
|
<i class="m">text</i>, appends it to the hidden fragment list in the document
|
|
object and returns the node object. If <i class="m">objVar</i> is given, the new
|
|
comment node object is stored in this variable.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">createCDATASection</b> <i class="m">data</i> ?<i class="m">objVar</i>?</dt>
|
|
<dd>Creates (allocates) a new CDATA node with node value
|
|
<i class="m">data</i>, appends it to the hidden fragment list in the document
|
|
object and returns the node object. If <i class="m">objVar</i> is given, the new
|
|
node object is stored in this variable.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">createProcessingInstruction</b> <i class="m">target</i> <i class="m">data</i> ?<i class="m">objVar</i>?</dt>
|
|
<dd>Creates a process instruction, appends it to the hidden
|
|
fragment list in the document object and returns the node object. If
|
|
<i class="m">objVar</i> is given, the new node object is stored in this variable.</dd>
|
|
|
|
|
|
|
|
<dt><b class="method">delete</b></dt>
|
|
<dd>Explicitly deletes the document, including the associated
|
|
Tcl object commands (for nodes, fragment/new nodes, the document object itself)
|
|
and the underlying DOM tree.</dd>
|
|
|
|
|
|
|
|
<dt><b class="method">getDefaultOutputMethod</b></dt>
|
|
<dd>Returns the default output method of the document. This is
|
|
usually a result of a XSLT transformation.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">asXML</b> <b class="option">?-indent none/1..8?</b> <b class="option">?-channel channelId?</b> <b class="option">?-escapeNonASCII?</b> <b class="option">?-doctypeDeclaration <boolean>?</b> <b class="option">?-escapeAllQuot?</b>
|
|
</dt>
|
|
<dd>Returns the DOM tree as an (optional indented) XML
|
|
string or sends the output directly to the given channelId. If the
|
|
option <i class="m">-escapeNonASCII</i> is given, every non 7 bit ASCII
|
|
character in attribute values or element PCDATA content will be
|
|
escaped as character reference in decimal representation. The flag
|
|
<i class="m">-doctypeDeclaration</i> determines, whether there will be a DOCTYPE
|
|
declaration emitted before the first node of the document. The default
|
|
is, to do not. The DOCTYPE name will always be the element name of the
|
|
document element. An external entity declaration of the external
|
|
subset is only emitted, if the document has a system identifier. If
|
|
the option <i class="m">-escapeAllQuot</i> is given, quotation marks will be
|
|
escaped with &quot; even in text content of elements.</dd>
|
|
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">asHTML</b> <b class="option">?-channel
|
|
channelId?</b> <b class="option">?-escapeNonASCII?</b> <b class="option">?-htmlEntities?</b> <b class="option">?-doctypeDeclaration <boolean>?</b>
|
|
</dt>
|
|
<dd>Returns the DOM tree serialized acording to HTML rules (HTML
|
|
elements are recognized regardless of case, without end tags for emtpy HTML
|
|
elements etc.), as string or sends the output directly to the given
|
|
channelId. If the option <i class="m">-escapeNonASCII</i> is given, every non 7 bit ASCII
|
|
character in attribute values or element PCDATA content will be escaped as
|
|
character reference in decimal representation. If the option
|
|
<i class="m">-htmlEntities</i> is given, a character is outputed using a HTML 4.01
|
|
character entity reference, if one is defined for it. The flag
|
|
<i class="m">-doctypeDeclaration</i> determines, whether there will be a DOCTYPE
|
|
declaration emitted before the first node of the document. The default is, to
|
|
do not. The DOCTYPE name will always be the element name of the document
|
|
element without case normalization. An external entity declaration of the
|
|
external subset is only emitted, if the document has a system identifier. The
|
|
doctype declaration will be written from the avaliable informations, without
|
|
check, if this is a known (w3c) HTML version information or if the document
|
|
confirms to the given HTML version.</dd>
|
|
|
|
|
|
|
|
<dt><b class="method">asText</b></dt>
|
|
<dd>The asText method outputs the result tree by outputting
|
|
the string-value of every text node in the result tree in document
|
|
order without any escaping. In effect, this is what the xslt output method
|
|
"text" (XSLT 1.0 recommendation, section 16.3) does.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">publicId</b> <i class="m">?publicId?</i>
|
|
</dt>
|
|
<dd>Returns the public identifier of the doctype declaration of the
|
|
document, if there is one, otherwise the empty string. If there is a value
|
|
given to the method, the public identifier of the document is set to this
|
|
value.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">systemId</b> <i class="m">?systemId?</i>
|
|
</dt>
|
|
<dd>Returns the system identifier of the doctype declaration of the
|
|
document, if there is one, otherwise the empty string. If there is a value
|
|
given to the method, the system identifier of the document is set to this
|
|
value.</dd>
|
|
|
|
|
|
|
|
<dt><b class="method">internalSubset <i class="m">?internalSubset?</i>
|
|
</b></dt>
|
|
<dd>Returns the internal subset of the doctype declaration of the
|
|
document, if there is one, otherwise the empty string. If there is a value
|
|
given to the method, the internal subset of the document is set to this
|
|
value. Note, that none of the parsing methods preserve the internal subset
|
|
of a document; a freshly parsed document will always have an empty internal
|
|
subset. Also note, that the method doesen't do any syntactical check on a
|
|
given internal subset.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">cdataSectionElements</b> <i class="m">(?URI:?localname|*) ?<boolean>?</i>
|
|
</dt>
|
|
<dd>This method allows to control, for which element nodes
|
|
the text node childs will be serialized as CDATA sections (this affects only
|
|
serialization with the asXML method, no text node is altered in any
|
|
way by this method). IF the method is called with an element name as
|
|
first argument and a boolean with value true as second argument, every
|
|
text node child of every element node in the document with the same
|
|
name as the first argument will be serialized as CDATA section. If the
|
|
second argument is a boolean with value false, all text nodes of all
|
|
elements with the same name as the first argument will be serialized
|
|
as usual. Namespaced element names have to given in the form
|
|
namespace_URI:localname, not in the otherwise usual prefix:localname
|
|
form. With two arguments called, the method returns the used boolean
|
|
value. If the method is called with only an element name, it will
|
|
return a boolean value, indicating, if the text nodes childs of all
|
|
elements with that name in the document will be serialized as CDATA
|
|
section elements (return value 1) or not (return value 0). If the
|
|
method is called with only one argument and that argument is an
|
|
asterisk ('*'), then the method returns an unordered list of all
|
|
element names of the document, for which the text node childs will be
|
|
serialized as CDATA section nodes.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">selectNodesNamespaces</b> <b class="option">?prefixUriList?</b>
|
|
</dt>
|
|
<dd>This method allows to control a document global prefix
|
|
to namespace URI mapping, which will be used for selectNodes method
|
|
calls (on document as well as on all nodes, which belongs to the
|
|
document), if it is not overwritten by using the -namespaces option of
|
|
the selectNodes method. Any namespace prefix within an xpath
|
|
expression will be first resolved against this list. If the list bind
|
|
the same prefix to different namespaces, then the first binding will
|
|
win. If a prefix could not resolved against the document global prefix
|
|
/ namespaces list, then the namespace definitions in scope of the
|
|
context node will be used to resolve the prefix, as usual. If the
|
|
optional argument <i class="m">prefixUriList</i> is given, then the global prefix /
|
|
namespace list is set to this list and returns it. Without
|
|
the optional argument the method returns the current list. The
|
|
default is the empty list.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">xslt</b> <b class="option">?-parameters
|
|
parameterList?</b> <b class="option">?-ignoreUndeclaredParameters?</b>
|
|
<b class="option">?-xsltmessagecmd script?</b> <i class="m">stylesheet</i> <i class="m">?outputVar?</i>
|
|
</dt>
|
|
<dd>Applies an XSLT transformation on the whole document of the node
|
|
object using the XSLT <i class="m">stylesheet</i> (given as domDoc). Returns a document
|
|
object containing the result document of the transformation and stores that
|
|
document object in the optional <i class="m">outputVar</i>, if that was given.
|
|
|
|
<p>The optional <i class="m">-parameters</i> option sets top level
|
|
<xsl:param> to string values. The <i class="m">parameterList</i> has to be a tcl
|
|
list consisting of parameter name and value pairs.</p>
|
|
|
|
<p>If the option <i class="m">-ignoreUndeclaredParameters</i> is given, then parameter
|
|
names in the <i class="m">parameterList</i> given to the <i class="m">-parameters</i> options that
|
|
are not declared as top-level parameters in the stylesheet are silently
|
|
ignored. Without this option, an error is raised, if the user tries to set a
|
|
top-level parameter, which is not declared in the stylesheet.</p>
|
|
|
|
<p>The <i class="m">-xsltmessagecmd</i> option sets a callback for xslt:message elements
|
|
in the stylesheet. The actual command consists of the script, given as argument
|
|
to the option, appended with the XML Fragment from instantiating the
|
|
xsl:message element content as string (as if the XPath string() function would
|
|
have been applied to the XML Fragment) and a flag, which indicates, if the
|
|
xsl:message has an attribute "terminate" with the value "yes".</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">toXSLTcmd</b> ?<i class="m">objVar</i>?</dt>
|
|
|
|
<dd>If the DOM tree represents a valid XSLT stylesheet, this method
|
|
transforms the DOM tree into an xslt command, otherwise it returns error. The
|
|
created xsltCmd is returnd and stored in the <i class="m">objVar</i>, if a var name was
|
|
given. A successful transformation of the DOM tree to an xsltCmd removes the
|
|
domDoc cmd and all nodeCmds of the document.
|
|
|
|
<p>The syntax of the created xsltCmd is:</p>
|
|
|
|
<pre class="syntax">
|
|
<b class="cmd">xsltCmd</b> <b class="option">method</b> <b class="option">?arg ...?</b>
|
|
</pre>
|
|
|
|
<p>The valid methods are:</p>
|
|
|
|
<dl class="commandlist">
|
|
|
|
<dt>
|
|
<b class="method">transform</b> <b class="option">?-parameters
|
|
parameterList?</b> <b class="option">?-ignoreUndeclaredParameters?</b>
|
|
<b class="option">?-xsltmessagecmd script?</b> <i class="m">domDoc</i> <i class="m">?outputVar?</i>
|
|
</dt>
|
|
|
|
<dd>Applies XSLT transformation on the document
|
|
<i class="m">domDoc</i>. Returns a document object containing the
|
|
result document of that transformation and stores it in the optional
|
|
<i class="m">outputVar</i>.
|
|
|
|
<p>The optional <i class="m">-parameters</i> option sets top level
|
|
<xsl:param> to string values. The <i class="m">parameterList</i> has to be a tcl
|
|
list consisting of parameter name and value pairs.</p>
|
|
|
|
<p>If the option <i class="m">-ignoreUndeclaredParameters</i> is given, then parameter
|
|
names in the <i class="m">parameterList</i> given to the <i class="m">-parameters</i> options that
|
|
are not declared as top-level parameters in the stylesheet are silently
|
|
ignored. Without this option, an error is raised, if the user tries to set a
|
|
top-level parameter, which is not declared in the stylesheet.</p>
|
|
|
|
<p>The <i class="m">-xsltmessagecmd</i> option sets a callback for xslt:message elements
|
|
in the stylesheet. The actual command consists of the script, given as argument
|
|
to the option, appended with the XML Fragment from instantiating the
|
|
xsl:message element content as string (as if the XPath string() function would
|
|
have been applied to the XML Fragment) and a flag, which indicates, if the
|
|
xsl:message has an attribute "terminate" with the value "yes".</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt><b class="method">delete</b></dt>
|
|
<dd>Deletes the xsltCmd and cleans up all used recourses</dd>
|
|
|
|
</dl>
|
|
|
|
<p>If the first argument to an xsltCmd is a domDoc or starts with a "-",
|
|
then the command is processed in the same way as
|
|
<i class="m"><xsltCmd> transform</i>.</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">normalize</b> <i class="m">?-forXPath?</i>
|
|
</dt>
|
|
<dd>Puts all Text nodes in the document
|
|
into a "normal" form where only structure (e.g., elements,
|
|
comments, processing instructions and CDATA
|
|
sections) separates Text nodes, i.e., there
|
|
are neither adjacent Text nodes nor empty Text nodes. If the option
|
|
<i class="m">-forXPath</i> is given, all CDATA sections in the nodes are
|
|
converted to text nodes, as a first step before the
|
|
normalization. </dd>
|
|
|
|
|
|
|
|
<dt><b class="method">nodeType</b></dt>
|
|
<dd>Returns the node type of the document node. This is always
|
|
DOCUMENT_NODE.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">getElementById</b> <i class="m">id</i>
|
|
</dt>
|
|
<dd>Returns the node having a id attribute with value
|
|
<i class="m">id</i> or the emtpy string, if no node has an id attribute with that value.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">firstChild</b> <b class="variable">?objVar?</b>
|
|
</dt>
|
|
<dd>Returns the first top level node of the document.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">lastChild</b> <b class="variable">?objVar?</b>
|
|
</dt>
|
|
<dd>Returns the last top level node of the document.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">appendChild</b> <i class="m">newChild</i>
|
|
</dt>
|
|
<dd>Append <i class="m">newChild</i> to the end of the list of top level nodes
|
|
of the document.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">removeChild</b> <i class="m">child</i>
|
|
</dt>
|
|
<dd>Removes <i class="m">child</i> from the list of top level nodes of the
|
|
document. <i class="m">child</i> will be part of the document fragment list
|
|
after this operation. It is not physically deleted.</dd>
|
|
|
|
|
|
|
|
<dt><b class="method">hasChildNodes</b></dt>
|
|
<dd>Returns 1 if the document has any nodes in the tree. Otherwise 0 is returned.</dd>
|
|
|
|
|
|
|
|
<dt><b class="method">childNodes</b></dt>
|
|
<dd>Returns a list of the top level nodes of the document.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">ownerDocument</b> <b class="variable">?domObjVar?</b>
|
|
</dt>
|
|
<dd>Returns the document itself.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">insertBefore</b> <i class="m">newChild</i> <i class="m">refChild</i>
|
|
</dt>
|
|
<dd>Insert <i class="m">newChild</i> before the <i class="m">refChild</i> into the list of
|
|
top level nodes of the document. If <i class="m">refChild</i> is the empty string, insert
|
|
<i class="m">newChild</i> at the end of the top level nodes.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">replaceChild</b> <i class="m">newChild</i> <i class="m">oldChild</i>
|
|
</dt>
|
|
<dd>Replace <i class="m">newChild</i> with <i class="m">oldChild</i> in list of top level
|
|
nodes of the document. <i class="m">oldChild</i> will be part of the document fragment
|
|
list after this operation.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">appendFromList</b> <i class="m">list</i>
|
|
</dt>
|
|
<dd>Parses <i class="m">list</i> , creates an according DOM subtree and
|
|
appends this subtree at the end of the current list of top level nodes of the document.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">appendXML</b> <i class="m">XMLstring</i>
|
|
</dt>
|
|
<dd>Parses <i class="m">XMLstring</i>, creates an according DOM subtree and
|
|
appends this subtree at the end of the current list of top level nodes of the document.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">selectNodes</b> <b class="option">?-namespaces prefixUriList?</b> <b class="option">?-cache <boolean>?</b> <i class="m">xpathQuery</i> <b class="option">?typeVar?</b>
|
|
</dt>
|
|
<dd>
|
|
<p>Returns the result of applying the XPath query
|
|
<i class="m">xpathQuery</i> to the document. The context node of the query is the root
|
|
node in the sense of the XPath recommendation (not the document element). The
|
|
result can be a string/value, a list of strings, a list of nodes or a list
|
|
of attribute name / value pairs. If <i class="m">typeVar</i> is given
|
|
the result type name is stored into that variable (empty,
|
|
bool, number, string, nodes, attrnodes or mixed).</p>
|
|
|
|
<p>The argument <i class="m">xpathQuery</i> has to be a valid XPath
|
|
expression. However, there is one exception to that rule. Tcl variable
|
|
names can appear in the XPath statement at any position where it is
|
|
legal according to the rules of the XPath syntax to put an XPath
|
|
variable. The value of the variable is substituted for the variable
|
|
name. Ignoring the syntax rules of XPath the Tcl variable name may be
|
|
any legal Tcl var name: local variables, global variables, array
|
|
entries and so on.</p>
|
|
|
|
<p>The option <i class="m">-namespaces</i> expects a tcl list with prefix /
|
|
namespace pairs as argument. If this option is not given, then any
|
|
namespace prefix within the xpath expression will be first resolved
|
|
against the list of prefix / namespace pairs set with the
|
|
selectNodesNamespaces method for the document, the node belongs to. If
|
|
this fails, then the namespace definitions in scope of the context
|
|
node will be used to resolve the prefix. If this option is given, any
|
|
namespace prefix within the xpath expression will be first resolved
|
|
against that given list (and ignoring the document global prefix /
|
|
namespace list). If the list bind the same prefix to different
|
|
namespaces, then the first binding will win. If this fails, then the
|
|
namespace definitions in scope of the context node will be used to
|
|
resolve the prefix, as usual.</p>
|
|
|
|
<p>If the <i class="m">-cache</i> option is used with a true value, then the
|
|
<i class="m">xpathQuery</i> will be looked up in a document specific cache. If the query
|
|
is found, then the stored pre-compiled query will be used. If the
|
|
query isn't found, it will be pre-compiled and stored in the cache,
|
|
for use in further calls. Please notice, that the <i class="m">xpathQuery</i> as given as
|
|
string is used as key for the cache. This means, that equal XPath
|
|
expressions, which differ only in white space are treated as
|
|
different cache entries. Special care is needed, if the XPath
|
|
expression includes namespace prefixes. During pre-compilation, the
|
|
prefixes will be resolved first to the prefix / namespace pairs of
|
|
the <i class="m">-namespaces</i> option, if given, and to the namespaces
|
|
in scope of the context node at pre-compilation time. If the XPath
|
|
is found in the cache, neither the <i class="m">-namespaces</i> option nor
|
|
the namespaces in scope of the context node will be taken in
|
|
account but the already resolved (stored) namespaces will be used
|
|
for the query.</p>
|
|
|
|
<p>Examples:</p>
|
|
<pre class="example">set paragraphNodes [$node selectNodes {chapter[3]//para[@type='warning' or @type='error'} ]
|
|
foreach paragraph $paragraphNodes {
|
|
lappend values [$paragraph selectNodes attribute::type]
|
|
}
|
|
|
|
set doc [dom parse {<doc xmlns="http://www.defaultnamespace.org"><child/></doc>}]
|
|
set root [$doc documentElement]
|
|
set childNodes [$root selectNodes -namespaces {default http://www.defaultnamespace.org} default:child]</pre>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt><b class="method">baseURI <i class="m">?URI?</i>
|
|
</b></dt>
|
|
<dd>Returns the present baseURI of the document. If the optional
|
|
argument URI is given, sets the base URI of the document to the given URI.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">appendFromScript</b> <i class="m">tclScript</i>
|
|
</dt>
|
|
<dd>Appends the nodes created by the <i class="m">tclScript</i> by
|
|
Tcl functions, which have been built using <i class="m">dom createNodeCmd</i>, at the end
|
|
of the current list of top level nodes of the document.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">insertBeforeFromScript</b> <i class="m">tclScript</i> <i class="m">refChild</i>
|
|
</dt>
|
|
<dd>Inserts the nodes created in the <i class="m">tclScript</i> by Tcl
|
|
functions, which have been built using <i class="m">dom
|
|
createNodeCmd</i>, before the <i class="m">refChild</i> into to the list
|
|
of top level nodes of the document. If <i class="m">refChild</i> is the
|
|
empty string, the new nodes will be appended.</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<b class="method">deleteXPathCache</b> <i class="m">?xpathQuery?</i>
|
|
</dt>
|
|
<dd>If called without the optional argument, all cached XPath
|
|
expressions of the document are freed. If called with the optional
|
|
argument <i class="m">xpathQuery</i>, this single XPath query will be removed
|
|
from the cache, if it is there. The method always returns an
|
|
empty string.</dd>
|
|
|
|
|
|
</dl><p>Otherwise, if an unknown method name is given, the command with the
|
|
same name as the given metho within the namespace <tt class="samp">::dom::domDoc</tt> is
|
|
tried to be executed. This allows quick method additions on Tcl level.</p><p>Newly created nodes are appended to a hidden fragment list. If they
|
|
are not moved into the tree they are automaticaly deleted, when the whole
|
|
document gets deleted.</p>
|
|
|
|
<h2><a name="SECTid0x80d5f40">SEE ALSO</a></h2><p class="seealso">dom, domNode</p>
|
|
|
|
<h2><a name="SECTid0x80d5fc4">KEYWORDS</a></h2><p class="keywords">
|
|
<a class="keyword" href="keyword-index.html#KW-DOMnodecreation">DOM node creation</a>, <a class="keyword" href="keyword-index.html#KW-documentelement">document element</a>
|
|
</p>
|
|
|
|
</div><hr class="navsep"><div class="navbar" align="center">
|
|
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
|
|
</div>
|
|
</body>
|
|
</html>
|