Blog Stats
  • Posts - 62
  • Articles - 11
  • Comments - 114
  • Trackbacks - 63

 

XML version 2.0

This is how I see evolution applied to XML

<?xml version='2.0' ?>
<Employee position='Manager'>
    <Name> John Doe </>
    <Hired> 2004/01/01 </>
    <Address>        
        <Street> 123 NW </>
        <City> Sunny Beach </>
        <State> FL </>
    </>
    <Phones> 555-1234 <|> 555-1235 <|> 555-1236 </>
</>

1. End tags are not needed since it must be well-formed </>
2. Multiple elements per tag allow table representations <|>

Think about the benefits for integration with the relational world.
Nothing needs to be changed, it is absolutely backwards compatible.

Want more? Here is a sneak peek at XML 3

Evolution is unstoppable


Feedback

# re: XML version 2.0

Gravatar Assuming that you have a DTD realize that the </> tags are superfluous and remove them. This is perfectly legal SGML and is called end-tag omission. One of the reasons for creating XML by simplifying SGML is because SGML is just to complex. For instance, writing a full-fledged SGML parser is much harder than writing an XML parser. In my opinion a very important simplification in XML was to always require elements to be explicitly closed. Your suggestion is essentially to move back to SGML. (I'll ignore the <|> for now.)

I believe that one of the design goals of SGML was to create a markup syntax that would be easy for typists to use. I think it was conceived in the 70's and no one at that time could imagine the tools that we have available today. And I'm quite sure that the designers of XML consciously decided to not include that goal when they designed XML. And see the difference: SGML is an exotic markup language not widely deployed while XML (a true subset of SGML) is extremely successful.

So if you want easy text-based entry switch to SGML and parse it into XML. However, I'm not sure that SGML has something like <|>, but then again SGML has almost everything so perhaps there is a list-like feature somewhere deep buried in the specs.
2/29/2004 2:47 AM | Martin Liversage

# re: XML version 2.0

Gravatar Interesting. My comments:

http://www.tallent.us/CommentView.aspx?guid=bd067498-2907-4f9c-ad23-6a839c5a513b 3/1/2004 10:45 AM | Richard Tallent

# re: XML version 2.0

Gravatar I think that's downright brilliant. I don't completely understand the comment above, because the </> tags are not superfluous in standard XML use, and it would be quite easy to write a parser for this model...I have written them, from scratch with regular expressions and used SAX...Never once have a refered to the name of an element in the 'end element' event in my handler, UNLESS I am checking the well formedness of a document... There's never any reason! named end tags are a leftover from HTML when empty tags didn't have the "/>" at the end. I think the idea is great. 10/6/2004 4:37 AM | Luke

# re: XML version 2.0

Gravatar A few more thoughts...

XML isn't really a way to "markup" documents like HTML/SGML at this point...Its really a cross platform way to represent data in strings. I think the most important thing is to have XML efficiently map to programming objects, which means it must be able to efficient represent the basic types. Every language I know has a sequence type without keys exactly like you showed above, but XML does not. It can do keyed sequences okay with empy tags:
<tag
key1="1"
key2="2"
/>
and represent compound objects and variables okay with tags and nested tags...But for efficiency it should have a sequence type that doesn't look like this:
<simple_sequence>
<item number="1">blah</item>
<item number="2">blah</item>
<item number="3">blah</item>
<item number="4">blah</item>
</simple_sequence>

..That's waaaay too big. 10/6/2004 5:04 AM | Luke

# re: XML version 2.0

Gravatar xml must be one of the most bloated languages ever createdbut removing it's unnecesary elements would defeat one of it's goals: it's verbosity makes it easy for humans to read.

What if your xml structure was much bigger and contained deeply nested element sets? Would you know which end tag belonged to which element? Probably not. I think you'd need (for the sake of human readers) to put comments at the end of large structs to indicate that that it was the closing element for blah. 10/28/2004 4:09 AM | Kev FLood

# re: XML version 2.0

Gravatar How i will run this version 2.0.
it is not possible tochange all the configuration...
8/9/2005 8:59 PM | nirmal kumar

Post a comment





 

Please add 3 and 4 and type the answer here:

 

 

Copyright © RebelGeekz