- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我对 XSL 命名空间有以下问题。我使用带有一个 XSL 文件和一个 XML 文件的 FOP 生成 PDF。
这是我的 XML 文件:
<?xml version= "1.0" encoding= "ISO-8859-2"?>
<ReportContent>BLABLA<yt:picture src="pic.png"/></ReportContent>
<?xml version="1.0" encoding="ISO-8859-2"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:yt="http://www.yt.com/text/2"
>
<xsl:template match="/">
<fo:root >
[...]
<fo:flow >
<fo:block> <xsl:apply-templates select='ReportContent'> </xsl:apply-templates></fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
<?xml version= "1.0" encoding= "ISO-8859-2"?>
<ReportContent xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:yt="http://www.yt.com/text/2">
BLABLA<yt:picture src="pic.png"/>
</ReportContent>
最佳答案
@Ricky,是的,必须更改 XML。对不起。它应该是这样的:
<?xml version= "1.0" encoding= "ISO-8859-2"?>
<ReportContent xmlns:yt="http://www.yt.com/text/2">BLABLA<yt:picture src="pic.png"/>
</ReportContent>
关于xml - XSLT 和 XSLFO 命名空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6255152/
我有三个页面序列来处理三种不同类型的页面:封面、目录之前的一系列页面和目录之后的一系列页面。每个页面序列都有一些独特的属性。例如,封面没有页眉和页脚,TOC 之前的页面是小写罗马数字编号,TOC 之后
我是 XSLFO 的新手。我需要根据某些条件为文本条目着色。我用代码片段做的 通过上面的代码片段,我可以将文本的前景色设置为红色。我的问题是如何设置相同的背景颜色。 我可以使用添加背景颜
我有一个从第 1 页开始并继续的布局。现在的问题是它也计算空白页。有没有办法强制停止空白页计数。 当前输出: 第 1 页(非空白)- 第 1 页,共 6 页 第2页(空白) 第 3 页(非空白)- 第
我对 XSL 命名空间有以下问题。我使用带有一个 XSL 文件和一个 XML 文件的 FOP 生成 PDF。 这是我的 XML 文件: BLABLA 这是我的 XSL 文件: [...]
我的第一个问题;我目前正在修复一个图形服务,该服务使用 XSLFO 将我们的语法转换为 FO,并最终将其转换为 PDF。 以前我们一直在 PDF 导出中使用来自网络的 PNG 图形,但这会产生非常难看
是否可以使用 XSLT 和 Java 创建 PDF 文档而不使用 XSLFO? 我问的原因是我可能有一个xml文档,需要使用XSL来创建PDF。我可能没有 XSLFO 文档。 如果没有,如何使用Jav
我是一名优秀的程序员,十分优秀!