Dashboard > OWS Documenation > Glossary > Definition - XML Prefix Tags
Definition - XML Prefix Tags Log In | Sign Up   View a printable version of the current page.

Added by David Blasby , last edited by David Blasby on May 27, 2005  (view change)
Labels: 
(None)

What do the "<prefix:elementName>" tags mean?

By using a namespace prefix in a tag, you uniquely identify the tag and its meaning. For example a "<width>" tag could have several different meanings. The namespace prefix uniquely links the tag to a schema which, in turn, defines exactly what it means and how to use it.

$body

It is recommended to always use tags in the "<prefix:elementName>" format and define the namespace near the start of your document using the xmlns attribute:

<abc xmlns:myns="http://unique.url.com/location"
     schemaLocation="http://unique.url.com/location mySchema.xsd">

This says that the short form of the "http://unique.url.com/location" namespace is the "myns" prefix and its meaning is defined in the "mySchema.xsd" schema file.

NOTE: The schemaLocation attribute allows you to optionally give the location of schemas for several namespaces in the format "namespace1 SchemaURL1 namespace2 SchemaURL2".

NOTE: You may specify a default namespace for your document so that un-prefixed tag (like "<mytag>") will be in the default namespace. Since many of the XML documents will have tags in many different namespaces, using the default namespace is not recommended since it can lead to confusion.

Powered by a free Atlassian Confluence Open Source Project License granted to uDig. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators
User-friendly Desktop Internet GIS