W3C home > Mailing lists > Public > www-svg@w3.org > August 2012

Understanding Lacuna Value

From: Jeremie Patonnier <jeremie.patonnier@gmail.com>
Date: Thu, 30 Aug 2012 16:05:20 +0200
Message-ID: <CAEi838kbWAKW8nNEB2xKuUKZuhqmJinuhSsxZan9s8F0e1CAVg@mail.gmail.com>
To: Chris Lilley <chris@w3.org>
Cc: Cameron McCormack <cam@mcc.id.au>, SVG public list <www-svg@w3.org>
Hi Chris,

Thanks for you're answers, here are some thought about Lacuna Value

2012/8/30 Chris Lilley <chris@w3.org>
>
> JP> Section 1.6
> JP> I'm looking forward for the definition of "lacuna value" but I'm
> JP> not sure it is quite différente than "default value" which seams a
> JP> bit more easier to understand.
>
> Yes we probably do need to explain better; the terms are quite different.
>
> In XML, "default" values for attributes define "how an XML processor is to
> react if a declared attribute is absent in a document".
> http://www.w3.org/TR/xml/#sec-attr-defaults
>
> Note that attribute-value normalization may add such default values to the
> infoset (I say may because it depends on whether external DTD subsets are
> fetched or not). It turn, this affects what is in the DOM, whether CSS
> attribute selectors match or not.
>
> In other words a default value is missing in the document and *may or may
> not* show up in the DOM, etc. This is an undesirable cause of variability
> in implementations. It can also result in DOM bloat.
>
> The term lacuna value was introduced in SVG Tiny 1.2 to deal with this.
> http://www.w3.org/TR/SVGTiny12/intro.html#TermLacunaValue
>
> A lacuna value is missing in the document, is *not* added to the infoset
> or to the DOM and can *not* be matched by attribute selectors. The
> specification tells the implementation what to do if tthe value is missing,
> without needing to sort-of-maybe add the value to the document.
>

Ok so if I roughly rephrase : "Default value" are define upon XML and can
have effect on the DOM where "Lacuna Value" are never shown anywhere but
are set to make sure that the implementor know what to do if a value is
missing.

In an author point of view, I'm a bit puzzled by this notion because it
sound a little bit like magic. For exemple, if I forget an attribut or a
property somewhere and if a Lacuna Value is define for that case, something
will happen but I have no way to know what is the value applied (except by
reading the SVG Spec which is not a common practice among authors ;). So an
author have no means to know if this behavior is accurate or not (something
happen... magically) and it as now way to learn from it's code (the try and
fail common way of learning the web). It has to guess the value (and once
again, to few authors read the spec to learn this... they prefer spending
hours of tests to figure this out). My opinion is that if a lacuna value is
used, it should be a way for author to retrieve it from the browser
directly (through the DOM or any other means) without to dig into a spec.

Best,
-- 
Jeremie
.............................
Web : http://jeremie.patonnier.net
Twitter : @JeremiePat <http://twitter.com/JeremiePat>
Received on Thursday, 30 August 2012 14:06:16 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:52 GMT