DeleteSelectionPrefix (XmlDoc subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
Line 18: Line 18:


===Examples===
===Examples===
<ol><li>In the following example fragment, a prefix is temporarily used in an XPath expression, then deleted:
<ol><li>In the following example fragment, a prefix is temporarily used in an <var>[[XPath#XPath_syntax|Xpath expression]]</var>, then deleted:
<p class="code">...
<p class="code">...
%doc:[[SelectionNamespace_(XmlDoc_property)|SelectionNamespace]]('tempP') = 'urn:localxxx'
%doc:[[SelectionNamespace_(XmlDoc_property)|SelectionNamespace]]('tempP') = 'urn:localxxx'

Revision as of 09:14, 22 May 2011

Delete prefix's XPath-selection association (XmlDoc class)

DeleteSelectionPrefix removes any XPath selection association for the node name prefix identified by its string argument.

Syntax

doc:DeleteSelectionPrefix( prefix)

Syntax terms

doc An XmlDoc object expression.
prefix A string prefix (the part of the name before the colon) for a node. This is a Unicode string argument; prior to Sirius Mods Version 7.6, this is an EBCDIC string.

Usage notes

  • DeleteSelectionPrefix has no cancellation conditions other than the usual requirement that the method object cannot be Null.
  • DeleteSelectionPrefix is available in Sirius Mods Version 7.0 and later.

Examples

  1. In the following example fragment, a prefix is temporarily used in an Xpath expression, then deleted:

    ... %doc:SelectionNamespace('tempP') = 'urn:localxxx' %node = %inpNode:SelectSingleNode('tempP:infoChild') %doc:DeleteSelectionPrefix('tempP') ...

See also

  • IsSelectionPrefix method is useful in conjunction with DeleteSelectionPrefix.
  • SelectionNamespace specifies the namespace URI associated with a prefix, when the prefix is used in an XPath expression.