You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an issue that will probably disappear by itself when moving to SVG 2. I think that it can still be useful to document it in the meantime.
From what I understand, in SVG 1.1, one should use xlink:href for the <use> tag, but in SVG 2, it has been replaced by href. Some people ( https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/href ) argue that one could use both just in case, but I feel that this solution would not be in the spirit of TyXML (as such a document would not strictly follow neither SVG 1.1 nor SVG 2).
Currently in TyXML, there are two functions a_href and a_xlink_href. The a_xlink_href function produces xlink:href and is marked as depreciated, whilst a_href produces href.
The issue is that the doctype that TyXML produces indicates SVG 1.1:
<!DOCTYPEsvg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svgxmlns="http://www.w3.org/2000/svg"xmlns:xlink="http://www.w3.org/1999/xlink">
If I open such an SVG file with Inkscape, by default (there might be an option to change this behaviour), the <use href> are simply ignored, which is frustrating.
In order to generated SVG files that can be opened in Inkscape, I have to use a_xlink_href instead of a_href. In practise I just do the following to just use a_href without thinking too much about it:
letmoduleSvg = structincludeSvglet a_href = a_xlink_href
end
The generated files are then understood by Inkscape. (And I get warning messages about a_xlink_href being depreciated.)
In Tyxml_js, there is no generated doctype when adding the SVG within the DOM using Html.svg, so Firefox assumes that we are in SVG 2 and xlink:href won't be recognised: for the <use> tags to work, I need to use href instead.
It's a bit frustrating. Now that I understand the issue, I can work around this, but it took me some time. This issue will solve itself when TyXML will follow SVG 2, but I feel that a_xlink_href shouldn't be marked as depreciated in the meantime.
The text was updated successfully, but these errors were encountered:
This is an issue that will probably disappear by itself when moving to SVG 2. I think that it can still be useful to document it in the meantime.
From what I understand, in SVG 1.1, one should use
xlink:href
for the<use>
tag, but in SVG 2, it has been replaced byhref
. Some people ( https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/href ) argue that one could use both just in case, but I feel that this solution would not be in the spirit of TyXML (as such a document would not strictly follow neither SVG 1.1 nor SVG 2).Currently in TyXML, there are two functions
a_href
anda_xlink_href
. Thea_xlink_href
function producesxlink:href
and is marked as depreciated, whilsta_href
produceshref
.The issue is that the doctype that TyXML produces indicates SVG 1.1:
The link http://www.w3.org/2000/svg seems to be mutable (so I guess that it currently means SVG 2?).
If I open such an SVG file with Inkscape, by default (there might be an option to change this behaviour), the
<use href>
are simply ignored, which is frustrating.In order to generated SVG files that can be opened in Inkscape, I have to use
a_xlink_href
instead ofa_href
. In practise I just do the following to just usea_href
without thinking too much about it:The generated files are then understood by Inkscape. (And I get warning messages about
a_xlink_href
being depreciated.)In
Tyxml_js
, there is no generated doctype when adding the SVG within the DOM usingHtml.svg
, so Firefox assumes that we are in SVG 2 andxlink:href
won't be recognised: for the<use>
tags to work, I need to usehref
instead.It's a bit frustrating. Now that I understand the issue, I can work around this, but it took me some time. This issue will solve itself when TyXML will follow SVG 2, but I feel that
a_xlink_href
shouldn't be marked as depreciated in the meantime.The text was updated successfully, but these errors were encountered: