|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: malfunctioning, evil adult as XML
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








