Situation:
My customer wants me to put a SVG drawing within his page; so my part is reduced to
<svg ..>
..
</svg>
and
<script>..</script>
I want (need) to add some private (ie. no std. attr) information to the drawing (i call it charly now): this one (this two variants) worke fine with firefox:
<svg id='myHorribleDrawing' xmlns='http://www.w3.org/2000/svg' ....>
...
<g id='000000000230865' charly ='xxx' ... >
<charlydata charly ='xxx '/>
<use x='304.0' y='74.5' width='30' height='30' xlink:href='#path' />
</g>
...
</svg>
both work fine - just foist the attrib or a unknow element. Firefox (for example) eats that, as if nothing was wrong.
But i am sure that this is - just - wrong.
My resaerch brought me to modifiying DTD (hu, hard stuff) but I am not the owner of the DOCTYPE! so an other try
Try number two was to declare an private namspace (mycharly)
<svg xmlns='http://www.w3.org/2000/svg' version='1.2'....
xmlns:mycharly='http://www.example.org/charles'>
...
<g ...>
<mycharly:charlydata charly='blind'>
(and close it all)
Workes fine, browser takes it without any protest. the only difference is, that jQuery does not like the 'mycharly:charlydata' selector ...
I was serching for hours, what the correct way to do this would be, and I am ending up with the idea, that there is no way, or do I only 'not see the wood because of all the trees'? (an austrian saying)