Working with Namespaces

When the XML document you are querying has references to one or more namespaces, those namespaces are displayed in the namespace pane, as shown here:

Figure 301. Namespaces Pane

In addition to the namespace URI, Stylus Studio displays the namespace prefix defined in the XML document. If one namespace prefix defined in the XML document clashes with another, the second prefix is redefined by adding a number to the end of the original prefix name to make it unique - for example, if two namespaces had the prefix myPrefix, the second would be redefined as myPrefix1. Namespace prefixes are redefined only in the context of the XPath Query Editor; namespace definitions in the XML document are unaffected.

You must use redefined namespace prefixes when writing your query expressions, though you can specify your own redefined name if you like.

Redefined namespaces

  • Allow you to execute the query with the root node of the document as the current context node
  • Simplify the process of entering XPath expressions in the query pane

Changes saved to the XML document are reflected in the namespace pane when you click on the namespace pane or query pane.

To change a redefined namespace prefix:
1. Click the Show Namespaces button ( ) if the namespace pane is not already displayed.

The namespace pane shows any namespaces that have been defined for the current XML document, as well as the namespace prefix defined in the document and the redefined namespace prefix suggested by Stylus Studio.

2. Optionally, change the value in the Redefined Prefix field.

XML Notepad

XML Notepad simplifies building of XML applications, allowing authors to rapidly build and edit their XML files. With XML Notepad, you can create XML document prototypes quickly, easily, using an intuitive graphical interface.

Introduction to the XQuery Mapper

This free online video demonstration covers Stylus Studio's synchronized XQuery editing and mapping tool which allows you to create any XQuery expression, either manually using Stylus Studio's XQuery editor.

XML Project

Stylus Studio's Project Window is an intuitive, visual feature for organizing files belonging to a project. It supports different file-type icons and nested folders; many helpful options are available from the context menu.

Insurance Companies That Use Stylus Studio

Everyone needs insurance, even insurance companies. That's why these top insurance companies are insured when it comes to XML. Come see which insurance providers are insured by the power of Stylus Studio!

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member