Closed
Bug 722097
Opened 13 years ago
Closed 11 years ago
Implement SVGLangSpace interface
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
DUPLICATE
of bug 824222
People
(Reporter: Jeremie, Unassigned)
References
()
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
bug #721920 propose to implement the lang attribute for SVG element in the same way as for HTML.
Is it possible to consider implementing the SVGLangSpace interface as well?
Comment 1•13 years ago
|
||
I probably won't fix this at the same time, but it's good to have the bug filed. Thanks.
Comment 2•13 years ago
|
||
Robert, there were some issues (forget the details) talked about in the SVG WG regarding this interface. I'm not sure we should implement it until those are revisited.
Comment 3•13 years ago
|
||
It's just a wrapper round setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", <value>) and getAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space")
In fact it isolates you from whether SVG2 has xml:lang or lang as if you use this interface and we move from xml:lang to lang then we can update the implementation underneath.
Comment 4•13 years ago
|
||
Attachment #592536 -
Flags: review?(jwatt)
Comment 5•13 years ago
|
||
We could make it in the spec so that .xmllang returns xml:lang="" or lang="". OTOH, I don't know that anyone in the world is using .xmllang. I think in the future we should have a .lang, just like HTML does. .xmlspace is probably less useful than xml:lang="", especially if we are moving away from it towards using the white-space property to control SVG text white space in SVG2.
Comment 6•13 years ago
|
||
I could remove xmlspace from the IDL and implementation and change xmllang in the IDL to lang.
Setting the lang property would set the lang attribute in the null namespace.
Getting the lang property would get the lang attribute in the null namespace.
Would that suit you both?
Comment 7•13 years ago
|
||
I'm not sure yet.
A couple of things worth noting. In HTML 'lang' is on the HTMLElement interface, and we should probably be consistent with HTML (maybe that means adding 'xmllang' to HTML though, since it supports 'xml:lang').
bz has been lamenting the fact that SVG IDL uses multiple inheritance, and how that's going to block the "replace quick-stubs" perf improvements he has planned for HTML.
Comment 8•13 years ago
|
||
lang is not relevant for animation elements for instance so it does make sense to have it like it is from a logic perspective.
Comment 9•13 years ago
|
||
(In reply to Jonathan Watt [:jwatt] from comment #7)
> bz has been lamenting the fact that SVG IDL uses multiple inheritance, and
> how that's going to block the "replace quick-stubs" perf improvements he has
> planned for HTML.
This will be fixed when I get around to rewriting SVG's IDL in Web IDL, where multiple inheritance is not possible. :)
Comment 10•13 years ago
|
||
And somehow I don't expect the HTML folks to like the idea of adding an xmllang property.
The spec does allow xml:lang="" to be placed on any SVG element. (Which makes sense if you think of xml:lang="" as being something completely orthogonal to SVG.) HTML allows lang="" on any HTML element.
Regarding whether it makes sense to allow lang="" on animation elements, you could have markup like:
<svg ...>
<animate lang="en" ...>
<title>wibble wobble</title>
</animate>
</svg>
I think in the end I want to see the spec just have something like
interface SVGElement : Element {
attribute DOMString lang;
};
and not have anything for xml:space="". I guess if we're implementing lang="" on SVG elements before the spec has been changed, then we could just add this attribute now too (instead of SVGLangSpace).
Updated•13 years ago
|
Attachment #592536 -
Flags: review?(jwatt)
Updated•13 years ago
|
Assignee: longsonr → nobody
Comment 11•13 years ago
|
||
Yeah, that makes sense to me.
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•