This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5311 - 'foreignObject' as a child of any container element
Summary: 'foreignObject' as a child of any container element
Status: RESOLVED FIXED
Alias: None
Product: SVG
Classification: Unclassified
Component: DTD (show other bugs)
Version: SVG 1.1 Full
Hardware: All All
: P2 normal
Target Milestone: Test Suite
Assignee: Doug Schepers
QA Contact: SVG Public List
URL: http://www.peepo.co.uk
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-10 10:52 UTC by j.chetwynd
Modified: 2009-05-31 20:08 UTC (History)
3 users (show)

See Also:


Attachments

Description j.chetwynd 2007-12-10 10:52:34 UTC
there are clear practical reasons why it is sensible to use switch as little as necessary.
in this case to play a sound file and present text in a single language:

  <switch>
<g systemLanguage="nl">
 <text x="130" y="65">radio</text>
  <foreignObject class="audio" width="1" height="1" >
    <object xmlns="http://www.w3.org/1999/xhtml" data="sound/nl/radio.mp3" />
  </foreignObject>
</g>
...
  </switch>

This could be separated as two separate switches, but that makes for harder maintenance and poor code.

In SVGT12 'foreignObject' can be a child of any container element, which is more useful and that is what Opera and Firefox allows.
Comment 1 Cameron McCormack 2009-05-30 12:21:46 UTC
Hi Jonathan.

Indeed it shouldn't be necessary to use a <switch> in such cases.  This has been fixed in a recently published erratum (http://www.w3.org/2003/01/REC-SVG11-20030114-errata#allow-foreignobject-outside-switch) and has been folded in to the Editor's Draft of SVG 1.1 Second Edition (http://dev.w3.org/SVG/profiles/1.1F2/).

Doug, can you mark this bug resolved?

Comment 2 j.chetwynd 2009-05-31 07:35:13 UTC
http://www.w3.org/TR/SMIL3/smil-content.html#adef-allowReorder
allowReorder="yes"

http://lists.w3.org/Archives/Public/www-archive/2009Mar/0065.html
On being humane

for reasons of accessibility does it not remain correct to state that switch should be used, else the suthors order of languages will be preferred over the users?
Comment 3 Cameron McCormack 2009-05-31 08:36:48 UTC
Hi Jonathan.

(In reply to comment #2)
> http://www.w3.org/TR/SMIL3/smil-content.html#adef-allowReorder
> allowReorder="yes"
> 
> http://lists.w3.org/Archives/Public/www-archive/2009Mar/0065.html
> On being humane
> 
> for reasons of accessibility does it not remain correct to state that switch
> should be used, else the suthors order of languages will be preferred over the
> users?

I don't think that is correct.  Without <switch>, there is no selection among a set of languages.  You can only state that a subtree will not be processed if a given language is not one of the user's preferred languages.

The issue of allowReorder="" in SVG seems to me to be a separate one from this bug, which is about where <foreignObject> is allowed by the DTD.
Comment 4 j.chetwynd 2009-05-31 10:00:01 UTC
#3 Cameron,

I remain confused doesn't this:

"You can only state that a subtree will not be processed if a
given language is not one of the user's preferred languages."

mean that the user gets 'no' default information in this case?
that being the reason for using a switch...

Comment 5 Doug Schepers 2009-05-31 17:25:13 UTC
(In reply to comment #4)
> #3 Cameron,
> 
> I remain confused doesn't this:
> 
> "You can only state that a subtree will not be processed if a
> given language is not one of the user's preferred languages."
> 
> mean that the user gets 'no' default information in this case?
> that being the reason for using a switch...

This bug was about allowing <foreignObject> as a child of any container element.  That has been resolved, and you can use <foreignObject> anywhere you can use any graphical element, not just as a child of <switch>.  Therefore, questions or comments about <switch> are orthogonal.

If you have questions about the functionality of <switch>, you should be asking them on the mailing lists, not in a bug report.  I gather that you are suggesting a Best Practice, which is another matter entirely.
Comment 6 j.chetwynd 2009-05-31 20:08:20 UTC
#5 Doug, should you feel so disposed, you are encouraged to take the issues raised forward elsewhere.