[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Fw: Namespaces
James, hope you don't mind me copying this to the group. I'd like to know what the other James thinks. James Anderson wrote: > James Clark's notation is readily extended to describe the same > things as you > desire. See my note in this thread. I suggest that it is to > be preferred to > the A.3 notation as it is compacter - it can, in a sense, be > expressed 'in > line'. > For reasons which I do not fathom, (see his reply to same) he > explicitly resists the extension and disregards the concepts > established in > appendix a. I don't follow you James. Where does he disregard appendix A? On the extension, I think he is right to resist it - although to be fair it is only a shorthand, not a new standard! If you think about what he is representing with his current stuff, he has devised a simple way of giving us clues as to how some post-parser software might be able to use the data. Given: <n1:good a="1" /> and mapping it via James's syntax to: <{http://www.w3c.org}good a="1" /> the post-parser can say that 'good' is part of the http://www.w3c.org namespace. Equally, given: <good n1:a="1" /> and mapping it to: <good {http://www.w3c.org}a="1" /> James has given us a further insight into the mind of the post-parser; it now knows that 'a' is part of the http://www.w3c.org namespace too. In other words, James's syntax is so far an accurate representation of what the post-parser knows. However, if we now 'extend' his syntax to map: <n1:good a="1" /> to: <{http://www.w3c.org}good {{http://www.w3c.org}good}a="1" /> as you seem to want (or at least Oren did, and I guess you are agreeing with him although I can't find your original message), we've now expressed something that is no longer consistent with what the post-parser knows. We are either saying that 'a' is a member of the namespace {http://www.w3c.org}good (if we treat the outer curly braces as representing a namespace name) but that is not a valid uri. Or we are saying that 'a' is a member of the namespace 'good' which is a member of the namespace http://www/w3c.org, which is (sort of) closer to what is going on in the intern representation of the XML namespace (according to appendix A) but is meaningless at this level, because James is talking about global namespaces, and so we need a uri. James did spell that out when he introduced his shorthand. (Even if we allowed this, I would have thought that the syntax {http://www.w3c.org}{good}a would be preferable.) In fact what the post-processor knows about the attribute 'a' is that it has no uri prefix and is part of the element 'good'. That *can be* expressed with James's syntax, provided that you keep 'a' with 'good' (as I said before, it is like an 'exploded' XML document): <{http://www.w3c.org}good a="1" /> but James's syntax cannot be used to express anything about 'a' outside of this, since you can't have: {{http://www.w3c.org}good}a as we've already said, and: a has lost all context. However, the extended attribute/element syntax I used - from Appendix A - at least *can* express something about 'a', without having to be in the original XML document: <ExpAName name='a' eltype="good" elns="http://www.w3.org" /> Personally, I prefer the latter method anyway, because it makes it clear that we are looking at a different view on the data. The XML 1.0 or parser 'view' of the data looks at elements and attributes, their values and their relationships to each other. The 'post-parser' view is of the same information but from the perspective of which namespace an element or attribute belongs to. It is possible that an element or attribute that has a direct relationship with an element in the first view has no relationship to that same element in the second view. Unfortunately, James's syntax mixes up these two 'views' of the data, by trying to superimpose the post-parser's view (of namespaces) onto the parser's view (of data). Mark Birbeck Managing Director Intra Extra Digital Ltd. 39 Whitfield Street London W1P 5RE w: http://www.iedigital.net/ t: 0171 681 4135 e: Mark.Birbeck@i... 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/ and on CD-ROM/ISBN 981-02-3594-1 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
|