[Koha-devel] generic Koha data export format?

Marc Chantreux marc.chantreux at biblibre.com
Wed Jun 2 19:59:20 CEST 2010


On Wed, Jun 02, 2010 at 06:16:16PM +0100, MJ Ray wrote:
> Which is better on the above two points are debatable

I have experience reading and editing both and i have to admit i hope to
never see xml again out of its real place ( spanned text description ).

> xml need closing tags (which are often better for clarity, like comments
> next to /TMPL_IF tags)

I didn't meant end tags but extratags. In yaml, you can write

authors:
    - John Doe
    - Octave R. Gebel
    - Agathe dablooz

then you have an array. The equivalent XML would be something like

<authors>
<element>John Doe</element>
<element>Octave R. Gebel</element>
<element>Agathe dablooz</element>
</authors>

element tag is there only because of xml serialization so you need extra
config in to make your xmlparser add dans remove tags correctly when
reading/writing files. Too error-prone for me.

> which I don't like because humans are poor at seeing whitespace.

a point for xml ... but 

- as in xml: that parser will help you
- errors are easier to fix by hand. By experience, it's easier to
  find a hash key without tailing space than tring to understand how an
  accidentaly removed char in a tag breaks all the tree.

> > - it supports pointed structures
> Do we need them?

It depends if we can extract informations and links without having
references to the database ids
- it will be hard to do it in some cases. For exemples: authorities
  are storing DB ids inside the marc record.
- it will be the good strategy if we want a tool that is not just
  another mysql dumper (updating versions, merging 2 bases, ...)

> > - it's now supported everywhere
> 
> Not everywhere, but probably comparable with XML.  Does MySQL handle
> it now?

mysql comes with its own grammar (sql) so why must sql have to know
something about xml or yaml ? 

regards
-- 
Marc Chantreux
BibLibre, expert en logiciels libres pour l'info-doc
http://biblibre.com


More information about the Koha-devel mailing list