LibreOffice:生成幻灯片的XSLT样式表?
libreoffice文档是一个zip文件,其中包含一些XML文件LibreOffice:生成幻灯片的XSLT样式表?,xslt,slideshow,openoffice.org,libreoffice,Xslt,Slideshow,Openoffice.org,Libreoffice,libreoffice文档是一个zip文件,其中包含一些XML文件 s$ unzip -t test.odp Archive: test.odp testing: mimetype OK testing: Configurations2/statusbar/ OK testing: Configurations2/accelerator/current.xml OK testing: Configurations2/flo
s$ unzip -t test.odp
Archive: test.odp
testing: mimetype OK
testing: Configurations2/statusbar/ OK
testing: Configurations2/accelerator/current.xml OK
testing: Configurations2/floater/ OK
testing: Configurations2/popupmenu/ OK
testing: Configurations2/progressbar/ OK
testing: Configurations2/menubar/ OK
testing: Configurations2/toolbar/ OK
testing: Configurations2/images/Bitmaps/ OK
testing: content.xml OK
testing: styles.xml OK
testing: meta.xml OK
testing: settings.xml OK
testing: META-INF/manifest.xml OK
No errors detected in compressed data of test.odp.
我想使用XSLT(以及xsltproc+元素
)从一个xml文件动态生成一个ODP幻灯片,该文件可能如下所示:
<slideshow>
<slide>
<title>Slide 1</title>
<content>blablablablablablablabal</content>
</slide>
<!-- (....) --->
<slide>
<title>Slide N</title>
<content>blablablablablablablabal</content>
</slide>
</slidesho>
<?xml version="1.0" encoding="UTF-8"?>
<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0">
<office:body>
<office:presentation/>
</office:body>
</office:document-content>
幻灯片1
布拉布拉巴尔
幻灯片N
布拉布拉巴尔
是否存在用于此的XSLT样式表
文件content.xml很复杂,对于一个odp,HelloWorld.odp,什么是可以工作的最小内容?最小有效的演示文件如下所示:
<slideshow>
<slide>
<title>Slide 1</title>
<content>blablablablablablablabal</content>
</slide>
<!-- (....) --->
<slide>
<title>Slide N</title>
<content>blablablablablablablabal</content>
</slide>
</slidesho>
<?xml version="1.0" encoding="UTF-8"?>
<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0">
<office:body>
<office:presentation/>
</office:body>
</office:document-content>
包含一些基本内容的简单文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<office:document-content office:version="1.2"
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0">
<office:body>
<office:presentation>
<draw:page draw:master-page-name="">
<draw:frame presentation:style-name="" svg:width="25.199cm"
svg:height="3.506cm" svg:x="1.4cm" svg:y="0.837cm" presentation:class="title">
<draw:text-box>
<text:p>Title</text:p>
</draw:text-box>
</draw:frame>
<draw:frame presentation:style-name="" svg:width="24.639cm"
svg:height="12.178cm" svg:x="1.4cm" svg:y="4.914cm" presentation:class="subtitle">
<draw:text-box>
<text:p>My Text</text:p>
</draw:text-box>
</draw:frame>
</draw:page>
</office:presentation>
</office:body>
</office:document-content>
标题
我的文字
我建议使用支持ODF的XML编辑器来处理这个问题。为您想要使用的ODF版本提供演示文件可能也会有所帮助。最小有效的演示文件如下所示:
<slideshow>
<slide>
<title>Slide 1</title>
<content>blablablablablablablabal</content>
</slide>
<!-- (....) --->
<slide>
<title>Slide N</title>
<content>blablablablablablablabal</content>
</slide>
</slidesho>
<?xml version="1.0" encoding="UTF-8"?>
<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0">
<office:body>
<office:presentation/>
</office:body>
</office:document-content>
包含一些基本内容的简单文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<office:document-content office:version="1.2"
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0">
<office:body>
<office:presentation>
<draw:page draw:master-page-name="">
<draw:frame presentation:style-name="" svg:width="25.199cm"
svg:height="3.506cm" svg:x="1.4cm" svg:y="0.837cm" presentation:class="title">
<draw:text-box>
<text:p>Title</text:p>
</draw:text-box>
</draw:frame>
<draw:frame presentation:style-name="" svg:width="24.639cm"
svg:height="12.178cm" svg:x="1.4cm" svg:y="4.914cm" presentation:class="subtitle">
<draw:text-box>
<text:p>My Text</text:p>
</draw:text-box>
</draw:frame>
</draw:page>
</office:presentation>
</office:body>
</office:document-content>
标题
我的文字
我建议使用支持ODF的XML编辑器来处理这个问题。对于您想要使用的ODF版本,有一个合适的选项也可能会有所帮助