2014/1/24 Martin Owens <doctormo@...400...>:
I've been trying to read up on image tags special case, where a href
will start with data: and then proceed to have data. Since I want to
merge most of the sp-image logic into Inkscape::URI I need to know if
data uris are something the svg spec says should only be available to
image tags... or should be available to any href.
Our end goal here should be to decode the binary data in the data URI
when the XML document is parsed, so that we don't end up redundantly
storing both the binary and its base64-encoded form, as is the case at
present. Naturally this requires some support in the XML tree.
Including image-related code in the Inkscape::URI class is not a good
idea; data URI decoding, yes; image handling, no. The data URI can
contain arbitrary files, not just images.
The svg 1.1 spec says nothing about data uris that I could find. Any
Theoretically, a data URI is just like any other URI, and should be
able to appear anywhere where a normal URI would be accepted. However,
I'm not sure how the browser support looks on that front.