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

Re: malfunctioning, evil adult as XML

  • To: "Emmanuil Batsis (Manos)" <mbatsis@n...>,xml-dev <xml-dev@l...>
  • Subject: Re: malfunctioning, evil adult as XML
  • From: Elliotte Rusty Harold <elharo@m...>
  • Date: Fri, 31 Jan 2003 20:50:11 -0500
  • In-reply-to: <3E3AF5F4.5050407@n...>
  • References: <9B9A5456AFE99E4181416B252F63BDA207C4BBDA@r...> <001b01c2c925$0cbe3480$a800a8c0@SeairthA31><3E3A719D.9030508@n...> <p04330104ba602536082a@[192.168.254.4]><3E3A8005.5020502@n...> <p04330109ba603601fa5e@[192.168.254.4]><3E3AF5F4.5050407@n...>

double quotes in xml tag
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@m... | 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/    |
+----------------------------------+---------------------------------+

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.