Cernunnos Manual


<grammar>

Description:

Overlays a new, empty grammar on top of the current grammar. Use his task in conjunction with one or more <entry> tasks.

Reagents:

Name XPath Description Reagent Type Expected Type Required
NAME @name A short name for this grammar, beginning with a capital letter. One word names are preferable (e.g. 'Core', 'Mail'). Grammar names should be unique for clarity. STRING java.lang.String No
CONTEXT @context Optional context from which missing elements of the LOCATION will be inferred if it is relative. The default is the value of the 'Attributes.ORIGIN' request attribute. PHRASE java.lang.String No
LOCATION @location Location of a resource, which may be a filesystem path or a URL, and may be absolute or relative; if a relative value is provided, it will be resolved based on the value of CONTEXT. PHRASE java.lang.String No
ENTRIES entries/* Set of grammar entries that will suppliment the existing grammar. NODE_LIST java.util.List No
SUBTASKS subtasks/* The set of tasks that are children of this task; only these tasks may use the grammar entries defined by this task. NODE_LIST java.util.List No

Examples:

Creates a new Grammar object, adds the <request-dispatcher> entry, then returns it to the caller of this Cernunnos XML:

 
       
        <grammar> 
          <entries> 
            <entry impl="org.danann.cernunnos.runtime.web.RequestDispatcherTask" name="request-dispatcher"> 
              <description> 
                <p>Include the specified resource using a PortletRequestDispatcher.</p> 
              </description> 
            </entry> 
          </entries>  
          <subtasks> 
            <return value="${grammar()}"/> 
          </subtasks> 
        </grammar>