Sign In/My Account | View Cart  
advertisement

Article:
 Cracks in the Foundation
Subject: Not compelling?
Date: 2006-11-13 07:50:56
From: Norman Walsh

DocBook, HTML, Atom, RSS, and Dublin Core all have elements called 'title' that mean different things. DocBook and Dublin Core both have elements called date. TEI and HTML both have elements called 'p'.


These examples aren't compelling how?



Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • Not compelling?
    2006-12-25 22:58:41 Micah Dubinko

    Sorry for the late reply, Norm.


    I'm saying I haven't seen a compelling markup fragment that uses any of those elements in a way that's not obvious from context. In practice, there's no ambiguity about what the element at html/head/title is all about. Likewise for other same-named elements.


    I'm treating introductory XML texts as a touchstone here, and they generally all fail to provide compelling examples. Still happy to see examples otherwise, though. :)


    -m

  • Not compelling?
    2006-11-14 15:58:02 mikeday

    "DocBook, HTML, Atom, RSS, and Dublin Core all have elements called 'title' that mean different things."


    Very true, but does it matter? This multitude of title elements each occur in different contexts. If you have a title element inside a head element inside an html element, does it really need to be explicitly qualified with the XHTML namespace for you to recognise it as an HTML title?


    Why not use context for disambiguation instead of requiring globally unique names for everything?

    • Not compelling?
      2007-01-29 20:43:03 rpbourret

      Because keeping a context stack is much, much harder than simply comparing the URI and local name of the element or attribute at hand with the one already in your code.


      And there's no guarantee it will be correct. Even if you expect a particular "p" element at a certain place in an XML document, there's no guarantee that an unnamespaced p element will be the one you want. Good luck if it uses a different content model.


Sponsored By: