| Store | Cart

XML overuse? (was Re: Python to XML to Python conversion)

From: Clark C . Evans <c...@clarkevans.com>
Tue, 16 Jul 2002 14:27:12 -0400
On Tue, Jul 16, 2002 at 03:18:30PM +0200, holger krekel wrote:
| Huaiyu Zhu wrote:
| > The basic idea is quite simple: consider a data structure as a tree; denote
| > the type of branching at each node; indent the subtrees.  It appears to me
| > that indentation is easier to handle than quotes and escapes.  Here's a
| > simple example:
| 
| It does and it's very interesting.  It does sound a lot like 
| http://yaml.org to me, though  (They even have an RFC).
| Don't you think YAML might be a superset of your ideas?

Yes, Steve Howell even has a python implementation of it...
http://yaml.org/python/PyYaml_14jul2002.tgz

I'm sure he'd love your comments/contributions.

| Let me add some random thoughts/questions about your/yaml's scheme 
| (i hope i am not missing something obvious):
| 
| - how is a binary data-stream's size determined? What about
|   open-ended streams?  Embedding of arbitrary data-streams
|   is very useful (IMO).

In YAML, we have a built-in BASE64 type which hopefully most
implementations will support.   As for handling embedded streams,
this works as long as they are indented properly and only use
printable characters (see specification).

| - somehow your and yaml's scheme remind me of todays wiki techniques.  
|   E.g. Wikis have methods of sequence-detection (bullets ...) and they
|   have a commitment to readability. Of course, they are generally more 
|   concerned with graphical views than with beeing a concise persistence
|   scheme.  

Yes; Ward Cunningham's WikiWiki is a very cool concept and I'm sure
we borrowed from it sub-conciously.

| - Is there a canonical conversion between XML and your scheme/YAML?
|   Shouldn't be too hard, anyway...

http://yaml.org/xml.html

| - how do you express external addresses akin XPATH? 
|   Ideas:
|     - Mappings are easy, just take the 'key'. 
|     - Sequences are easy (take the sequence number) but not very robust
|       to deletions and insertions of items.
|     - tag-names (IDs) which can be associated with any item might be interesting.
|       readability is likely to suffer, probably.

I'm toying with making IDs a "special" key so that a YPATH
like mechanism would work well... similar to XPATH/XSLT's "keys()"

| btw, I wonder whether some form of your and/or YAML's ideas should play a
| role in the new persistence-SIG.  While the actual persistence mappings 
| are not in the focus there are certainly some interesting connections 
| between the two areas.

One of our other members, Brian Ingerson, is working on getting
YAML into the core of Parrot (http://parrot-code.org)

| this sure is useful. Especially for me since i work with a (perl-) 
| friend on a project which needs to address the persistence-question. And
| we want to have it interoperable, simple and fast.  I guess looking
| at YAML might avoid that you have to dig too much into old harddisks :-)

Also, there is a Perl implementation of YAML sited in the 
downloads section of the website written by Brian Ingerson.
Having more members would be great!  We could use more implementations,
and generic YAML tools (like YAML-DIFF)

Best,

;) Clark

-- 
Clark C. Evans                   Axista, Inc.
http://www.axista.com            800.926.5525
XCOLLA Collaborative Project Management Software

Recent Messages in this Thread
Mark Jul 12, 2002 12:08 am
Harry George Jul 12, 2002 12:01 am
theh...@binary.net Jul 12, 2002 01:22 am
Jeremy Bowers Jul 12, 2002 03:01 am
Peter Hansen Jul 12, 2002 03:41 am
Oren Tirosh Jul 12, 2002 05:54 am
Erik Max Francis Jul 12, 2002 08:16 am
Tim Rowe Jul 12, 2002 04:37 pm
François Pinard Jul 12, 2002 02:49 pm
Peter Hansen Jul 12, 2002 04:08 pm
Jeremy Bowers Jul 12, 2002 02:52 pm
Huaiyu Zhu Jul 12, 2002 05:45 pm
holger krekel Jul 13, 2002 02:55 pm
Huaiyu Zhu Jul 15, 2002 06:04 pm
holger krekel Jul 16, 2002 01:18 pm
Clark C . Evans Jul 16, 2002 06:27 pm
Steve Howell Jul 16, 2002 06:31 pm
Huaiyu Zhu Jul 16, 2002 10:14 pm
Clark C . Evans Jul 17, 2002 01:30 am
James Kew Jul 17, 2002 10:52 pm
François Pinard Jul 18, 2002 11:11 am
Huaiyu Zhu Jul 18, 2002 06:10 pm
Huaiyu Zhu Jul 18, 2002 06:36 pm
Matt Gerrans Jul 12, 2002 07:03 am
Jonathan Hogg Jul 12, 2002 08:07 am
Clark C . Evans Jul 13, 2002 12:29 am
Alex Martelli Jul 12, 2002 08:01 am
Jeremy Bowers Jul 12, 2002 02:55 pm
Jeremy Bowers Jul 12, 2002 03:53 pm
Terry Reedy Jul 12, 2002 02:03 am
David Mertz, Ph.D. Jul 15, 2002 02:49 pm
Alex Martelli Jul 12, 2002 02:03 pm
Jonathan Hogg Jul 12, 2002 03:11 pm
Cameron Laird Jul 12, 2002 01:35 pm
Cameron Laird Jul 12, 2002 01:27 pm
Alex Martelli Jul 12, 2002 08:37 am
Doru-Catalin Togea Jul 12, 2002 09:43 am
Jonathan Hogg Jul 12, 2002 01:44 pm
François Pinard Jul 12, 2002 02:37 pm
Mike C. Fletcher Jul 12, 2002 04:56 pm
Jeremy Bowers Jul 12, 2002 03:00 pm
Tim Rowe Jul 12, 2002 04:37 pm
Messages in this thread