|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Client recognition of XML Namespace prefixes
From: "Will Bradley" <willbr@m...> > 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








