Quoting Daniel Carrera <dcarrera@...674...>:
mental@...3... wrote:
<draw:rect draw:style-name="gr1" draw:text-style-name="P1" draw:layer="layout" svg:width="7.62cm" svg:height="5.715cm" svg:x="8.89cm" svg:y="9.525cm">
Ugh, I hope that's not the way it's actually done.
Most SVG attributes have no meaning in isolation; it's the elements they're attached to that give them meaning (by definition -- most SVG attributes live in per-element-type partitions, not the global attribute partition).
But those are not global. That tag only refers to one element, one rectagle. A different rectangle would have different properties.
This has to do with the distinctness of attribute names, not their values. Please see Appendix A of the "Namespaces in XML" recommendation[1] (sections 2 and 3 in particular).
In the expanded name notation offered there, the name of the "real" SVG width attribute (for rectangles only) would be:
<ExpAName name='width' eltype="rect" elns="http://www.w3.org/2000/svg"/>
Whereas your example above "invents" an attribute not described in the SVG specification with the following expanded name:
<ExpAName name='width' ns="http://www.w3.org/2000/svg"/>
In other words, the attribute named "svg:width" isn't meaningful in SVG terms, and probably shouldn't have been put in the SVG namespace since the SVG standard does not define it.
I am hoping your example represented a misunderstanding of the OpenDocument specification, rather than a pervasive misunderstanding of XML namespaces in OpenDocument itself[2]...
-mental
[1] http://www.w3.org/TR/REC-xml-names/#ns-breakdown
Admittedly, the appendices aren't normative, but it offers the conceptual basis for the treatment of attributes in section 5.2 of the specification, which is normative.
[2] Or I hope that my understanding of XML namespaces is incorrect. Otherwise, I'm concerned that if OpenDocument uses namespaces in non-conformant ways and becomes widely adopted, it'll force weird XML processing hacks on everybody, not to mention setting a very bad example for standards-compliance.