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 298. 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.

Viewing/Changing Namespace Previxes

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.

An Introduction To XML Schema Development

An Introduction to XML schema development in Stylus Studio covers some of the highlights of our XML Schema Editor, powerful tools for editing, validating, converting and generating XML schema. Watch the video online today!

Microsoft .NET XML Tools for System.XML 1.0 and System.XML 2.0

Stylus Studio features integrated XML validation, XSLT transformation and XSLT debugging using the official Microsoft .NET XML processing components: System.XML 1.0 and System.XML 2.0.

XML Schema Validation

Validate XML using XML Schema with MSXML, XERCES, XSV, SYSTEM.XML, & other XSD Validators. Stylus Studio's XML Schema-Aware XML Editing makes XML Schema Validation a snap!

XML Code Folding

Stylus Studio's XML Editor features XML code folding, a powerful and intuitive way to maximize limited screen real-estate and help make sense of large XML files.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member