- From: Doug Schepers <doug@schepers.cc>
- Date: Wed, 28 Sep 2005 02:31:10 -0400
- To: "'Chris Lilley'" <chris@w3.org>, "'www-svg'" <www-svg@w3.org>
Hi, Chris- I'm going to reply a bit out of order here. | You mean a specific test attribute, or a specific element? I mean a specific element. The requiredFeatures attribute [1] says "Only feature strings defined in the Feature String appendix are allowed." According to Appendix O: Feature Strings [2], there is a Feature String for the Basic Text Module [3], or the entire Text Module [4], but not individual elements within that module, such as 'textPath', or 'tref', or 'tspan'. So, is it not possible to test for features at the level of the element, rather than at the level of the module? | DS> Well, this sample doesn't work, but I don't know if I'm | simply doing | DS> something wrong: | | It looks correct to me. You can test if requiredFeatures is itself | implemented: | | <switch> | <text | requiredFeatures='http://www.w3.org/TR/SVG11/feature#textPath' | x="100" y="100">Yes!</text> | <text x="100" y="100">No :(</text> | </switch> I've been testing in FF1.5 (since ASV3 only implements the requiredFeatures strings from SVG1.0, not the revised strings from SVG1.1). FF1.5 does implement 'switch' and 'requiredFeatures', although it incorrectly reports that it implements the full Text Module, rather than only the BasicText Module. I've filed a bug with them [5]. But I can't currently use 'switch' to test for 'textPath' and fall back to a simpler logo, which is what I'd hoped to do. [1] http://www.w3.org/TR/SVG11/struct.html#ConditionalProcessingRequiredFeatures Attribute [2] http://www.w3.org/TR/SVG/feature.html [3] http://www.w3.org/TR/SVG11/feature#BasicText [4] http://www.w3.org/TR/SVG11/feature#Text [5] https://bugzilla.mozilla.org/show_bug.cgi?id=310270 (see test below) Regards- Doug doug . schepers @ vectoreal.com www.vectoreal.com ...for scalable solutions. <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'> <title>'switch' Test: 1.0 vs. 1.1</title> <switch> <text requiredFeatures='org.w3c.svg.static' x='100' y='100'>1.0, Static: Yes</text> <text x='100' y='100'>1.0, Static: No</text> </switch> <switch> <text requiredFeatures='org.w3c.svg.animation' x='100' y='130'>1.0, Animation: Yes</text> <text x='100' y='130'>1.0, Animation: No</text> </switch> <switch> <text requiredFeatures='http://www.w3.org/TR/SVG11/feature#Shape' x='250' y='100'>1.1, Static: Yes</text> <text x='250' y='100'>1.1, Static: No</text> </switch> <switch> <text requiredFeatures='http://www.w3.org/TR/SVG11/feature#Animation' x='250' y='130'>1.1, Animation: Yes</text> <text x='250' y='130'>1.1, Animation: No</text> </switch> <switch> <text requiredFeatures='http://www.w3.org/TR/SVG11/feature#Text' x='250' y='160'>1.1, Text: Yes</text> <text x='250' y='160'>1.1, Text: No</text> </switch> <switch> <text requiredFeatures='http://www.w3.org/TR/SVG11/feature#BasicText' x='250' y='190'>1.1, BasicText: Yes</text> <text x='250' y='190'>1.1, BasicText: No</text> </switch> <switch> <text requiredFeatures='http://www.w3.org/TR/SVG11/feature#textPath' x='250' y='220'>1.1, textPath: Yes</text> <text x='250' y='220'>1.1, textPath: No</text> </switch> </svg>
Received on Wednesday, 28 September 2005 06:31:35 UTC