You are trying to use an attribute value template, I think. Use {
and }
to indicate that $logo
is not a literal value, but a variable or parameter.
<fo:external-graphic src="{$logo}" />
Like this it is even more concise, since you do not have to type xsl:value-of
.
Otherwise, $logo
is stored as literal text content. Read about attribute value templates here.
To illustrate this:
Stylesheet
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:param name="logo">data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QNaRXhpZgAATU0AKgAAAAgADQEPAAIAAAAGAAAAqgEQ</xsl:param>
<fo:external-graphic src="{$logo}"/>
</xsl:template>
</xsl:stylesheet>
Output
<?xml version="1.0" encoding="utf-8"?>
<fo:external-graphic xmlns:fo="http://www.w3.org/1999/XSL/Format" src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QNaRXhpZgAATU0AKgAAAAgADQEPAAIAAAAGAAAAqgEQ"/>