|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] re: namespaces and XML validation
pi-declared v/s attribute-declared namespaces do not make any difference to validation. the present wd leaves some ambiguities which affect namespace identification, but that leads to problems with all sorts of things, not just validation. the algorithm sketched out in mr bray's note is the 'string-processing' equivalent of the 'symbol-processing' approach which i have been advocating since the appearance of the previous draft. the 're-prefixed' names are the equivalent of the pointer to an interned symbol. this is sufficient to validate against dtd's from arbitrary namespaces. the advantage of a symbol based approach is that it accomplishes the 'rewrite' in one pass as in integral part of the parse. if the unambiguous serial form is required for whatever reason, it can be created by simply reserializing the document. at its most basic, the symbol-based approach would require that the name type suggested by mr megginson be modified to comprise a package and a local name rather than an uri and a local name; to place the uri in the package; and to use the package as the map between the local name and the universal name. which name is then bound into all elements, attributes, element declarations, etc., where one would now use a string. an advantage of interning by means of a package, rather than a global set of universal names is that it is easier to place a symbol in more than one package. this is often useful. according to the wd. prefixes need be bound dynamically to packages only in the process of parsing elements (modulo the issues of lexical scope for prefix bindings for dom side-effects) in order to satisfy the assumption re "knowing where each name in the dtd comes from", one also needs to bind dynamically (at least) at entity boundaries (the document proper, the external subset, external entities). note that, if this is not supported, then validation is not the only thing which suffers. validation suffers as a side effect of not being able to guarantee the identity of a name, which means, strictly speaking that no form of declaration-based processing is possible. i've dismissed elevating prefixes to universal status, since it's easy to come up with cases where that method fails. why did the wg dismiss using additional pseudo attributes on the xml declaration and on entity declarations to bind prefixes within those entities? in the present spec, where no namespace bindings extend over the dtd, there's no reason to read it, since it can't be guaranteed to have an unambiguous interpretation. ... xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
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








