我一段时间以来一直在研究这个项目,而且卡住了。我试图通过ibex PDF创建器使用XSL样式表转换XML以生成PDF文件。似乎我没有解决这个错误: " server:xml异常在第1行第39位和第34行的根级别存在无效数据;
<?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"
xmlns:main="http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns="http://rep.oio.dk/ubl/xml/schemas/0p71/pie/"
xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:strip-space elements='*'/>
<xsl:template match="Invoice">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="page" margin='2.5cm'>
<fo:region-body region-name="body" />
</fo:simple-page-master>
</fo:layout-master-set>
<xsl:apply-templates select="Invoice"/>
</fo:root>
</xsl:template>
<xsl:template match="Invoice">
<fo:page-sequence master-reference="page">
<fo:flow flow-name="body">
<fo:block font='bold 14pt helvetica'>
<xsl:value-of select="@title"/>
</fo:block>
<xsl:apply-templates select="com:Note"/>
</fo:flow>
</fo:page-sequence>
</xsl:template>
<xsl:template match="com:Note">
<fo:block font='bold 12pt helvetica'>
<xsl:value-of select="@title"/>
</fo:block>
<xsl:apply-templates select="para"/>
</xsl:template>
<xsl:template match="para">
<fo:block font='10pt helvetica'>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
</xsl:stylesheet>