OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Client recognition of XML Namespace prefixes

[ Lists Home | Date Index | Thread Index ]
  • From: ricko <ricko@geotempo.com>
  • To: Will Bradley <willbr@microsoft.com>, xml-dev@lists.xml.org
  • Date: Wed, 06 Dec 2000 16:23:45 +0800

From: "Will Bradley" <willbr@microsoft.com>

> When a client application recieves this xml block, and wants to interpret
> it, can it, and should it, make assumptions about the namespace prefix?

When dealing with XML, it is useful to keep in mind that there are 2 (and
soon 3) distinct classes of XML applications. In order of increasing power
and complexity:
 * XML applications
 * namespace-aware XML applications
 * type-aware XML applications

Each can provide a different view of the same tagged document.  The XML
application will just give dog:name as the literal name of an element.  The
namespace-aware application (layered on top of XML) will let you treat the
prefix as plumbing which references a URI: so you can access that element as
canine:name if "canine" and "dog" both are declared as the prefixes for the
same namespace. The type-aware application uses additional information
augmented during validation (in particular, by XSDL the XML Schema
Definition Language) and will (when DOM and other APIs catch up, presumably
by 1Q2002) allow addressing by type information (e.g. match all attributes
which have a type of "Year") .

So the answer is
 * an XML application *must* make assumptions about the namespace prefix;
 * a namespace-aware application does not need to: it can probably use
completely different prefixe
 * a type-aware application probably sits on top of a namespace-aware
infrastructure, so ditto.

Cheers
Rick Jelliffe





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS