DeleteSelectionPrefix (XmlDoc subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 3: Line 3:
This subroutine removes any XPath selection association for the
This subroutine removes any XPath selection association for the
node name prefix identified by its string argument.
node name prefix identified by its string argument.
DeleteSelectionPrefix is new as of version 7.0 of the ''Sirius Mods''.
<var>DeleteSelectionPrefix</var> is new as of version 7.0 of the ''Sirius Mods''.
==Syntax==
==Syntax==
{{Template:XmlDoc:DeleteSelectionPrefix syntax}}
{{Template:XmlDoc:DeleteSelectionPrefix syntax}}
Line 9: Line 9:
<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 ''Sirius Mods'' version 7.6, this is an EBCDIC string.</td></tr>
</table>
</table>
==Usage notes==
==Usage notes==
Line 24: Line 24:
%doc:SelectionNamespace('tempP') = 'urn:localxxx'
%doc:SelectionNamespace('tempP') = 'urn:localxxx'
%node = %inpNode:SelectSingleNode('tempP:infoChild')
%node = %inpNode:SelectSingleNode('tempP:infoChild')
%doc:DeleteSelectionPrefix('tempP')
%doc:<var>DeleteSelectionPrefix</var>('tempP')
...
...
</p>
</p>
Line 31: Line 31:
<ul>
<ul>
<li>The [[IsSelectionPrefix (XmlDoc function)|IsSelectionPrefix]] method is useful in
<li>The [[IsSelectionPrefix (XmlDoc function)|IsSelectionPrefix]] method is useful in
conjunction with DeleteSelectionPrefix.
conjunction with <var>DeleteSelectionPrefix</var>.
<li>The [[SelectionNamespace (XmlDoc property)|SelectionNamespace]] method
<li>The [[SelectionNamespace (XmlDoc property)|SelectionNamespace]] method
specifies the namespace URI associated with a prefix, when
specifies the namespace URI associated with a prefix, when
the prefix is used in an XPath expression.
the prefix is used in an XPath expression.
</ul>
</ul>

Revision as of 17:46, 25 January 2011

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


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

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

This method has no cancellation conditions other than the usual requirement that the method object not be Null.

Example

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

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