On Tue, 23 Oct 2012 00:48:11 +0200, jamesd <[email protected]> wrote:

> I am trying to make sense out of the xml:id tag and its usage as an  
> attribute definer. Reading the web doesn't offer anything but  
> contradictions. It seems that some want it to go away, leaving no way to  
> specify a common attributes, and just have a unique id be used.
>
> This leaves a non-politically correct person, like myself perplexed. If  
> several SVG or CSS components have a common attribute, how do I group  
> these elements by attribute? It would appear that the HTML name is being  
> deprecated, I assumed that xml:id would be its replacement.

'name' and 'xml:id' are not the same and were never meant to be the same,  
'xml:id' is essentially the 'id' attribute but for any xml markup language.

> I like to think of ethnicity in this regard. When I am asked my ID, I  
> have a name. I also check the ethnicity of white. So, I have two  
> distinct identifying characteristics.
>
> In my example for utilizing a singular display canvas for tablets and  
> HDTV screens, I have grouped several <g> elements with unique ids, but  
> with the same common denominator xml:id. This allows the display of the  
> elements to be controlled by id and a common xml:id attribute at the  
> same time. Makes sense to me, but others disagree, such as Opera.
>
> If xml:id is not meant to be used in this way, could someone try to  
> explain how to keep the two identifiers, without using xml:id and  
> without a complex javascript routine? Simplicity is best for me.

 From SVG Tiny 1.2 (http://www.w3.org/TR/SVGTiny12/struct.html#idAttrs):
[[ Because they are intended for different environments, the 'id' and  
'xml:id' attributes must not be used together on SVG elements in the same  
document. Such documents are not conforming SVG 1.2 Tiny content, and the  
behavior is not specified. ]]

> Example file works with Firefox, Chrome and IE, not with Opera.

Only Opera supports xml:id AFAIK- all the other browsers don't treat  
xml:id as an id attribute.

I think xml:id is a historical mistake, so I'd strongly recommend you to  
avoid using that.

Also see e.g https://bugs.webkit.org/show_bug.cgi?id=16505.

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed


------------------------------------

-----
To unsubscribe send a message to: [email protected]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
----Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to