[CREATE] OpenRaster and filters
Kai-Uwe Behrmann
ku.b at gmx.de
Fri Jun 13 07:48:02 PDT 2008
Am 12.06.08, 18:32 -0400 schrieb Liam R E Quin:
> On Wed, 2008-06-11 at 21:20 +0200, Cyrille Berger wrote:
> [...]
> > 1) <filter name="standard:blur" type="standard:gaussianblur">
> > <params>
> > <param name="radius">10</param>
> > </params>
> > </filter>
> >
> > 2) <filter:standard:blur radius="10" />
> >
> > 3) <filter:standard:blur>
> > <radius>10</radius>
> > </filter:standard:blur>
Giving "filter" a more distinguishable name would help reusing them.
Otherwise it is possible that filters get confused during XML
processing and parameters dont match?
"xmlns:openraster:filter"
As well radius has a integer value. It would be nice to see:
a) this being declared (xs:int ?)
b) to make options a non pixel thing, e.g. move to a precentage
relationship
> > The main weakness of 1) is that this doesn't allow DTD/RelaxNG checking and
> > validation, but it makes easier to extend since you don't have to write the
> > schema for your filter
>
> Yes, although with W3C XML Schema 1.1 you'd be able to do some checking
> here, it would not be in a very modular way, I think.
>
> >
> > While 2) and 3) have the advantage to allow DTD/RelaxNG validation, while
> > still allowing extensability. 2) is similar to the SVG syntax.
> >
> > 3) and 1) have the advantage that you can easily pass more complex parameters
> > to the filter, for instance, the mask on a layer could be serialize as:
> >
> > <filter:standard:mask>
> > <mask> <layer src="alphamask.png" /> </mask>
> > </filter:standard:mask>
>
> A compromise between (2) and (3) is to allow both
> attributes and elements,
> <blur radius="10" />
> being the same as
> <blur><radius>10</radius></blur>
>
> This is more complex to implement, and if the complexity isn't
> worth while, I'd go for elements, i.e. (1) or (3).
>
> You then have to ask what sort of validation you want; both
> can have validation applied at some level. Supplying a schema
> of some sort that says that a particular set of parameters are
> needed might be useful, although in general it can get
> arbitrarily complex...
> blur hradius="10" vradius="6" would disallow a radius value...
> schematron (and XSD 1.1) can express this to some extent, maybe
> sufficiently.
>
> Liam
kind regards
Kai-Uwe Behrmann
--
developing for colour management
www.behrmann.name + www.oyranos.org
More information about the CREATE
mailing list