RELAX NG Schema for Paloose Sitemaps
Author: Hugh Field-Richards
Date: 2011-08-03T12:15

This is the RELAX NG schema for the Paloose sitemaps. They are very similar to Cocoon sitemaps, but with enough differences to make it worth formalising separately. Any bug reports, help, suggestions, new task schemas etc to me, Hugh Field-Richards (hsfr@hsfr.org.uk).

The documentation is designed to be processed by the rng2xhtml.xsl pretty-printing processor available from the author.

Schematron
Declare schematron namespace : map = http://apache.org/cocoon/sitemap/1.0

Components

The components definition defines what component that this sitemap requires.

map.components — Warning! not used within this schema file.
define : map.components
element : map:components
interleave
zeroOrMore
refcomponents.generators
zeroOrMore
refcomponents.transformers
zeroOrMore
refcomponents.serializers
zeroOrMore
refcomponents.matchers
zeroOrMore
refcomponents.readers
zeroOrMore
refcomponents.selectors
zeroOrMore
refcomponents.actions
<define name="map.components">
   <element name="map:components">
      </>
      <interleave>
         <zeroOrMore>
            <ref name="components.generators"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="components.transformers"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="components.serializers"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="components.matchers"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="components.readers"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="components.selectors"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="components.actions"/>
         </zeroOrMore>
      </interleave>
   </element>
</define>

All components definition have an associated default for use in the pipeline.

components.attribute.default — Warning! not used within this schema file.
define : components.attribute.default
optional
attribute : default
refdata.componentName
<define name="components.attribute.default">
   <optional>
      <attribute name="default">
         <ref name="data.componentName"/>
      </attribute>
   </optional>
</define>

All component instances may have an associated label (for views).

components.attribute.label — Warning! not used within this schema file.
define : components.attribute.label
attribute : label
refdata.componentLabel
<define name="components.attribute.label">
   <attribute name="label">
      <ref name="data.componentLabel"/>
   </attribute>
</define>

All aggregation instances may have an associated element attribute.

components.attribute.element — Warning! not used within this schema file.
define : components.attribute.element
attribute : element
refdata.elementName
<define name="components.attribute.element">
   <attribute name="element">
      <ref name="data.elementName"/>
   </attribute>
</define>

All component instances may have an associated type.

components.attribute.type — Warning! not used within this schema file.
define : components.attribute.type
attribute : type
refdata.componentName
<define name="components.attribute.type">
   <attribute name="type">
      <ref name="data.componentName"/>
   </attribute>
</define>

All component declarations must have an associated source (PHP5 source file).

components.attribute.src — Warning! not used within this schema file.
define : components.attribute.src
attribute : src
refdata.sourceFileName
<define name="components.attribute.src">
   <attribute name="src">
      <ref name="data.sourceFileName"/>
   </attribute>
</define>

All component instances must have an associated type.

components.attribute.strip-root — Warning! not used within this schema file.
define : components.attribute.strip-root
attribute : strip-root
refcommon.trueFalseEnum
<define name="components.attribute.strip-root">
   <attribute name="strip-root">
      <ref name="common.trueFalseEnum"/>
   </attribute>
</define>

Some but not all components can be cached.

component.attribute.cachable — Warning! not used within this schema file.
define : component.attribute.cachable
optional
attribute : cachable
refcommon.trueFalseEnum
<define name="component.attribute.cachable">
   <optional>
      <attribute name="cachable">
         <ref name="common.trueFalseEnum"/>
      </attribute>
   </optional>
</define>

Some but not components can be instructed to use the request parameters.

component.use-request-parameters — Warning! not used within this schema file.
define : component.use-request-parameters
element : map:use-request-parameters
refcommon.trueFalseEnum
<define name="component.use-request-parameters">
   <element name="map:use-request-parameters">
      <ref name="common.trueFalseEnum"/>
   </element>
</define>

Each component has the following set of attributes.

component.attributes.common — Warning! not used within this schema file.
define : component.attributes.common
attribute : name
refdata.componentName
attribute : src
refdata.sourceFileName
<define name="component.attributes.common">
   <attribute name="name">
      <ref name="data.componentName"/>
   </attribute>
   <attribute name="src">
      <ref name="data.sourceFileName"/>
   </attribute>
</define>

Copyright

Copyright (c) 2006 – 2009 Hugh Field-Richards

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

For a copy of the GNU General Public License write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.