Given two mode files (css.xml and html.xml) like below and opening a .css file, you'll
get an "delegate-invalid" error: "Invalid delegate: css::PROPERTIES".
The problem is that the css::PROPERTIES is not parsed yet, when the IMPORT of html::TAGS
from css::MAIN uses it in the DELEGATE.
You can fix this in the css.xml file, by first defining "PROPERTIES" and then the
MAIN rules, but it makes no sense, to only handle future rulesets by the "stupid hack
to handle referencing a rule set that is defined later\!" in XModeHandler.
The attached patch removes this restriction and seems to cause no trouble as far as
I can see.
CSS.XML:
<?xml version="1.0"?>
<\!DOCTYPE MODE SYSTEM "xmode.dtd">
<MODE>
<RULES>
<IMPORT DELEGATE="html::TAGS" />
</RULES>
<\!-- we delegate here back from html::TAGS\! -->
<RULES SET="PROPERTIES">
</RULES>
</MODE>
HTML.XML:
<?xml version="1.0"?>
<\!DOCTYPE MODE SYSTEM "xmode.dtd">
<MODE>
<RULES>
</RULES>
<RULES SET="TAGS" DEFAULT="MARKUP" ESCAPE="\">
<SEQ DELEGATE="css::PROPERTIES">foo</SEQ>
<KEYWORDS>
<MARKUP>body</MARKUP>
</KEYWORDS>
</RULES>
</MODE>
foo.css:
body {}
Submitted | blueyed - 2007-06-23 19:20:36 | Assigned | |
---|---|---|---|
Priority | 5 | Labels | text area and syntax packages |
Status | open | Group | None |
Resolution | None |
2007-06-23 19:20:36 blueyed |
Patch against svn trunk |
---|---|
2007-06-23 19:21:20 blueyed |
- **labels**: --> text area and syntax packages |