CssColumnSite

Articles

More

Links

Sitemap DocumentSelection

The sitemap of this site contains following snippet:


<!-- load a page of a section if page is not 
  available load index page of this section
-->
<map:resource name="load-page">
  <map:select type="parameter">
    <map:parameter name="parameter-selector-test"
      value="{resource-exists}"/>
    <map:when test="true">
      <map:generate src="docs/{sect}/{page}.xml"/>
    </map:when>
    <map:otherwise>
      <map:generate src="docs/{sect}/index.xml"/>
    </map:otherwise>
  </map:select>
  <map:serialize type="xml"/>
</map:resource>
      

This sitemap snippet evaluates the parameter resource-exists.
The value of this parameter is already defined in the previous ExtendedResourceAction. Here we use this value including either the existing section-page xml-document, or including the default section-page xml-document index.xml.

The sitemap selector of type parameter is used to yield the result of the parameter resource-exists.

If the parameter resource-exists is equal to "true". A file generator is invoked loading the xml document from the source docs/{sect}/{page}.xml.
The calling sequence of this resource passes values for both parameters. The parameter sect specifies the top, mid, or bottom section name; the parameter page specifies the document in side of this section.


[Back]  

PDF
sitemap-tutorial

Hints

» Use Search to search all documents.
» Use Recreate Index to create the inital index. This may be neccessary once at startup.

» Search and Recreate Index are available at HTML Cocoon online deployment, only.
» Search and Recreate Index are not available on WML online, WML offline, and HTML offline deployments.