Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xi:include in svg #105

Open
pg83 opened this issue Feb 24, 2023 · 1 comment
Open

xi:include in svg #105

pg83 opened this issue Feb 24, 2023 · 1 comment
Assignees

Comments

@pg83
Copy link

pg83 commented Feb 24, 2023

I have following svg, generated by gtk toolkit, for symbolic svg icons:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg version="1.1"
     xmlns="http://www.w3.org/2000/svg"
     xmlns:xi="http://www.w3.org/2001/XInclude"
     width="16"
     height="16">
  <style type="text/css">
    rect,circle,path {
      fill: rgb(0,255,0) !important;
    }
    .warning {
      fill: rgb(255,0,0) !important;
    }
    .error {
      fill: rgb(0,255,0) !important;
    }
    .success {
      fill: rgb(0,255,0) !important;
    }
  </style>
  <xi:include href="data:text/xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBoZWlnaHQ9IjE2cHgiIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2cHgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8cGF0aCBkPSJtIDQgMCBjIC0xLjY0NDUzMSAwIC0zIDEuMzU1NDY5IC0zIDMgdiAxMCBjIDAgMS42NDQ1MzEgMS4zNTU0NjkgMyAzIDMgaCA3IGMgMS42NDQ1MzEgMCAzIC0xLjM1NTQ2OSAzIC0zIHYgLTYuNTg1OTM4IGwgLTIgMiB2IDQuNTg1OTM4IGMgMCAwLjU3MDMxMiAtMC40Mjk2ODggMSAtMSAxIGggLTcgYyAtMC41NzAzMTIgMCAtMSAtMC40Mjk2ODggLTEgLTEgdiAtOCBoIDUuNTg1OTM4IGwgNC4zMTI1IC00LjMxMjUgYyAtMC41MTk1MzIgLTAuNDI5Njg4IC0xLjE3OTY4OCAtMC42ODc1IC0xLjg5ODQzOCAtMC42ODc1IHogbSA5Ljk0OTIxOSAyLjQ2NDg0NCBsIC0yLjUzNTE1NyAyLjUzNTE1NiBoIDAuNTg1OTM4IHYgMC41ODU5MzggbCAyIC0yIHYgLTAuNTg1OTM4IGMgMCAtMC4xODM1OTQgLTAuMDE5NTMxIC0wLjM1OTM3NSAtMC4wNTA3ODEgLTAuNTM1MTU2IHogbSAwIDAiLz4KICAgIDxwYXRoIGQ9Im0gNSAxMiBoIDIgbCA5IC05IGwgLTIgLTIgbCAtOSA5IHogbSAwIDAiLz4KICAgIDxwYXRoIGQ9Im0gNSAxMiBoIDIgbCA5IC05IGwgLTIgLTIgbCAtOSA5IHogbSAwIDAiLz4KPC9zdmc+Cg=="/>
</svg>

Actually I have some questions about this svg:

  1. Is it svg at all? It is rendered correctly by librsvg. (I am not an expert in svg spec).
  2. If it is svg, will you support it in svgren? For now I have some ugly (regexp) workarounds for such svgs.
@igagis igagis self-assigned this Feb 25, 2023
@igagis
Copy link
Member

igagis commented Feb 25, 2023

Hi, thanks for report!

XInclude XML extension is not supported by svgren at the moment, but perhaps it would be good to add it in the future.
SVG spec doesn't say anything about XInclude so, strictly speaking it is not an pure SVG, but XInclude is an XML extension, while SVG is based on XML, so, perhaps this file makes sense.

I'm not sure when I could implement it in svgren, but let's keep this issue open for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants