[Ex-plain] Extensibility

Mark Needleman - DRA mneedlem at dra.com
Wed Mar 27 15:13:30 CET 2002


Matthew

my comment about lack of uniqueness was not about multiple definitions in
a single document but that there is no registration process to stop
multiple people from defining the same namespace prefix for different
things

so you could define ze9ext: to define your extentions and I could do the
same for mine pointing at a different url - and we have a clash - not in a
single xml record but between them

Or am I misunderstanding this?

mark


On Wed, 27 Mar 2002, Matthew Dovey wrote:

> No - since it indicates a partial understanding of XML namespaces ;-)
> 
> The prefixes are really abbreviations for the namespace which in the
> URL. xmlns:DC=http://www.dc.org/some.dtd is really a cue to a parser
> that wherever it sees DC it should substitute
> {http://www.dc.org/some.dtd}
> 
> So if you have  xmlns:DC=http://www.dc.org/some.dtd and
> xmlns:DC1=http://www.dc.org/some.dtd
> 
> DC:creator and DC1:creator are identical and should be treated as such.
> 
> If an XML parser gets the same prefix defined to be different namespaces
> it should either use scoping rules i.e.
> 
> <test xmlns:dc=http://oneurl.com>
>   <dc:creator />
>   <test2 xmlns:dc=http://twourl.com>
>     <dc:something />
>   </test>
> </test>
> 
> So the referents of dc in this case are unambiguous as the second xmlns
> only applies within the scope of sub-elements of <test2>
> 
> Or the parser should raise an error or warning if we have the same
> prefix defined twice in the same scope.
> 
> Matthew
> 
> > -----Original Message-----
> > From: Mark Needleman - DRA [mailto:mneedlem at dra.com]
> > Sent: 27 March 2002 13:32
> > To: Mike Taylor
> > Cc: ex-plain at indexdata.dk
> > Subject: Re: [Ex-plain] Extensibility
> > 
> > 
> > Mike
> > 
> > because without a registration process the same namespace
> > prefix could point at different namespace definitions - as 
> > long as 1 xml document uses unique prefixes you are ok i 
> > suppose but suppose an application gets 2 xml documents in 
> > with xx: defined as a namespace prefix each pointing at a 
> > different url - the application may only have understanding 
> > of one of them but think it understands the prefix in the 2nd document
> > 
> > you have syntatically uniqueness as long as you only have 1
> > definition of a namespace in a document - but you may not 
> > have semantic uniqueness
> > 
> > Does this make any sense?
> > 
> > mark
> > 
> > 
> > On Wed, 27 Mar 2002, Mike Taylor wrote:
> > 
> > > > Date: Tue, 26 Mar 2002 07:41:16 -0600 (CST)
> > > > From: Mark Needleman - DRA <mneedlem at dra.com>
> > > > 
> > > > Actually there is a mechanism in MARC while not like
> > namespaces does
> > > > provide a bit of extensibility [...] there is a possibility of
> > > > collisions there so 2 systems could use the same field 
> > for different
> > > > things - in theory the nice thing about namespaces is
> > itss supposed
> > > > to prevent that although it doesnt really
> > > 
> > > Doesn't it?  Why not?
> > > 
> > >  _/|_	 
> > _______________________________________________________________
> > > /o ) \/  Mike Taylor   <mike at miketaylor.org.uk>   
> www.miketaylor.org.uk
> > )_v__/\  "Can't talk.  Eating" -- Homer Simpson.
> > 
> > 
> 
> 
> _______________________________________________
> Ex-plain mailing list
> Ex-plain at indexdata.dk http://www.indexdata.dk/mailman/listinfo/ex-plain
> 





More information about the Ex-plain mailing list