|
Home > Online Product Documentation > Table of Contents > Obtaining Information About a Node or a Node Set Obtaining Information About a Node or a Node SetIn a query, you can perform the following operations to obtain information about a node: Obtaining the Name of a Node
The
The following query returns the name of the third element in
WildcardsAn asterisk ( * ) specifies a wildcard name for element names. If there are comments before the third element in the preceding example, this query does not include them in the count. See Filtering Results of Queries.
Obtaining Namespace InformationYou can call functions to obtain namespace information. This topic discusses In addition to a discussion of the functions you call, this section covers the following: Obtaining the Namespace URI
To obtain the URI for a namespace, call the
The
Call the
returns the string
For any other type of node, the XPath processor always returns an empty string. Obtaining the Local Name
To obtain the local portion of a node name, excluding the prefix, call the
The
Obtaining the Expanded Name
To obtain the expanded name of a node, call the
The
Typically, this is the name in the XML source. This need not be the case if there are namespace declarations in effect on the node that associate multiple prefixes with the same namespace. If the node-set argument is empty or the first node has no expanded name, the XPath processor returns an empty string. If you omit the argument, it defaults to a node set with the context node as its only member.
Except for element and attribute nodes, the string that the
Specifying Wildcards with Namespaces
Element and attribute names that include colons (
Examples of Namespaces in Queries
The following example finds all
The next query finds all
The following query finds all
The following query finds all
The next example returns the
Obtaining the URI for an Unparsed Entity
To obtain the URI for an unparsed entity, call the
This function returns the URI of the unparsed entity with the specified name that is in the same document as the context node. If there is no such entity, this function returns an empty string. Determining the Number of Nodes in a Collection
To obtain the number of nodes in a node set, call the
The
To obtain the number of nodes in the current context, call the
Determining the Context Size
To obtain the number of nodes in the current context, call the
The
|
Using Stylus Studio's Database-to-XML Editor to Query and Update Relational Databases using SQL/XML
Watch and learn how easy it is to define relational-to-XML mappings for getting XML out of relational databases and updating databases from XML using industry-standard SQL/XML extensions and Stylus Studio's DB-to-XML data-source editor.
OASIS Catalogs for Fun and Profit
This tutorial about, Understanding Catalogs, A Use-Case for Catalogs, Registering Catalogs in a Project, Using the DOCTYPE Syntax Sense:X Aid, Navigating Catalogs, Building Composite Catalogs, Converting TR9401 Catalogs to OASIS XML Catalogs and more
XML Programming
Simplify XML Programming with Stylus Studio's XML Pipeline, a powerful tool for modeling, programming, debugging and deploying complete XML programs.
IATA Standards Available Across All Versions
The complete IATA Standards Grid, showing all IATA EDI versions across the top, and the catalog of messages types down the left-hand side.