OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

cgmo-webcgm message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [cgmo-webcgm] ISSUE: Style Property shorthand


Hi Benoit,

See my preferences and comments embedded...

At 08:51 PM 6/28/2005 -0400, Benoit Bezaire wrote:
>Hi cgmo-webcgm,
>
>   I noticed that the specification doesn't say how to deal with the
>   following XCF:
>
>   (Example 1)
>   <webcgm ...
>     <grobject apsid="myId" intensity="75%" fill-color="#FFFFFF"/>
>   </webcgm>
>
>   'intensity' controls 4 style properties (including 'fill-color'), so
>   in the above example, which one wins ('intensity' or 'fill-color')?
>
>   Another area that might not be too clear is the following:
>   (Example 2)
>   <webcgm ...
>     <grobject apsid="myId" fill-color="#FFFFFF"/>
>     <grobject apsid="myId" intensity="75%"/>
>   </webcgm>
>
>   What's the 'fill-color' of myId?
>
>   Here are my proposals:
>
>   Example 1: I would like for us to state that 'intensity' is a
>   shorthand for 'fill-color', 'stroke-color', 'text-color',
>   'raster-intensity'. So in fact, the above example would be
>   ill-formed (XML attribute specified twice on the same element).
>   According to my proposal, the above example would be invalid.

I agree.

Here is another argument supporting your recommendation -- if you were 
allowed to put both attributes on the same element, XML says that you 
cannot rely on any particular order for attributes -- one valid parser 
might return them in one order, and another valid parser in a different order.

So the order rule (next) could not be used to resolve ambiguity.  Therefore 
if that case were allowed, it would require some complex rule to make sense 
of it, for no discernable gain.


>   Example 2: The element order is important... i.e., the latest
>   elements replace existing values. So in the above example, myId
>   would have a fill-color of 75%.

I agree.

Another comment:  the above Ex.2 would be equivalent to the DOM sequence

...myObj.setStyleProperty( "fill-color", #FFFFFF")
...myObj.setStyleProperty( "intensity", "75%")

and the 2nd call would supersede the 1st call there.  (Note.  Long ago we 
agreed that subsequent SP settings supersede earlier ones, instead of 
accumulating with earlier ones.  Therefore since both calls affect the Fill 
Colour used for display, the 2nd call's effect on it should supersede the 
1st call's effect on it.)

Regards,
-Lofton.




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]