To show images in Xopus Island I use <img src="..."/> in XSL.

To show SVG images I use: <xsl:value-of select="document('...')"/>, but this throws the following error:

Failed to compile stylesheet: The document() function in XSLT is only supported in Internet Explorer.

Is there any other alternative to show SVG images in Xopus?

  • Great to see this question is resloved within a couple of hours with two answers. The question is off topic for this site though, see tridion.stackexchange.com/help/on-topic. The question is tagged with XSLT which in this site is for questions about Tridion XSLT templates the XSLT mediator for Tridion.
    – Jan H
    Commented Sep 9, 2015 at 7:25
  • There is an active Xopus forum on community.sdl.com/developers/xopus_developers that looks like the best place for Xopus questions. There are a few questions on stackoverflow.com/search?q=xopus as well, but since 2015 QA has moved to community.sdl.com.
    – Jan H
    Commented Sep 10, 2015 at 7:07

2 Answers 2


While the document() function can be made to work in other browsers than Internet Explorer, within Xopus it is only supported in Internet Explorer. So that message is correct.

The best solution is indeed to use external SVG sources. Which, if I read your message, you are already doing. So it is not clear to me what you are using the document() function for. Could you explain?

  • Yes my intend was to keep files separated, the main document with it's XSD edited in Xopus, and the image in SVG format without XSD only shown in Xopus Island as an image not editable. I directly include <svg>...</svg> inline in html output now. I was'nt aware of <img src="your.svg"/> My intend was also to include tables in html format to show them in Xopus Island without using Xopus editing capacities. I will try <img src="mytable.html"/> Thank you ! Rémi Commented Sep 8, 2015 at 15:42

Yes there is, though the message is incorrect 1. Typically, security settings prevent the document function to work in the browser, but it can work (I believe Sarissa removes this restriction with a workaround) if you change the browser settings.

That said, you will still need a way to show the SVG. You are currently using xsl:value-of, which will return the value of the document, as opposed to a node tree copy, so even if the document function worked, it would still not give the result you want.

Your best guess is to not inline your svg. As shown in this SO post on using external SVG sources, it is your best bet to use the same approach you already use for other images, use the <img src="{get/url/from/somewhere}" />.

1 As Fredrik Geers (from SDL, Xopus) said in his answer, the message is correct insofar it means that Xopus Island does not support this. He also states that indeed, you can workaround this, but these workarounds are not presently recognized by Xopus.

  • Thank you ! Rémi Commented Sep 8, 2015 at 15:23
  • @RémiKoutchérawy, if it helped, feel free to accept the answer by clicking the checkmark on the left of it, and to upvote (though upvotes will only have effect once you have enough reputation). If it didn't help, let me know where you are stick ;).
    – Abel
    Commented Sep 8, 2015 at 15:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.