Discussion:
[docbook] To Namespace or Not To Namespace
Warren Young
2014-10-03 18:43:53 UTC
Permalink
I’m investigating porting our 4.x docbook to 5.x. For our custom
elements, I’m considering adding them to our own namespace so that it is
more obvious which elements are docbook and which are custom to our
extension. While technically not necessary given that any customizations
makes it not DocBook, what are the pros and cons of namespacing our own
extension elements?
Namespacing means you avoid conflicts with any future DocBook versions.

As for the cons of not namespacing, I can't think of any other than the
extra typing it requires. Aren't all XML parsers worth talking about
namespace aware now?

That rhetorical sweep includes old versions of modern parsers that are
still available in "stable" OSes like RHEL and Debian. MSXML -- made by
the company that never met a standard they didn't want to wreck -- has
supported namespaces going back to the XP days, a dozen years ago at least.
Steve Cuzner
2014-10-03 19:08:31 UTC
Permalink
I couldn't think of any other cons either, but the examples on docbook.org don't suggest it or even mention the possibility, so I'm worried that there might be something that I'm not considering.

-----Original Message-----
From: Warren Young [mailto:***@etr-usa.com]
Sent: Friday, October 03, 2014 2:44 PM
To: docbook-apps List
Subject: [docbook-apps] Re: [docbook] To Namespace or Not To Namespace
I'm investigating porting our 4.x docbook to 5.x. For our custom
elements, I'm considering adding them to our own namespace so that it
is more obvious which elements are docbook and which are custom to our
extension. While technically not necessary given that any
customizations makes it not DocBook, what are the pros and cons of
namespacing our own extension elements?
Namespacing means you avoid conflicts with any future DocBook versions.

As for the cons of not namespacing, I can't think of any other than the extra typing it requires. Aren't all XML parsers worth talking about namespace aware now?

That rhetorical sweep includes old versions of modern parsers that are still available in "stable" OSes like RHEL and Debian. MSXML -- made by the company that never met a standard they didn't want to wreck -- has supported namespaces going back to the XP days, a dozen years ago at least.

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-***@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-***@lists.oasis-open.org
Loading...