|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: A multi-step approach on definingobject-orientednatureof
Mike Champion wrote: > > 8/21/2002 1:16:12 PM, Paul Prescod <paul@p...> wrote: > > >Namespaces should never have been scoped. That's a big part of what > >drove the implementation complexity up to such a large degree. > > Maybe I'm too busy thrashing in the seaweed to get my head above water, > but what would a namespaces spec without scoping look like? Well, the original namespaces specification did not have scoping. Unfortunately these proto-specs tend to get lost in the mists of time. Nevertheless, just imagine if xmlns declarations were only allowed on the root element. Or, perhaps, if they could be allowed anywhere but are scoped from this point in the document forward. Keeping track of qname prefixes becomes the responsibility of a single node (the document node), rather than every node. Mapping from prefix to URI is a question of asking the root rather than recursively asking your parents. Finding a "free prefix" consists of asking the root rather than recursively asking your parents. Cutting and pasting within the same document is trivial: as a worst case, you need to notice that a prefix declaration is not at the root and move it there. Cutting and pasting across documents is easier than it is today (because it is simpler to check for prefix clashes). On the other hand , merging fragments without prefix-rewriting code and without prior agreement on prefix-usage becomes essentially impossible because you have to worry about prefix clashes. But who does this merging without code and without agreement anyhow? > Can the current spec be "profiled" to suggest sane best > practice here, or does the spec itself > have to be fixed to make un-scoped namespaces work properly? I think a profile would be quite strenuously resisted and a good chunk of documents would fall outside the profile. I probably won't respond to follow-up messages disagreeing with this proposal because we went through all of it four (?) years ago. -- Paul Prescod
|
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








