[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Looking for an example of a name colliision
Chiusano Joseph wrote [rearranged here]: > In my opinion, The more semantically correct attribute name for the "title" > attribute of the "author" element would be "prefix", not "title". So (with all due > respect to the author of this example), I personally don't believe that this is the > best example to illustrate the concepts. I'm sorry; I don't understand this at all. How do you mean 'semantically correct'? Do you mean by reference to some universal naming scheme (and the semantics which you then elaborate from instances of that scheme) rather than by reference to the text of the instance markup document, as given? But this is XML, where 1) the scope of names is the document and 2) the document author's choice of names, or of any other markup conformant to the syntactic specification of XML, is the given with which you are obliged to work. The point is that in the markup of the example as given there is no collision of the various appearances of 'title', as Bill de hÓra has already illustrated by parsing those appearances into the clearly distinct /section/title /section/signing/author@title /section/signing/book@title Now, granted that this document instance might be a poor example, I still fail to see how, for instance, what you consider your best illustration--"StateCode"--might be used in a markup document (the only scope within which the alleged collision might be in evidence) in ways which could not be resolved through precisely the same analysis that Bill de hÓra has applied to 'title'. > An additional thought: > > If one did use the attribute "title" as below, in a schema, of course the > declaration of the attribute as used with the "author" element could be a local > declaration (perhaps with enumerated values such as "Mr", etc.) while the "title" > attribute used with book could be a global declaration (or vice-versa, or both could > be local). But, again, the scope of names in XML is by definition the document, so however one might schematize a global versus a local use of a given term, any alleged collision of those names would have to be demonstrated within the scope of a single document where they occurred together. I assume that you mean your schema to be considered *as a schema*, rather than as simply an XML document in its own right (where there would be no collision of isonyms not resolvable by the parsing which Bill de hÓra demonstrates). You further appear to intend that because you have cast that particular XML document as a schema that it might therefore declare universal usage of particular names, though that is an enormous concession that neither I nor any other user of XML markup is obliged to grant you, and is in any case an entirely separate question from whether there is in fact some identifiable name collision within the scope of an XML document, whether demonstrated by the Namespaces Rec example or by some other example which you might furnish. > So one could consider each "title" attribute as being used in a different context > within the same vocabulary - in the context of a person, and in the context of a > book. No. The specific premise at instance here is that putatively colliding names are used within the same context--that of the document, which is by definition the scope of XML names. > Alternatively, the attributes could be named "PersonalTitle" and "BookTitle". Name them what you please, but if you are to respond to Bill de hÓra's query you must them demonstrate that, whatever you have named them, those names collide within the scope of a document. Respectfully, Walter Perry
|
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
|