[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: "Introducing MicroXML, Part 1: Explore the basic principle
On 7/15/2012 10:32 AM, David Lee wrote: >> Namespaces are 'part' of XDM but they can be empty. So in theory MicroXML with no namespaces might fit in an XDM Model. >> >> From the reading of the evolving commentary I am not sure if a 'real' XML parser could actually read MicroXML ... >> if it ran across namespacy like things like <foo:bar/> without an associated namespace declaration. >> However ... a MicroXML Parser could read such a thing and possibly construct an XDM model with it. >> But what would the localname be ? "foo:bar" ? Not a valid NCName ... "bar" ? but no namespace node ? >> You can do all sorts of rational things here if you're willing to give up interoperability with XDM delivered from namespace-aware XML parsers. In my personal view, I like the idea of making the localname "bar" and the namespace "foo". Then you can keep the NCName/QName types in the data model, you don't lose any information, but you just ignore all the problems with namespace fixup, the need to carry around in-scope namespace prefixes and so on, and the context-dependence of the prefixes. There's a kind of downgrading model for interoperating with older parsers. If you know you're getting XDM coming in from an old parser, you simply run a utility over it sets each QName's namespace to be its prefix. Then as long as your prefixes are globally unique, you're happy. or you just redefine your expectations such that the significant piece of information is the prefix. It would be interesting to see what that breaks. But it means pushing this knowledge about new namespace handling into layers beyond the parser: you have to own the whole stack, I think, so it's not really a tenable stance for tool vendors? -Mike
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
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
|