Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Saved your code that you put here as an SVG and I received this: </p> <blockquote> <p>This page contains the following errors:</p> <p>error on line 1 at column 6: XML declaration allowed only at the start of the document Below is a rendering of the page up to the first error.</p> </blockquote> <p>I fixed it by simply deleting the first line of code you provided.</p> <pre><code> &lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" viewport-fill="red"&gt; &lt;defs&gt; &lt;!-- My div --&gt; &lt;symbol id="my_div" viewBox="0 0 50 50" &gt; &lt;foreignObject x="0" y="0" width="50" height="50" fill="red"&gt; &lt;body xmlns="http://www.w3.org/1999/xhtml" style="background:none transparent;" width="50" height="50"&gt; &lt;div&gt;MY DIV&lt;/div&gt; &lt;/body&gt; &lt;/foreignObject&gt; &lt;/symbol&gt; &lt;!-- Airport Symbol --&gt; &lt;symbol id="airport" viewBox="0 0 10 10"&gt; &lt;path d="M 9.2,5 C 9.2,4.5 9.8,3.2 10,3 L 9,3 L 8,4 L 5.5,4 L 8,0 L 6,0 L 3,4 C 2,4 1,4.2 0.5,4.5 C 0,5 0,5 0.5,5.5 C 1,5.8 2,6 3,6 L 6,10 L 8,10 L 5.5,6 L 7.8,6 L 9,7 L 10,7 C 9.8,6.8 9.2,5.5 9.2,5 z "/&gt; &lt;/symbol&gt; &lt;/defs&gt; &lt;g fill="red" transform="scale(18)" &gt; &lt;g transform="translate(0, 0)"&gt; &lt;use xlink:href="#my_div" width="5" height="5"/&gt; &lt;/g&gt; &lt;g id="demo" transform="translate(0, 0)"&gt; &lt;use xlink:href="#airport" x="10" y="0" width="5" height="5"/&gt; &lt;/g&gt; &lt;/g&gt; &lt;/svg&gt; </code></pre> <p>This worked in Chrome for me, (mac)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload