You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Standardize namespace prefix syntax ("svg|…" vs. "svg:…"). #21
CSS and XML use different conventions for namespace prefixes. For example, in XML "svg:g" refers to a g element with the svg namespace prefix; in CSS3 the equivalent is "svg|g". D3 uses both conventions, which leads to confusion. For example:
In fact, most current browsers implement the Selectors API Level 1, which does not support namespaces. Level 2 appears the same, strangely.
Still, it might be a good idea to use the same syntax everywhere, although "svg|g" and "xlink|href" is definitely less familiar to folks... And we'd have to have some way of stripping the namespaces from the selectors, as this functionality is not implemented in the standard. Hmm, or not.
We'd have to strip the namespace from the selector, though, which is icky. And I still think "svg|path" is less obvious than "svg:path". So best to keep it as-is for now.
Activity
mbostock commentedon Feb 8, 2011
I think it's only possible to standardize on "|" rather than ":", without interfering with CSS selectors. So you could say:
We'd have to strip the namespace from the selector, though, which is icky. And I still think "svg|path" is less obvious than "svg:path". So best to keep it as-is for now.
Consolidate some duplicate code. Related d3#21.
Consolidate duplicate code. Related d3#21.