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

Re: The String Datatype is the Worst Datatype Ever Created

  • From: Michael Kay <mike@saxonica.com>
  • To: Liam Quin <liam@w3.org>
  • Date: Wed, 23 Sep 2015 22:09:38 +0100

Re:  The String Datatype is the Worst Datatype Ever Created
Following on from Liam’s reasoning, the real error is not in allowing a string to contain any Unicode character, but in allowing a string that can’t contain markup. What do you do when a book title contains a subscript?

Or to put it another way, what do you do when someone wants to write a flight manual that resorts to poetry in some context not anticipated by the document designer? Who is in charge, the author or the designer? Is the DTD there to prescribe or to describe what authors do?

Michael Kay
Saxonica


> On 23 Sep 2015, at 18:28, Liam Quin <liam@w3.org> wrote:
> 
> On 2015-09-23 13:11, Simon St.Laurent wrote:
>> Actually, on further reflection, I remembered why I quit using Java
>> to process XML.
>> Joshua Bloch's Effective Java gave really similar advice about
>> programming Java - enumerations over strings, strict structures over
>> variable structures, and so on.  About halfway through the book I
>> realized I was carving myself out a personal exception to all of those
>> things, so sat down to look at my code.
> 
> 
> For some environments and some sorts of "documents" this makes some sense, but it's a world in which the programmer is in control of the data; it's not the world of human-readable documents and text markup.
> 
> When I'm transcribing an 18th century glossary, and I've made a DTD to help me do the editing, if I get to a place where (a real example) the editor included a letter he'd received about an entry several pages earlier, and the letter contains a poem, it's my DTD that's wrong; I modify it to allow a poem inside a glossary. The document is authoritative in that context, not my DTD.
> 
> If I'm working on an ATA aeroplane Flight Information Manual, and I get to the part about what the flight crew should do if the toilet is out of order, it's not appropriate for me to insert a poem; the DTD doesn't allow it and neither does the ATA, and for good reason (although perhaps a little more whimsy would greatly alleviate the maintenance workers!). The ATA is authoratative, and their DTDs and guidelines reflect that.
> 
> If I'm using XML for a computer-to-computer communication such as a Web service API or an internal configuration file, and I'm the programmer or chief developer, I have authority over the format and I can decide that there are no variable strings in my API. But it'd be pretty weird if there's a database of parts that can be ordered, not to include their descriptions, or not to include the name and address of the customer, and at that point you're back in the world of variable structures.
> 
> Roger - don't let programming ideologies blind you to the actual problems.
> 
> Liam
> 
> -- 
> Liam Quin, W3C
> XML Activity Lead;
> Digital publishing; HTML Accessibility
> 
> _______________________________________________________________________
> 
> 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.