1
我想將一些簡單的格式應用於文本,但它不工作。示例如下,並通過RNG驗證程序。我正在使用Apache OpenOffice3.4和ODT1.2平面文檔。ODT和OpenOffice.org:將格式應用於文本下的文本:span使用文本:class-names屬性?
元素可以具有文本:class-names屬性;並且該屬性指定了以空格分隔的文本樣式名稱列表。
它看起來對我來說......這樣做的正確方法是什麼?
<?xml version="1.0" encoding="UTF-8"?>
<office:document xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
<office:styles>
<style:style style:family="text" style:name="BOLD">
<style:text-properties fo:font-weight="bold"/>
</style:style>
</office:styles>
<office:body>
<office:text>
<text:p>Plain text here; <text:span text:class-names="BOLD">this is supposed to be bold text;</text:span></text:p>
</office:text>
</office:body>
</office:document>