【问题标题】:styling content.xml in an openoffice/libreoffice document在 openoffice/libreoffice 文档中设置 content.xml 样式
【发布时间】:2013-01-01 11:40:23
【问题描述】:

这是我上一个问题LibreOffice: a XSLT stylesheet to generate a slideshow?的下一集

我现在正在使用 XSLT 生成 content.xml。

可以在 libreoffice/content.xml 中在 text:p 中添加 inline 样式。 xhtml:span 之类的东西(见下文)?

  <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>My name is <xhtml:span style="color:red;"><xsl:value-of select="name"/></xhtml:span></text:p>
      </draw:text-box>
    </draw:frame>
  </draw:page>

或者我需要在别处声明所有命名样式吗?

【问题讨论】:

    标签: xml styles openoffice.org libreoffice


    【解决方案1】:

    您可以在

    中使用 ,是的,您必须在别处声明所有命名样式。

    当然需要一个结束标签。您需要使用正确的样式属性,这很重要。 元素也不会飞。我认为您需要检查 ODF 对字段的支持。

    元素的唯一属性是最多一个 text:class-names 和一个 text:style-name。

    text:style-name 值是在别处定义的样式名称。 text:class-names 属性是空格分隔的样式名称的值。

    可以在 ODF 规范中找到更多详细信息。我推荐 Office 应用程序的 OpenDocument 格式 (OpenDocument) 版本 1.2,第 1 部分。您可以在 http://docs.oasis-open.org/office/v1.2/os/ 找到所有内容,包括完整的 Zip。您还可以通过在段落中的部分运行上设置一些属性来获取更多信息,并查看 content.xml 是什么样的以及最终被引用的样式是在哪里定义的。

    【讨论】:

      猜你喜欢
      • 2017-04-14
      • 1970-01-01
      • 1970-01-01
      • 2015-02-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多