Hi,

in cont-en.xml there are two places that are unusal


1) cd:inherit with optional="no":


  <cd:command name="setupbodyfontenvironment" file="font-ini.tex" category="font
s">
    <cd:sequence>
      <cd:string value="setupbodyfontenvironment"/>
    </cd:sequence>
    <cd:arguments>
      <cd:keywords n="1" optional="yes"> <!-- same as definebodyfontenvironment;
 you can define the whole commant to inherit, not only parameters-->
        <cd:inherit name="definebodyfontenvironment" n="1"/>
      </cd:keywords>
      <cd:keywords n="2" optional="no">
        <cd:inherit name="definebodyfontenvironment" n="2" optional="no"/>
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      </cd:keywords>
      <cd:assignments n="3" optional="yes" list="yes">
        <cd:inherit name="definebodyfontenvironment" n="3"/>
      </cd:assignments>
    </cd:arguments>
  </cd:command>


what does the optional="no" means in the second cd:inherit line? That
sounds redundant, the <cd:keywords element already has the optional
keyword. Can we remove this?

2) list=yes in cd:constant

  <cd:command name="definefonthandling" file="hand-ini.mkii"> 
    <cd:sequence>
      <cd:string value="definefonthandling"/>
    </cd:sequence>
    <cd:arguments>
      <cd:keywords n="1">
        <cd:constant type="cd:name"/>
      </cd:keywords>
      <cd:keywords n="2">
        <cd:constant type="cd:name" list="yes"/>
      </cd:keywords>
      ....

shouldn't the list="yes" be in the line above? That would match all the
other occurences in the xml file. Can we remove this?

Here is the suggested patch:

--- cont-en.xml-orig    2008-12-21 20:40:42.000000000 +0100
+++ cont-en.xml 2008-12-21 20:39:29.000000000 +0100
@@ -350,7 +350,7 @@
         <cd:inherit name="definebodyfontenvironment" n="1"/>
       </cd:keywords>
       <cd:keywords n="2" optional="no">
-        <cd:inherit name="definebodyfontenvironment" n="2" optional="no"/>
+        <cd:inherit name="definebodyfontenvironment" n="2"/>
       </cd:keywords>
       <cd:assignments n="3" optional="yes" list="yes">
         <cd:inherit name="definebodyfontenvironment" n="3"/>
@@ -10106,8 +10106,8 @@
       <cd:keywords n="1">
         <cd:constant type="cd:name"/>
       </cd:keywords>
-      <cd:keywords n="2">
-        <cd:constant type="cd:name" list="yes"/>
+      <cd:keywords n="2" list="yes">
+        <cd:constant type="cd:name"/>
       </cd:keywords>
       <cd:assignments n="3">
         <cd:parameter name="type">

And attached the current interface definition grammar.

Attachment: interface.rnc
Description: relax ng grammar for context setup file



Patrick


-- 
ConTeXt wiki and more: http://contextgarden.net
_______________________________________________
dev-context mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/dev-context

Reply via email to