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

Re: Switch and Feature Strings

From: Chris Lilley <chris@w3.org>
Date: Wed, 28 Sep 2005 14:34:48 +0200
Message-ID: <1554128730.20050928143448@w3.org>
To: "Doug Schepers" <doug@schepers.cc>
Cc: "'www-svg'" <www-svg@w3.org>

On Wednesday, September 28, 2005, 8:31:10 AM, Doug wrote:

DS> Hi, Chris-

DS> I'm going to reply a bit out of order here.

DS> | You mean a specific test attribute, or a specific element?

DS> I mean a specific element.

OK. No, you can't do that.

DS> The requiredFeatures attribute [1] says "Only feature strings defined in the
DS> Feature String appendix are allowed." According to Appendix O: Feature
DS> Strings [2], there is a Feature String for the Basic Text Module [3], or the
DS> entire Text Module [4], but not individual elements within that module, such
DS> as 'textPath', or 'tref', or 'tspan'. 

DS> So, is it not possible to test for features at the level of the element,
DS> rather than at the level of the module?

Right. I should have checked to see whether
http://www.w3.org/TR/SVG11/feature#textPath was a real feature string.
It isn't.


| DS>> Well, this sample doesn't work, but I don't know if I'm 
DS> | simply doing 
| DS>> something wrong:
DS> | 
DS> | It looks correct to me. You can test if requiredFeatures is itself
DS> | implemented:
DS> | 
DS> | <switch>
DS> |    <text 
DS> | requiredFeatures='http://www.w3.org/TR/SVG11/feature#textPath'
DS> |  x="100" y="100">Yes!</text>
DS> |    <text  x="100" y="100">No :(</text>
DS> | </switch>

DS> I've been testing in FF1.5 (since ASV3 only implements the requiredFeatures
DS> strings from SVG1.0, not the revised strings from SVG1.1). FF1.5 does
DS> implement 'switch' and 'requiredFeatures', although it incorrectly reports
DS> that it implements the full Text Module, rather than only the BasicText
DS> Module. I've filed a bug with them [5].

DS> But I can't currently use 'switch' to test for 'textPath' and fall back to a
DS> simpler logo, which is what I'd hoped to do.

Right. If I had noticed that http://www.w3.org/TR/SVG11/feature#textPath
was made up, I would have agreed with you earlier on that.

DS> [1]
DS> http://www.w3.org/TR/SVG11/struct.html#ConditionalProcessingRequiredFeatures
DS> Attribute
DS> [2] http://www.w3.org/TR/SVG/feature.html
DS> [3] http://www.w3.org/TR/SVG11/feature#BasicText
DS> [4] http://www.w3.org/TR/SVG11/feature#Text
DS> [5] https://bugzilla.mozilla.org/show_bug.cgi?id=310270 (see test below)


DS> Regards-
DS> Doug

DS> doug . schepers  @ vectoreal.com
DS> www.vectoreal.com ...for scalable solutions.


DS> <svg xmlns='http://www.w3.org/2000/svg'
DS> xmlns:xlink='http://www.w3.org/1999/xlink'>

DS>    <title>'switch' Test: 1.0 vs. 1.1</title>

DS>    <switch>
DS>       <text requiredFeatures='org.w3c.svg.static' x='100' y='100'>1.0,
DS> Static: Yes</text>
DS>       <text  x='100' y='100'>1.0, Static: No</text>
DS>    </switch>

DS>    <switch>
DS>       <text requiredFeatures='org.w3c.svg.animation' x='100' y='130'>1.0,
DS> Animation: Yes</text>
DS>       <text  x='100' y='130'>1.0, Animation: No</text>
DS>    </switch>



DS>    <switch>
DS>       <text requiredFeatures='http://www.w3.org/TR/SVG11/feature#Shape'
DS> x='250' y='100'>1.1, Static: Yes</text>
DS>       <text  x='250' y='100'>1.1, Static: No</text>
DS>    </switch>

DS>    <switch>
DS>       <text
DS> requiredFeatures='http://www.w3.org/TR/SVG11/feature#Animation'
DS> x='250' y='130'>1.1, Animation: Yes</text>
DS>       <text  x='250' y='130'>1.1, Animation: No</text>
DS>    </switch>

DS>    <switch>
DS>       <text requiredFeatures='http://www.w3.org/TR/SVG11/feature#Text'
DS> x='250' y='160'>1.1, Text: Yes</text>
DS>       <text  x='250' y='160'>1.1, Text: No</text>
DS>    </switch>

DS>    <switch>
DS>       <text
DS> requiredFeatures='http://www.w3.org/TR/SVG11/feature#BasicText'
DS> x='250' y='190'>1.1, BasicText: Yes</text>
DS>       <text  x='250' y='190'>1.1, BasicText: No</text>
DS>    </switch>

DS>    <switch>
DS>       <text
DS> requiredFeatures='http://www.w3.org/TR/SVG11/feature#textPath'
DS> x='250' y='220'>1.1, textPath: Yes</text>
DS>       <text  x='250' y='220'>1.1, textPath: No</text>
DS>    </switch>

DS> </svg>




-- 
 Chris Lilley                    mailto:chris@w3.org
 Chair, W3C SVG Working Group
 W3C Graphics Activity Lead
 Co-Chair, W3C Hypertext CG
Received on Wednesday, 28 September 2005 12:35:07 GMT

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