Re: marker-pattern has a weird grammar

On Wed, Nov 5, 2014 at 8:26 PM, Amelia Bellamy-Royds
<amelia.bellamy.royds@gmail.com> wrote:
> Why not simplify it further:
>
> <marker-pattern> = [<marker-gap> <marker-ref> ]+  |   [ <marker-ref>
> <marker-gap>]+  |  none
>
> <marker-gap> = <length> | <percentage>
> <marker-ref> = none | <url> | child | <child-selector>
>
> In other words, you must alternate length measures and marker references in
> equal number but you can start with either a marker or a gap.  If you start
> with a gap, the initial marker will be offset by that point; repeats will be
> the same whether you put the gap at the start or end of the sequence.  An
> odd number of gaps confuses the repeat pattern.

Why?  You just... keep repeating.  If you both start and end with a
gap, or with a marker, it just means that the gaps get added together,
or the markers get stacked.

> If an author wants to place multiple markers at the same point, just use a
> gap of zero.

This simplifies the grammar, but complicates the authoring experience,
which is an inversion of the priority of constituencies.  If we think
it's reasonable to allow multiple markers at a given spot (and I think
it is) then allowing that to be specified directly is simpler.

> I don't really see a use case for `none` within a pattern, since you could
> instead use calc() to combine the two gaps into one.  However, I don't see
> harm in it.  It could potentially be useful in animating between two
> sequences.  Implementers will have to factor in a "none" behaviour anyways,
> in case a marker reference is invalid.  And it allows re-use of the
> <marker-ref> grammar defined for other properties.

Yup.

> After simplifying that much, I couldn't help complicating it up again...
[snip]

Keep these ideas around, but we're trying to get the initial version
of SVG2 locked down and solidified first, before complicating it too
much further. ^_^


~TJ

Received on Wednesday, 12 November 2014 00:24:53 UTC