1

I am really new to plone and diazo so forgive me if the answer to question is too obvious.

I was asked to create a diazo theme for a website running on plone. Right now i'm at a state where i where i think the theme is reasonably complete(without rules) and i uploded it via .zip to the plone planing to create the rules in plones rules editor. Made a handful of them and hit the preview button to see whether what i am doing is even repotely going into the right direction but hat it showed was this error.

Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module plone.app.theming.browser.mapper, line 245, in getFrame
  Module lxml.etree, line 567, in lxml.etree.XSLT.__call__ (src/lxml/lxml.etree.c:124426)
XSLTApplyError: xsl:comment : '--' or ending '-' not allowed in comment

After spending quiet some time with a well known search engine i'm still uncertain if that is a mistake i made in the rules.xml or something the websites admin has to look at.

Any and all help will be appreciated.

Edit version information:

Plone 4.3 (4305)
CMF 2.2.7
Zope 2.13.19
Python 2.7.3 (default, Feb 4 2013, 09:04:32) [GCC 4.4.6 20120305 (Red Hat 4.4.6-4)]
PIL 1.7.8 (Pillow)

Edit rules so far

<?xml version="1.0" encoding="UTF-8"?>
<rules
    xmlns="http://namespaces.plone.org/diazo"
    xmlns:css="http://namespaces.plone.org/diazo/css"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <!-- Apply the following rules to standard Plone pages -->
    <rules css:if-content="#visual-portal-wrapper">

        <theme href="theme.html" />

        <!-- Replace title with Plone's page title  -->
        <replace css:theme="html head title" css:content="html head title" />

        <!-- Copy base tag and script tags from Plone -->
        <after css:theme-children="html head" css:content="html head base" />
        <after css:theme-children="html head" css:content="html head script" />

        <!-- Insert your own rules here -->

        <!-- Replace logo with Plone's logo  -->
        <replace css:theme-children="a#brand img" css:content-children="a#portal-logo img"/>

        <!-- Replace top navigation with Plone's top navigation  -->
        <replace css:theme-children="navbar" css:content-children="ul#portal-globalnav"/>

        <!-- Replace search with Plone's search  -->
        <replace css:theme-children="input.search-query" css:content-children="input#searchGadget"/>

        <!-- Replace top navigation with Plone's top navigation  -->
        <replace css:theme-children="documentDescription" css:content-children="documentDescription"/>


    </rules>

</rules>

I didn't create that file myself. It was automatically created by plone upon uploading the .zip without a rules.xml in it. The four(that's how far I got until I first stumbled over the error) rules were created by plones editor. At first I thought i messed up the comments somehow, seeing that is states "--" and "-" in the error message, but i couldn't find where and DW didn't point out any syntac errors either when opening the file in there.

Edit Solution:

Typo found in the theme.html . One comment ended on "->" instead of "-->" which i never new works for html in the first place.

4

1 回答 1

3

某处有一些格式不正确的 XML。它似乎不在您的规则文件中。检查主题文件。

Diazo 处理的每个部分都使用 XML 和 XSLT 处理器完成,这些处理器依赖于格式良好的 XML(或 XSLT)的输入。这与规则文件的主题和内容一样。

来自 Plone 的内容应该是好的 XML(HTML 子集)。您的规则文件看起来不错。这使得主题文件成为问题源的候选者。

于 2013-06-23T18:05:46.413 回答