Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
4.6.0
-
None
-
Visual Studio 2008, Windows Vista
Description
QGraphicsSvgItem can't seem to load referenced SVG documents. When I try to load blue.svg (after unzipping the attached svg_example.zip) in the SVG Viewer sample, I get this on stdout:
link ed.svg#REDBOX hasn't been detected!
Batik 1.7 renders the pair of SVGs correctly, as seen in correct.png. Viewer output is in incorrect.png.
Stepping through the library gets me to createUseNode() in qsvghandler.cpp:3256. The first line of this function removes the first character of a xlink:href attribute, I guess assuming all links will be purely document-local and start with #.
Following the documentation trail:
http://qt.nokia.com/doc/4.6/paintsystem-images.html
Supports the static features of SVG Tiny 1.2:
http://www.w3.org/Graphics/SVG/feature/1.2/#SVG-static
XlinkAttribute is a static feature:
http://www.w3.org/Graphics/SVG/feature/1.2/#XlinkAttribute
Points you to the Xlink Attribute Module:
http://www.w3.org/TR/SVGMobile12/linking.html#xlink-att-mod
Section 14.1.4: Reference restrictions:
http://www.w3.org/TR/SVGMobile12/linking.html#ReferenceRestrictions
Class B reference on a 'use' element is allowed, subject to some restrictions that don't come into play for the attached SVGs.