xml - 从另一个 RML 文件中引用 RML 部分
问题描述
我想从另一个文件中引用 RML 部分来创建分隔符。
我将以下静态模板部分存储在文件中(foo.rml / foo.xml)。
<template title="foo" author="geof" allowSplitting="20">
<pageTemplate id="main">
<frame id="first" x1="2cm" y1="3cm" width="17cm" height="23cm"/>
</pageTemplate>
</template>
我想在 RML 文档文件中包含或引用
<document filename="foo.pdf">
<!-- Here I want to reference/include the template stored in another file (foo.rml/foo.xml)-->
<!-- Something like import or include or paste. -->
</stylesheet><!-- Stylesheet tags here --></stylesheet>
<story><!-- Story tags and content here --></story>
</document>
有没有办法做到这一点?我正在使用 reportlab 库并使用 rml2pdf 将 rml 文档转换为 pdf 文档。
解决方案
推荐阅读
- bison - 使用野牛时 yacc 嵌入操作的问题
- r - 在 R 中使用粘贴动态创建变量名称和值
- ruby-on-rails - rails http 响应 Donwload excel 文件
- go - 在一个 goroutine 中将项目添加到通道并在另一个 goroutine 中处理
- python - 网页抓取,如何接受这个谷歌窗口
- bash - 在 bash 中,如何在变量中捕获一些输出,让休息到达标准输出
- asp.net-core - asp.net core API 条件 URL 重写到不同域
- python - Python Pandas Dataframe Groupby Sum 问题
- java - AWS S3 Java SDK - 通过销售伙伴 (SP) API url 的流下载加密的 GetObject
- ruby-on-rails - 从时间数组中排除时间 - 轨道