[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: To namespace or not to Namespace ....

  • From: David <dlee@calldei.com>
  • To: xml-dev@lists.xml.org
  • Date: Wed, 07 Apr 2010 14:16:15 -0400

Re:  To namespace or not to Namespace ....
IMHO, making the prefixes smaller doesnt solve the core issue of 
"hateing me".
There is something to be said by explicit typing used by namespaces.  As 
you say you can tell "what kind of paragraph is this"
and with namespaces you can clearly say "its the common type".
BUT ... my concern is twofold

1) Authors (or tools) are not particularly good at XML as it is, and 
adding namespaces while adding semantic clarity adds significant effort, 
both in programming and in teaching peole.

2) What should be common and what is different ?  This is a big issue 
and means the design will take a LOT longer and will be LESS flexable.   
Suppose today I say "All paragraphs are alike so I will put them in the 
common namespace".   But next year I discover that in DataSetA  
paragraphs really need to allow italics but in DataSetB they really 
shouldnt.  So I have to change not only the schemas, but all the 
instance documents.    If I didn't use namespaces I would only have to 
change the schema and all the instance documents  would survive intact.

So by avoiding namespaces for these 'common' types, I avoid
A) Having to think too hard up-front to decide what tags should be 
"common" (yea lazy me ... but still this is a side-project as it is ...)
B) Having authors/tools have to know which bits come from where (they 
dont care, this just adds work)
C) Having to change *everything* when the inevitable change request 
comes in that says "Just make this tiny change to DataSetA"



-------------------------
David A. Lee
dlee@calldei.com
http://www.calldei.com
http://www.xmlsh.org


On 4/7/2010 1:56 PM, Dowling, Nora M. wrote:
> FWIW, I actually like that you always know where an XML construct is coming from.  That way, you are sure that paragraph is paragraph is paragraph no matter what type of document you are editing. Or at least that it is Common's paragraph and not anybody else's. And with XML namespaces, there's no reason you couldn't change the prefixes to something shorter, e.g., t1:, c:, l:, etc.
>
> -Nora Dowling
>
> -----Original Message-----
> From: David [mailto:dlee@calldei.com]
> Sent: Wednesday, April 07, 2010 1:43 PM
> To: xml-dev@lists.xml.org
> Subject: Re:  To namespace or not to Namespace ....
>
> Good point Liam, the "hating you" part I forgot.  Your right.
> If the XML has to look like
>
> <type1:section>
> <common:paragraph>Paragraph<linking:alink/>  text</common:paragraph>
> </type1:section>
>
> Instead of
>
> <section>
> <paragraph>Paragraph<alink/>  text</paragraph>
> </section>
>
>
> They (and I) *will* hate me.
>
> Ug.
>
> Can this be done by an inclusion at the XSD level ?
> So I can atleast get code reuse ?
> If not even "documentation reuse" would be useful, that is "document"
> the fact that various tags are "shared" across schemas even if its not
> semantically enforced.
>
>
>
>
>
>
>
> -------------------------
> David A. Lee
> dlee@calldei.com
> http://www.calldei.com
> http://www.xmlsh.org
>
>
> On 4/7/2010 1:33 PM, Liam R E Quin wrote:
>    
>> On Wed, 2010-04-07 at 13:15 -0400, David wrote:
>>
>>      
>>> [...]
>>>
>>>        
>>
>>      
>>>    For example all the schemas have a concept of
>>> linking, a concept of paragraphs etc ... while the majority of the
>>> structure is domain specific, it would be nice to share the common parts.
>>> Which all roads leads to ....
>>>
>>> Namespaces !!!!
>>>
>>>        
>> In the SGML world it generally led to a shared element pool, as Eve
>> Maler liked (likes?) to call it.
>>
>> Once you make authors deal with
>>       <spec1:section>
>>         <common:title>..</common:title>
>>         <spec2:topic>
>>           <common:purpose>
>>             <common:paragraph>
>>             <spec2:step>
>>              <spec9:part-number>...
>> they will hate you and make you wear shoes for the rest of your life.
>>
>> But you are right, it's technically possible. In many programming
>> languages, namespaces would let you say,
>>
>>       import common;
>>       import section from spec1;
>>       import topic, step from spec2;
>>       import part-number from spec9;
>>
>> and then use unqualified names. That sort of functionality can be a
>> great help, but it is not what XML namespaces do today.
>>
>> Liam
>>
>>
>>      
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>    


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.