【问题标题】:Generating a file path with double quotes in XSL-FO在 XSL-FO 中生成带双引号的文件路径
【发布时间】:2010-02-19 10:50:52
【问题描述】:

我在表单中有一个 XML

<root>
<image> C:/images/image1.jpg </image>
</root>

现在我需要在我的 XSL-FO 中使用此路径 (C:/images/image1.jpg),使其看起来像这样,

<fo:external-graphic src="C:/images/image1.jpg" />

如何在我的 XSL-FO 中使用来自 XML 的路径来实现这一点??

【问题讨论】:

    标签: xml xslt xsl-fo


    【解决方案1】:
    <xsl:template match="image">
      <fo:external-graphic src="{normalize-space()}" />
    </xsl:template>
    

    【讨论】:

    • 我认为你的例子可能会丢失一些东西。 Tomalek 的代码产生所示的输出。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多