On Sat, 2004-02-28 at 17:56, Craig Bradney wrote:
So onto the XML. Firstly. I'll say I'm no XML expert so what I'm typing is just a rough guesstimate of some markup, given the above,
<colorset name="reds"> <color type="rgb" name="my-red" red="f" blue="0" Green="0" /> <color type="rgb" name="my-red" red="ff" blue="00" green="00" /> <color type="rgb" name="my-red" red="100%" blue="0%" green="0%" /> <color type="cmyk" name="my-red" cyan="0" magenta="255" yellow="255" black="0" /> <color type="cmyk" name="my-red" cyan="0%" magenta="100%" yellow="100%" black="0%" /> </colorset>
They are the kind of lines I see possible. Someone with real XML knowledge can convert it to something useful. :)
The basic idea looks sound. I might suggest something like this:
<colorset name="Reds" xmlns="http://www.scribus.org/colorset" xmlns:rgb="http://www.scribus.org/colorspace/RGB" xmlns:cymk="http://www.scribus.org/colorspace/CYMK" xmlns:panstone="http://www.example.com/panstone"> <color name="My Red"> <rgb:build red="100%" green="0%" blue="0%" /> </color> <color name="Another (Dark) Red"> <cymk:build cyan="0%" yellow="50%" magenta="50%" black="50%" /> </color> <color name="Panstone Green 23"> <panstone:color name="Green 23"/> <cymk:build cyan="23%" yellow="28%" magenta="2%" black="2%" /> </color> </colorset>
This is similar to the approach that RDF-XML uses, and permits the addition of new colorspaces without impacting the basic schema for colorsets.
The last example also illustrates specifying a color using different colorspaces in decreasing order of preference, which might be useful to supply an approximation for software that doesn't understand the preferred colorspace (in this case, the hypothetical "Panstone" system).
Actually, it might even be worth asking whether just using RDF-XML for this would be worthwhile.
-mental