XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] 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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS