W3C home > Mailing lists > Public > www-svg@w3.org > November 2005

Re: [SVGMobile12] 5.8.1: interaction of conditional processing and use is unclear

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 2 Nov 2005 16:41:15 -0800
To: www-svg@w3.org
Message-ID: <20051103004115.GA4471@ridley.dbaron.org>
On Wednesday 2005-11-02 17:39 +0100, Chris Lilley wrote:
> 
> On Tuesday, May 3, 2005, 11:09:51 PM, L. wrote:
> 
> LDB> Section 5.8.1 of SVG Tiny 1.2 contains the following sentence:
> LDB> # Similar to the 'display' property, conditional processing attributes
> LDB> # only affect the direct rendering of elements and do not prevent
> LDB> # elements from being successfully referenced by other elements (such as
> LDB> # via a 'use').
> 
> LDB> It is clear from this that conditional processing attributes do not
> LDB> prevent an element from being referenced by a 'use' element (i.e., they
> LDB> do not make the reference invalid per [3]).
> 
> Yes.
> 
> LDB>   However, it is not clear
> LDB> what this sentence implies about the processing of the cloned
> LDB> non-exposed DOM tree attached to the 'use' element.
> 
> The specification says:
> 
> A 'use' element has the same visual effect as if the 'use' element were
> replaced by the following generated content:
> 
>     * In the generated content, the 'use' will be replaced by 'g', where
>     all attributes from the 'use' element except for x, y and xlink:href
>     are transferred to the generated 'g' element. An additional
>     transformation translate(x,y) is appended to the end (i.e.,
>     right-side) of the transform attribute on the generated 'g', where x
>     and y represent the values of the x and y attributes on the 'use'
>     element. The referenced object and its contents are deep-cloned into
>     the generated tree.
> 
> (it then gives an example). So, if there are conditional attributes on
> the referenced element, they will be copied into this shadow tree.
> Similarly, if there are conditional attributes (or display:none) on a
> parent, the attributes on the parent do not have an effect because they
> are not copied.
> 
> 
> 
> LDB>   I see three
> LDB> possibilities:
> 
> LDB>  1. The conditional processing attributes are processed on the
> LDB>     referenced element and all its descendants.
> 
> LDB>  2. The conditional processing attributes are processed on the
> LDB>     descendants of the referenced element but not on the referenced
> LDB>     element itself.
> 
> LDB>  3. The conditional processing attributes are not processed on the
> LDB>     referenced element nor any of its descendants.
> 
> 
> Looking at the specification text quoted above, we can see that the
> answer is
> 
> 4) The conditional processing attributes are copied, and then processed,
> on the copy of referenced element.

This is what I meant by (1).  In my points (1), (2), and (3), I was
essentially referring to whether the conditional processing attributes
on a given element would be ignored or not.  My concern was that it was
unclear whether the definition of svg:use that I quoted implied that
certain conditional processing attributes should be ignored.

> There is no need to recursively apply them on the children. Its the same
> as with the non-inherited property 'display' - it stops the children
> being in the rendering tree anyway.

I wasn't referring to recursively applying the parent's conditional
processing attributes to the children, but rather to applying each
child's conditional processing attributes to itself.

> LDB> It should be clear in section 5.8.1 [1] or in section 5.6 [2] which of
> LDB> these is correct.
> 
> The quoted text above from 5.6 seems to make that clear.

The concern was that what was unclear was that "do not prevent elements
from being successfully referenced by other elements" could be
interpreted to mean more than just referenced:  i.e., that the
conditional processing attributes are ignored.

> LDB>   (I don't think (3) makes much sense, but it actually
> LDB> seems to me to be what the specification currently says.
> 
> We don't think that is the case; "all attributes" is clear.
> 
> As a follow-on from your comment, we clarified the definition of the
> rendering tree to specifically note the cases you mentioned.
> 
> Thanks for your comment, please let us know within two weeks if this
> does not address your comment.

I think it would help if the sentence I originally quoted:

# Similar to the 'display' property, conditional processing attributes
# only affect the direct rendering of elements and do not prevent
# elements from being successfully referenced by other elements (such as
# via a 'use').

were followed by something like:

# However, the conditional processing attributes in the content that
# must appear to be deep-cloned into the generated tree are processed
# normally.

(I'm a little unsure of the terminology to use since the whole concept
of deep cloning is within a "has the same visual effect as if" clause.)

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

Received on Thursday, 3 November 2005 00:44:36 GMT

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