Namespaces 'n Schemas
I hope someone can help me with an apparent discrepancy between the Namespaces spec and the XML Schema spec and XSV: According to the Namespaces spec, each element in an XML document (qualified or unqualified) has a type name comprised of a local name and an optional namespace name. The value of the namespace name is determinable, independent of any schema information, by finding the applicable 'xmlns' attribute and taking its value. There is a default mechanism, so that both qualified and unqualified names may be equivalently associated with a namespace. I assume that association by qualification and association by inheritance from a qualified ancestor are 'equivalent' - at least the namespaces spec doesn't define any intended distinct semantic. The XML Schema spec places restrictions: in certain cases (depending on 'elementFormDefault', globality of declaration, default namespace declaration in the instance, ...) a qualified name must be used or may not be used. Does the XML Schema contradict the Namespaces resolution logic, or does it only require or prohibit qualification? Would the namespace associations resolved by the Namespaces algorithm ever be different than the association resolved according to the XML Schema spec? I notice that when XSV reports the erroneous lack of qualification of an element, it reports it as being in no namespace, rather than as an unqualified element in its inherited namespace -- is this a reporting shorthand, or an indication that XSD defines a namespace inheritance logic that overrides one defined in the namespaces spec? If a document is parsed with a DOM parser, is the resulting infoset a tree with element nodes and namespaces associated in accordance with the Namespaces spec? If the infoset is then validated with an XML Schema validator, wouldn't the issue of explicit qualification of element names necessarily be indeterminate? Or do I have an incorrect view of the 'canonicalness' of the infoset? Or is the explicitness of association somehow an information or semantic issue and not just a lexical one? Thanks in advance for any enlightenment, Jim -------------------------- Jim Theriot POSC -- Energy eStandards 9801 Westheimer, Suite 450 Houston TX 77042 Jim.Theriot@P... +1.713.267.5109 --------------------------
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