[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] "Introducing MicroXML, Part 1: Explore the basic principlesof ...
- From: Michael Sokolov <sokolov@ifactory.com>
- To: David Lee <dlee@calldei.com>
- Date: Sun, 15 Jul 2012 11:57:28 -0400
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
- References:
- Re: [xml-dev] "Introducing MicroXML, Part 1: Explore the basic principles of ...
- Re: [xml-dev] "Introducing MicroXML, Part 1: Explore the basicprinciples of ...
- From: John Cowan <cowan@mercury.ccil.org>
- RE: [xml-dev] "Introducing MicroXML, Part 1: Explore the basic principles of ...
- From: "Len Bullard" <Len.Bullard@ses-i.com>
- Re: [xml-dev] "Introducing MicroXML, Part 1: Explore the basicprinciples of ...
- From: John Cowan <cowan@mercury.ccil.org>
- Re: [xml-dev] "Introducing MicroXML, Part 1: Explore the basicprinciples of ...
- From: James Clark <jjc@jclark.com>
- Re: [xml-dev] "Introducing MicroXML, Part 1: Explore the basicprinciples of ...
- From: James Clark <jjc@jclark.com>
- RE: [xml-dev] "Introducing MicroXML, Part 1: Explore the basicprinciples of ...
- From: David Lee <dlee@calldei.com>
- RE: [xml-dev] "Introducing MicroXML, Part 1: Explore the basicprinciples of ...
- From: "Rushforth, Peter" <Peter.Rushforth@NRCan-RNCan.gc.ca>
- RE: [xml-dev] "Introducing MicroXML, Part 1: Explore the basicprinciples of ...
- From: David Lee <dlee@calldei.com>
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]