|
Home > Online Product Documentation > Table of Contents > Specifying Attributes in Queries Specifying Attributes in QueriesTo specify an attribute name in a query, precede the attribute name with an at sign (@). The XPath processor treats elements and attributes in the same way wherever possible. For example:
This query returns the
Following is another query that includes an attribute:
This query returns the three
The following query returns the
If the context node does not have a
The next query returns the
Following is an example that is not valid because attributes cannot have subelements:
Following is a query that finds the
RestrictionsAttributes cannot contain subelements. Consequently, you cannot apply a path operator to an attribute. If you try to, you receive a syntax error. Attributes are inherently unordered. Consequently, you cannot apply a position number to an attribute. If you try to, you receive a syntax error. Attributes and WildcardsYou can use an at sign (@) and asterisk (*) together to retrieve a collection of attributes. For example, the following query finds all attributes in the current context:
|
Convert HTML to XML
Convert HTML-to-XML with a Document Wizard that quickly converts any HTML to standard XML with the click of a button! To get started, just click File, Document Wizards on the Stylus Studio menu.
XQuery Functions - User Defined Functions in XQuery
Dr. Michael Kay's tutorial entitled: 'Defining your own Functions in XQuery' explains how to write powerful User Defined Functions in XQuery.
XSD Editor
XSD Editor provides a synchronized split-pane interface that simultaneously shows both a visual XSD Diagram and the underlying code, with changes in one pane immediately reflected in the other
Investments and Financial Companies That Use Stylus Studio
Stylus Studio provides XML tools & components to leading investment and financial companies! See which top investment and financial companies are banking on Stylus Studio 2006 to simplify their dollars and cents.