[英]Why is it not OK to put a xsl:value-of into a fo:block?
I have the following XSL file:我有以下 XSL 文件:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output media-type="text" omit-xml-declaration="yes"/>
<xsl:template match="root/branch">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="29.7cm"
page-width="21cm"
margin-top="1cm"
margin-bottom="2cm"
margin-left="2.5cm"
margin-right="2.5cm">
<fo:region-body margin-top="3cm"/>
<fo:region-before extent="3cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="12pt"
font-family="sans-serif"
line-height="15pt"
space-after.optimum="3pt"
text-align="justify">
<xsl:value-of select="branch/greenLeave"/>
<xsl:value-of select="branch/yellowLeave"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
When I open it in IDEA IntelliJ, I get the following error message:当我在 IDEA IntelliJ 中打开它时,我收到以下错误消息:
Does anybody know what is wrong here?有人知道这里有什么问题吗? I cannot find a plausible explanation.我找不到合理的解释。
Seems like the XSD for FOP which I downloaded from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/fop/src/foschema/fop.xsd lacked support for nested XSL-T statements. Seems like the XSD for FOP which I downloaded from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/fop/src/foschema/fop.xsd lacked support for nested XSL-T statements.
As a workaround, I manually added a作为一种解决方法,我手动添加了一个
<any processContent="skip"/>
to that XSD file at the right place.到正确位置的那个 XSD 文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.