OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] malfunctioning, evil adult as XML

[ Lists Home | Date Index | Thread Index ]
  • To: "Emmanuil Batsis (Manos)" <mbatsis@netsmart.gr>,xml-dev <xml-dev@lists.xml.org>
  • Subject: Re: [xml-dev] malfunctioning, evil adult as XML
  • From: Elliotte Rusty Harold <elharo@metalab.unc.edu>
  • Date: Fri, 31 Jan 2003 20:50:11 -0500
  • In-reply-to: <3E3AF5F4.5050407@netsmart.gr>
  • References: <9B9A5456AFE99E4181416B252F63BDA207C4BBDA@red-msg-05.redmond.corp.microsoft.com> <001b01c2c925$0cbe3480$a800a8c0@SeairthA31><3E3A719D.9030508@netsmart.gr> <p04330104ba602536082a@[192.168.254.4]><3E3A8005.5020502@netsmart.gr> <p04330109ba603601fa5e@[192.168.254.4]><3E3AF5F4.5050407@netsmart.gr>

At 12:17 AM +0200 2/1/03, Emmanuil Batsis (Manos) wrote:

>I don't see how XML can get violated by what I suggested. In the 
>case you imply where the XML is for consumption by multiple 
>entities, there must be some agreement in the form of a schema 
>anyway. What I suggest is a flexible model that does not break XML 
>1.0 and can be agreed upon. No reason to worry... just expect a 
>simple type in the form of either an element or an attribute; but a 
>simple type is just that.

A transform from one XML vocabulary to another is fine, as long as 
it's clear that's what you're doing. However, the problem is that 
this promulgates the idea that attributes are just a funny kind of 
child element, and they're not. The structure of the document is not 
the same before and after the transformation.  They have 
characteristics child elements don't have and vice versa. They are 
not equivalent. Changing attributes to child elements or vice versa 
is not the same thing as changing double quotes to single quotes 
around attribute values or adding extra white space inside tags. This 
is not just a matter of syntax sugar.  Developers who think they are 
the same are going to encounter problems, probably sooner rather than 
later.

Oh, and one more thing: there does not need to be any agreement about 
anything, including the schema. Well-formedness is all that's 
required. There are no types. There's just elements. And elements can 
have substructure, even when the schema says they can't. Such a 
document would schema-invalid, but is still completely legal and can 
be usefully processed.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|           Processing XML with Java (Addison-Wesley, 2002)          |
|              http://www.cafeconleche.org/books/xmljava             |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+




 

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

Copyright 2001 XML.org. This site is hosted by OASIS