W3C home > Mailing lists > Public > www-svg@w3.org > February 2006

Re: [SVGMobile12] Question on handling of <script> with xlink:href and child nodes

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Wed, 15 Feb 2006 09:16:35 -0600
Message-ID: <43F345D3.4070108@mit.edu>
To: doug.schepers@vectoreal.com
CC: www-svg@w3.org

Doug Schepers wrote:
> In the first paragraph of 15.2 [1], "A script element may *either* contain
> or point to executable content" (emphasis added). To me, this indicates that
> you can have only one (aan external reference or child content), and I
> believe that that is reinforced by the <choice> block in the schema
> definition. Any child content should be ignored (for purposes of execution)
> if an external reference is specified.

I guess I'm not sure how the last sentence follows from the first two (both of 
which I agree with).  I also agree that this is the behavior we want; I just 
don't see the spec actually specifying it.

> I tested the equivalent behavior in HTML [2] in all browsers I had ready
> access to [2a], and they all ignored the content when an external reference
> was specified

Yep, that's the de-facto standard for HTML <script>.

> I don't necessarily think that this needs to be clarified any further in the
> Spec, but if you feel strongly about it, please feel free to propose some
> wording that would satisfy you.

I think just stating explicitly, at the end of paragraph 1 of section 15.2:

   "If a script element has both an xlink:href attribute and child
    character data, the xlink:href attribute takes precedence and the
    executable content for the script is retrieved from that URI."

or something would satisfy me.

By the way, I assume that a <script> element with non-text children is in error, 
right?  Should UAs still process the text children as a script (as they do in 
HTML), or should they do nothing, or should they go into an error state?

Thanks for looking into this,
-Boris
Received on Wednesday, 15 February 2006 15:16:50 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:53 UTC