<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Cyrille Berger a écrit :
<blockquote cite="mid:201001211713.52492.cberger@cberger.net"
type="cite">
<pre wrap="">On Thursday 21 January 2010, Olivier BERTEN wrote:
</pre>
<blockquote type="cite">
<pre wrap="">There's a mix of different reasons, the least not being my lack of
knowledge of XML and programming skills...
I first went from <RGB r="1" g="1" b="1"> to <RGB values="1 1 1"> simply
because it was easier to deal with different color models the same way
(you were talking about laziness ;-) )
</pre>
</blockquote>
<pre wrap=""><!---->Well, I don't know if I am spoiled by the framework I use for xml, but for me
accessing an attribute of an element is as simple as "red =
element.attribute("r",0.0).toDouble()" :) The two reasons we went for that
form is that in "1 1 1" the order of channels is not specified, and it is also
not possible to validate it with a schema (there have been changed on XML
schemas to also validate data, but I don't know if it would work in that
case).
</pre>
</blockquote>
I understand the validation point but I'm not really sure of the
interest in validating data... since <sRGB r="20" g="-100"
b="0.2"/> would validate but it wouldn't make any sense... but it
might be my bad knowledge of xml ;-)<br>
<br>
For the code question, mine is
"item.values[(elem.attrib['model'],elem.attrib['space'])] =
map(eval,elem.text.split())". So it's the same code for any model,
which makes sense since I don't display the colors at parsing time but
later in the process, where I use data provided in another "format"
anyway.<br>
<blockquote cite="mid:201001211713.52492.cberger@cberger.net"
type="cite">
<pre wrap=""></pre>
<blockquote type="cite">
<pre wrap="">For the rest (metadata, swatch organization) wich aren't in the create
draft, I made some choices but I'm already reconsidering most of them...
</pre>
</blockquote>
<pre wrap=""><!---->
What are the choice ? I think we would aim to use things like RDF/XMP, but
neither of them are "simples", so I don't know if we should not also have a
simple metadata spec that we can reuse (something based on dublin core,
maybe).
</pre>
</blockquote>
My main choice was to not use (yet) any existing spec because it would
complexify my xml and at this early developement stage I want to keep
it easy to read for humans. But this is most probably going to change.<br>
<br>
Olivier<br>
</body>
</html>