DeleteSelectionPrefix (XmlDoc subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Template:XmlDoc:DeleteSelectionPrefix subtitle}}
{{Template:XmlDoc:DeleteSelectionPrefix subtitle}}
<var>DeleteSelectionPrefix</var> removes any [[SelectionNamespace (XmlDoc property)#Usage notes|XPath-selection association]] for the node name prefix identified by its string argument.


This subroutine removes any XPath selection association for the
node name prefix identified by its string argument.
DeleteSelectionPrefix is new as of version 7.0 of the ''Sirius Mods''.
==Syntax==
==Syntax==
{{Template:XmlDoc:DeleteSelectionPrefix syntax}}
{{Template:XmlDoc:DeleteSelectionPrefix syntax}}
Line 9: Line 7:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>doc</th>
<tr><th>doc</th>
<td>An XmlDoc object expression. </td></tr>
<td>An <var>XmlDoc</var> object expression. </td></tr>
<tr><th>prefix</th>
<tr><th>prefix</th>
<td>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.</td></tr>
<td>A string prefix (the part of the name before the colon) for a node. This is a <var>Unicode</var> string argument; prior to <var class="product">[[Sirius Mods|Sirius Mods]]</var> Version 7.6, this is an EBCDIC string.</td></tr>
</table>
</table>
==Usage notes==
==Usage notes==
<ul><li><var>DeleteSelectionPrefix</var> has no cancellation conditions other than the usual requirement that the method object cannot be <var>Null</var>.
<li><var>DeleteSelectionPrefix</var> is available in <var class="product">Sirius Mods</var> Version 7.0 and later.
</ul>


This method has no cancellation conditions other than the usual requirement
===Examples===
that the method object not be Null.
In the following example fragment, a prefix is temporarily used in an [[XPath#XPath_syntax|Xpath expression]], then deleted:
===Example===
 
In the following example fragment, a prefix
is temporarily used in an XPath expression, then deleted:
<p class="code">...
<p class="code">...
%doc:SelectionNamespace('tempP') = 'urn:localxxx'
%doc:[[SelectionNamespace_(XmlDoc_property)|SelectionNamespace]]('tempP') = 'urn:localxxx'
%node = %inpNode:SelectSingleNode('tempP:infoChild')
%node = %inpNode:[[SelectSingleNode_(XmlDoc/XmlNode_function)|SelectSingleNode]]('tempP:infoChild')
%doc:DeleteSelectionPrefix('tempP')
%doc:DeleteSelectionPrefix('tempP')
...
...
</p>
</p>
==See also==
==See also==
{{Template:XmlDoc:DeleteSelectionPrefix footer}}
<ul>
<ul>
<li>The [[IsSelectionPrefix (XmlDoc function)|IsSelectionPrefix]] method is useful in
<li><var>[[IsSelectionPrefix (XmlDoc function)|IsSelectionPrefix]]</var> method is useful in conjunction with <var>DeleteSelectionPrefix</var>.
conjunction with DeleteSelectionPrefix.
<li><var>[[SelectionNamespace (XmlDoc property)|SelectionNamespace]]</var> specifies the namespace URI associated with a prefix, when the prefix is used in an XPath expression.
<li>The [[SelectionNamespace (XmlDoc property)|SelectionNamespace]] method
specifies the namespace URI associated with a prefix, when
the prefix is used in an XPath expression.
</ul>
</ul>
{{Template:XmlDoc:DeleteSelectionPrefix footer}}

Latest revision as of 00:49, 25 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

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.