无法识别未显示uri的XSL-FO外部图形

时间:2016-01-15 10:16:29

标签: xslt xslt-1.0 xslt-2.0 xsl-fo

问题

使用fo:external-graphic标记加载图片。我有一个参数与图像的base64值。

<xsl:param name="Name">data:image/jpg;base64,/9j/4AAQSkZJRgA..</xsl:param>

我尝试使用

加载图片
<fo:external-graphic src="{$Name}" width="40mm" height="18.25mm" >
                        </fo:external-graphic>

错误

我收到错误 uri无法识别 enter image description here

XSLT

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"  xmlns:m="http://www.ibm.com/maximo"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format" >
  <xsl:output method="xml" version="1.0" encoding="UTF-8"  indent="yes" />



  <xsl:param name="Name">data:image/jpg;base64,/9j/dddds....ghP/Z</xsl:param>
  <xsl:template match="/">
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

      <fo:layout-master-set>
        <fo:simple-page-master master-name="hello"
                    page-height="11in"  page-width="8.5in" margin-top="1in"
                    margin-bottom="1in" margin-left="1in" margin-right="1in">
          <fo:region-body margin-top="1in" margin-bottom=".5in"/>
        </fo:simple-page-master>
      </fo:layout-master-set>

      <fo:page-sequence master-reference="hello">
        <fo:flow flow-name="xsl-region-body">
          <fo:block font-size="18pt" text-align="center" font-weight="bold">
            Hello World!

            <fo:external-graphic src="{$Name}"/>
          </fo:block>
        </fo:flow>
      </fo:page-sequence>

    </fo:root>
  </xsl:template>
</xsl:stylesheet>

我正在使用Fonet.dll

0 个答案:

没有答案