[Ex-plain] Extensibility

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


Matthew

well shooting people is an interesting uniqeness enforcement methodology -
and the fact that you have to debug applications almost proves my point

and DC is a well known prefix - suppose the prefix in question is not as
well known

I guess my point is that no matter how much folks like to say xml
namespaces guarantee uniqueness (and i hear this a lot) - they really dont
without some other mechanisms in place - they work great for ensuring
uniqueness in a single document because of the rules for how to handle
multiple definitions - but you cant count on anything beyond that
without some other mechanism in place

mark
 


On Wed, 27 Mar 2002, Matthew Dovey wrote:

> P.S. anyone who writes code that assumes that DC:Creator is Dublin
> Core:Creator because DC is often used as the prefix for Dublin Core
> without checking the xmlns:DC definition should be shot.
> 
> <DC:Creator xmlns:DC="http://notdublincore.org")> is not Dublin Core
> creator, whilst <DC:Creator xmlns:DC="http://purl.org/dc/elements/1.1/">
> is.
> 
> Likewise, anyone whose code does not recognise <myprefix:Creator
> xmlns:myprefix="http://purl.org/dc/elements/1.1/"> as Dublin Core
> creator because I don't use the commonly used DC prefix should also be
> shot! 
> 
> I've wasted enough time debugging XML applications which can't get this
> fundamental principle correct.
> 
> Matthew
> 
> > -----Original Message-----
> > From: Matthew Dovey 
> > Sent: 27 March 2002 14:02
> > To: 'Mark Needleman - DRA'; 'Mike Taylor'
> > Cc: 'ex-plain at indexdata.dk'
> > Subject: RE: [Ex-plain] Extensibility
> > 
> > 
> > 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
> > 
> 
> _______________________________________________
> 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