On Sun, 2004-02-29 at 00:38, MenTaLguY wrote:
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.
All very interesting and I can immediately see the benefits. If there's a format that can handle what we need to achieve then we should use it.
The major issue I see above is there is a certain degree of complication over the basic format my monkeys and typewriters spat out. It does need to be a format editable by users, although they can already edit the existing colour sets in Scribus but cannot yet save them as a new set. Some would want to edit them in the XML file itself. Some really love the idea of scripting and doing conversions of doc formats to Scribus format etc. As long as its a defined XML+DTD format they would be happy I guess.
Is there a way to allow for various values (f,ff,100%,255), or is this just in the application that reads the file?
regards Craig