RELAX NG Schema for Paloose Sitemaps
Author: Hugh Field-Richards
Date: 2011-08-03T12:15
WARNING! This schema uses ANY type elements. This is dangerous: it allows anything to appear within the elements. The cost of this generality is the dismantling of the structure. Because any element is allowed it is impossible to validate formally the structure of the document. See Goldfarb (The SGML Handbook): "An element type that has an ANY content specification is completely unstructured."

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

Sitemap Root

Schema Root
start
ref  →  map.sitemap

Sitemap Structure

The Paloose site has a similar structure to the Cocoon one, just less of it.

map.sitemap
define  :  map.sitemap
element  :  map:sitemap
ref  →  map.components
interleave
ref  →  map.resources
ref  →  map.views
ref  →  map.flows
ref  →  map.pipelines

Components

The components definition defines what component that this sitemap requires.

map.components
define  :  map.components
element  :  map:components
interleave
zeroOrMore
ref  →  components.generators
zeroOrMore
zeroOrMore
zeroOrMore
ref  →  components.matchers
zeroOrMore
ref  →  components.readers
zeroOrMore
ref  →  components.selectors
zeroOrMore
ref  →  components.actions

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

components.attribute.default
define  :  components.attribute.default
attribute  :  default
ref  →  data.componentName

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

components.attribute.label
define  :  components.attribute.label
attribute  :  label
ref  →  data.componentLabel

All aggregation instances may have an associated element attribute.

components.attribute.element
define  :  components.attribute.element
attribute  :  element
ref  →  data.elementName

All component instances may have an associated type.

components.attribute.type
define  :  components.attribute.type
attribute  :  type
ref  →  data.componentName

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

components.attribute.src
define  :  components.attribute.src
attribute  :  src
ref  →  data.sourceFileName

All component instances must have an associated type.

components.attribute.strip-root
define  :  components.attribute.strip-root
attribute  :  strip-root
ref  →  common.trueFalseEnum

Some but not all components can be cached.

component.attribute.cachable
define  :  component.attribute.cachable
attribute  :  cachable
ref  →  common.trueFalseEnum

Some but not compoents can be instructed to use the request paratemers.

component.use-request-parameters
define  :  component.use-request-parameters
element  :  map:use-request-parameters
ref  →  common.trueFalseEnum

Each component has the following set of attributes.

component.attributes.common
define  :  component.attributes.common
attribute  :  name
ref  →  data.componentName
attribute  :  src
ref  →  data.sourceFileName

Pipeline Definitions

map.pipelines
define  :  map.pipelines
element  :  map:pipelines
interleave
oneOrMore
ref  →  pipelines.pipeline
pipelines.pipeline
define  :  pipelines.pipeline
element  :  map:pipeline
attribute  :  internal-only
ref  →  common.trueFalseEnum
interleave
oneOrMore
ref  →  matcher.instance
optional
pipelines.component-configurations
define  :  pipelines.component-configurations
element  :  map:component-configurations
interleave
optional
optional
pipelines.authentication-manager
define  :  pipelines.authentication-manager
element  :  map:authentication-manager
interleave
zeroOrMore
ref  →  pipelines.handlers
pipelines.global-variables
define  :  pipelines.global-variables
element  :  map:global-variables
zeroOrMore
element
anyName  WARNING! See note at start of schema!
Any text
pipelines.handlers
define  :  pipelines.handlers
element  :  map:handlers
interleave
oneOrMore
ref  →  pipelines.handler
pipelines.handler
define  :  pipelines.handler
element  :  map:handler
attribute  :  name
ref  →  resource.redirect-to
element  :  map:authentication
attribute  :  uri
pipelines.handle-errors
define  :  pipelines.handle-errors
element  :  map:handle-errors
interleave
oneOrMore
ref  →  pipeline.matcher

Pipelines used in matchers

There is no sensible way of providing restictions on the pipeline ordering in RELAX-NG. I have had to resort to Schematron rules to do this. Oh for DSD-2, which can do this with no problem at all.

pipeline.matcher
define  :  pipeline.matcher
Schematron
Check position of pipeline elements
Context : “map:generate
If condition “count( preceding-sibling::* ) > 0 and not ( preceding-sibling::map:parameter )
then output: Generate element must be first in the pipeline
Context : “map:aggregate
If condition “count( preceding-sibling::* ) > 0 and not( preceding-sibling::map:act ) and not ( preceding-sibling::map:parameter )
then output: Aggregate element must be first in the pipeline
Context : “map:call
If condition “count( following-sibling::* ) > 0
then output: call element must be last in the pipeline
Context : “map:redirect-to
If condition “count( following-sibling::* ) > 0 and not( parent::map:handler )
then output: redirect-to element must be last in the pipeline
Context : “map:read
If condition “count( preceding-sibling::* ) > 0 and count( following-sibling::* ) > 0
then output: Read element must be only element in the pipeline
Context : “map:mount
If condition “count( preceding-sibling::* ) > 0 and count( following-sibling::* ) > 0
then output: Mount element must be only element in the pipeline
zeroOrMore
interleave
ref  →  generator.instance
ref  →  action.instance
ref  →  resource.mount
ref  →  resource.call
ref  →  selector.instance
ref  →  aggregate.instance
ref  →  transformer.instance
ref  →  serializer.instance
ref  →  resource.redirect-to
ref  →  reader.instance
pipeline.select
define  :  pipeline.select
interleave
ref  →  generator.instance
ref  →  transformer.instance
ref  →  serializer.instance
ref  →  resource.call
ref  →  resource.mount
ref  →  reader.instance
ref  →  selector.instance
pipeline.views
define  :  pipeline.views
interleave
ref  →  transformer.instance
ref  →  serializer.instance
ref  →  resource.call

Generators

A Generator generates XML content as DOM objects and initializes the pipeline processing.

components.generators
define  :  components.generators
element  :  map:generators
zeroOrMore
ref  →  generators.generator
generators.generator
define  :  generators.generator
Schematron
Check the generator names are unique
Context : “map:generator
if not condition “count(//map:generator[@name = current()/@name]) = 1
then output: There should be unique generator names
element  :  map:generator
FileGenerator.contents
define  :  FileGenerator.contents
interleave
optional
PXTemplateGenerator.contents
define  :  PXTemplateGenerator.contents
interleave
optional
DirectoryGenerator.contents
define  :  DirectoryGenerator.contents
interleave
optional
TidyGenerator.contents
define  :  TidyGenerator.contents
Schematron
Tidy parameters elements only allowed within TidyGenerator
Context : “//map:generator/map:parameter[ @name='char-encoding' ]
If condition “parent::*[ not( contains( @src, 'TidyGenerator' ) ) ]
then output: char-encoding parameter only allowed within TidyGenerator
Context : “//map:generator/map:parameter[ @name='clean' ]
If condition “parent::*[ not( contains( @src, 'TidyGenerator' ) ) ]
then output: clean parameter only allowed within TidyGenerator
Context : “//map:generator/map:parameter[ @name='word-2000' ]
If condition “parent::*[ not( contains( @src, 'TidyGenerator' ) ) ]
then output: word-2000 parameter only allowed within TidyGenerator
interleave
optional
zeroOrMore
GedComGenerator.contents
define  :  GedComGenerator.contents
Schematron
GedCom parameters only allowed within GedComGenerator
Context : “//map:generator/map:parameter[ @name='generateXMLFile' ]
If condition “parent::*[ not( contains( @src, 'GedComGenerator' ) ) ]
then output: generateXMLFile parameter only allowed within GedComGenerator
Context : “//map:generator/map:parameter[ @name='generateDOM' ]
If condition “parent::*[ not( contains( @src, 'GedComGenerator' ) ) ]
then output: generateDOM parameter only allowed within GedComGenerator
Context : “//map:generator/map:parameter[ @name='useXMLFile' ]
If condition “parent::*[ not( contains( @src, 'GedComGenerator' ) ) ]
then output: useXMLFile parameter only allowed within GedComGenerator
interleave
optional
zeroOrMore

Generator Pipeline Instance

Generators are instanced within a pipeline. However there are certain constraints on where the generator can occur. Primarily it must always be the first element within a pipeline (it makes no sense to be anywhere else).

generator.instance
define  :  generator.instance
element  :  map:generate
optional
optional
zeroOrMore

Aggregation

Aggregations only appear as pipeline instances.

aggregate.instance
define  :  aggregate.instance
element  :  map:aggregate
optional
oneOrMore
ref  →  aggregate.part
aggregate.part
define  :  aggregate.part
element  :  map:part
optional
oneOrMore
ref  →  aggregate.part
components.transformers
define  :  components.transformers
element  :  map:transformers
zeroOrMore
transformers.transformer
define  :  transformers.transformer
Schematron
Check the transformer names are unique
Context : “map:transformer
if not condition “count(//map:transformer[ @name = current()/@name ]) = 1
then output: There should be unique transformer names
TRAXTransformer.contents
define  :  TRAXTransformer.contents
interleave
optional
PageHitTransformer.contents
define  :  PageHitTransformer.contents
Schematron
PageHit parameters only allowed within PageHitTransformer
Context : “//map:transformer/map:parameter[ @name='file' ]
If condition “parent::*[ not( contains( @src, 'PageHitTransformer' ) ) ]
then output: file parameter only allowed within PageHitTransformer
Context : “//map:transformer/map:parameter[ @name='unique' ]
If condition “parent::*[ not( contains( @src, 'PageHitTransformer' ) ) ]
then output: unique parameter only allowed within PageHitTransformer
Context : “//map:transformer/map:parameter[ @name='cookie-name' ]
If condition “parent::*[ not( contains( @src, 'PageHitTransformer' ) ) ]
then output: cookie-name parameter only allowed within PageHitTransformer
Context : “//map:transformer/map:parameter[ @name='ignore' ]
If condition “parent::*[ not( contains( @src, 'PageHitTransformer' ) ) ]
then output: ignore parameter only allowed within PageHitTransformer
interleave
optional
zeroOrMore
GalleryTransformer.contents
define  :  GalleryTransformer.contents
Schematron
PageHit parameters only allowed within PageHitTransformer
Context : “//map:transformer/map:parameter[ @name='root' ]
If condition “parent::*[ not( contains( @src, 'GalleryTransformer' ) ) ]
then output: root parameter only allowed within GalleryTransformer
Context : “//map:transformer/map:parameter[ @name='image-cache' ]
If condition “parent::*[ not( contains( @src, 'GalleryTransformer' ) ) ]
then output: image-cache parameter only allowed within GalleryTransformer
Context : “//map:transformer/map:parameter[ @name='max-thumbnail-width' ]
If condition “parent::*[ not( contains( @src, 'GalleryTransformer' ) ) ]
then output: max-thumbnail-width parameter only allowed within GalleryTransformer
Context : “//map:transformer/map:parameter[ @name='max-thumbnail-height' ]
If condition “parent::*[ not( contains( @src, 'GalleryTransformer' ) ) ]
then output: max-thumbnail-height parameter only allowed within GalleryTransformer
Context : “//map:transformer/map:parameter[ @name='max-thumbnail-width' ]
If condition “parent::*[ not( contains( @src, 'GalleryTransformer' ) ) ]
then output: max-thumbnail-width parameter only allowed within GalleryTransformer
Context : “//map:transformer/map:parameter[ @name='resize' ]
If condition “parent::*[ not( contains( @src, 'GalleryTransformer' ) ) ]
then output: resize parameter only allowed within GalleryTransformer
Context : “//map:transformer/map:parameter[ @name='max-width' ]
If condition “parent::*[ not( contains( @src, 'GalleryTransformer' ) ) ]
then output: max-width parameter only allowed within GalleryTransformer
Context : “//map:transformer/map:parameter[ @name='max-height' ]
If condition “parent::*[ not( contains( @src, 'GalleryTransformer' ) ) ]
then output: max-height parameter only allowed within GalleryTransformer
interleave
optional
zeroOrMore
LogTransformer.contents
define  :  LogTransformer.contents
interleave
zeroOrMore
XIncludeTransformer.contents
define  :  XIncludeTransformer.contents
interleave
zeroOrMore
PasswordTransformer.contents
define  :  PasswordTransformer.contents
interleave
zeroOrMore
SourceWritingTransformer.contents
define  :  SourceWritingTransformer.contents
interleave
zeroOrMore
FilterTransformer.contents
define  :  FilterTransformer.contents
interleave
optional
EntityTransformer.contents
define  :  EntityTransformer.contents
interleave
optional
SQLTransformer.contents
define  :  SQLTransformer.contents
Schematron
PageHit parameters only allowed within PageHitTransformer
Context : “//map:transformer/map:parameter[ @name='type' ]
If condition “parent::*[ not( contains( @src, 'SQLTransformer' ) ) ]
then output: type parameter only allowed within SQLTransformer
Context : “//map:transformer/map:parameter[ @name='host' ]
If condition “parent::*[ not( contains( @src, 'SQLTransformer' ) ) ]
then output: host parameter only allowed within SQLTransformer
Context : “//map:transformer/map:parameter[ @name='user' ]
If condition “parent::*[ not( contains( @src, 'SQLTransformer' ) ) ]
then output: user parameter only allowed within SQLTransformer
Context : “//map:transformer/map:parameter[ @name='password' ]
If condition “parent::*[ not( contains( @src, 'SQLTransformer' ) ) ]
then output: password parameter only allowed within SQLTransformer
interleave
optional
I18nTransformer.contents
define  :  I18nTransformer.contents
Schematron
Catalogue elements only allowed within I18n transformer
Context : “//map:transformer/map:catalogues
If condition “parent::*[ not( contains( @src, 'I18nTransformer' ) ) ]
then output: Catalogues only allowed in I18n transformer
Context : “//map:transformer/map:untranslated-text
If condition “parent::*[ not( contains( @src, 'I18nTransformer' ) ) ]
then output: Catalogue elements only allowed in I18n transformer
interleave
ref  →  I18n.catalogues
optional
I18n.catalogues
define  :  I18n.catalogues
element  :  map:catalogues
attribute  :  default
zeroOrMore
ref  →  I18n.catalogue
I18n.catalogue
define  :  I18n.catalogue
element  :  map:catalogue
attribute  :  id
attribute  :  name
attribute  :  location
I18n.untranslated-text
define  :  I18n.untranslated-text
element  :  map:untranslated-text
Any text
transformer.instance
define  :  transformer.instance
element  :  map:transform
optional
optional
zeroOrMore
components.selectors
define  :  components.selectors
element  :  map:selectors
zeroOrMore
ref  →  selectors.selector
selectors.selector
define  :  selectors.selector
Schematron
Check the identities are unique within a category
Context : “map:selector
if not condition “count(//map:selector[@name = current()/@name]) = 1
then output: There should be unique selector IDs
element  :  map:selector
BrowserSelector.contents
define  :  BrowserSelector.contents
Schematron
browser elements only allowed within BrowserSelector
Context : “//*[ local-name() = 'browser' ]
If condition “parent::*[ not( contains( @src, 'BrowserSelector' ) ) ]
then output: browser element only allowed in BrowserSelector
interleave
zeroOrMore
ref  →  selector.browser
RequestParameterSelector.contents
define  :  RequestParameterSelector.contents
Schematron
parameter-name elements only allowed within RequestParameterSelector
Context : “//*[ local-name() = 'parameter-name' ]
If condition “parent::*[ not( contains( @src, 'RequestParameterSelector' ) ) ]
then output: parameter-name element only allowed in RequestParameterSelector
interleave
zeroOrMore
element  :  map:parameter-name
Any text
selector.browser
define  :  selector.browser
Schematron
Check the names of browsers are unique
Context : “browser
if not condition “count(//browser[@useragent = current()/@useragent]) = 1
then output: There should be unique user agent names
element  :  browser
optional
attribute  :  name
Any text
optional
attribute  :  class
Any text
optional
attribute  :  unroll
ref  →  common.trueFalseEnum
attribute  :  useragent
ref  →  browser.userAgents
browser.userAgents
define  :  browser.userAgents
choice
value = "MSIE"
value = "MSPIE"
value = "HandHTTP"
value = "AvantGo"
value = "DoCoMo"
value = "Opera"
value = "Lynx"
value = "Java"
value = "Nokia"
value = "UP"
value = "Wapalizer"
value = "Mozilla/5"
value = "Netscape6/"
value = "Mozilla"
value = "Safari"
value = "iPhone"
selector.instance
define  :  selector.instance
element  :  map:select
optional
attribute  :  type
attribute  :  src
zeroOrMore
oneOrMore
ref  →  selector.when
optional
ref  →  selector.otherwise
selector.when
define  :  selector.when
element  :  map:when
attribute  :  test
ref  →  pipeline.select
selector.otherwise
define  :  selector.otherwise
element  :  map:otherwise
attribute  :  test
ref  →  pipeline.select
components.serializers
define  :  components.serializers
element  :  map:serializers
zeroOrMore
serializers.serializer
define  :  serializers.serializer
Schematron
Check the serializer names are unique
Context : “map:serializer
if not condition “count(//map:serializer[@name = current()/@name]) = 1
then output: There should be unique serializer names
element  :  map:serializer
attribute  :  mime-type
XMLSerializer.contents
define  :  XMLSerializer.contents
interleave
optional
TextSerializer.contents
define  :  TextSerializer.contents
interleave
optional
HTMLSerializer.contents
define  :  HTMLSerializer.contents
Schematron
doctype-public elements only allowed within HTMLSerializer
Context : “//*[ local-name() = 'doctype-public' ]
If condition “parent::*[ contains( @src, 'TextSerializer' ) ]
then output: doctype-public not allowed in TextSerializer
Context : “//*[ local-name() = 'doctype-system' ]
If condition “parent::*[ contains( @src, 'TextSerializer' ) ]
then output: doctype-public not allowed in TextSerializer
Context : “//*[ local-name() = 'encoding' ]
If condition “parent::*[ contains( @src, 'TextSerializer' ) ]
then output: doctype-public not allowed in TextSerializer
interleave
optional
optional
optional
XHTMLSerializer.contents — Warning! not used within this schema file.
define  :  XHTMLSerializer.contents
interleave
optional
optional
optional
HTMLSerializer.doctype-public
define  :  HTMLSerializer.doctype-public
element  :  doctype-public
Any text
HTMLSerializer.doctype-system
define  :  HTMLSerializer.doctype-system
element  :  doctype-system
Any text
HTMLSerializer.encoding
define  :  HTMLSerializer.encoding
element  :  encoding
Any text
serializer.instance
define  :  serializer.instance
element  :  map:serialize
optional
attribute  :  type
components.matchers
define  :  components.matchers
element  :  map:matchers
zeroOrMore
ref  →  matchers.matcher
matchers.matcher
define  :  matchers.matcher
Schematron
Check the matcher names are unique
Context : “map:matcher
if not condition “count(//map:matcher[@name = current()/@name]) = 1
then output: There should be unique matcher names
element  :  map:matcher
attribute  :  mime-type
WildcardURIMatcher.contents
define  :  WildcardURIMatcher.contents
interleave
optional
RegexpURIMatcher.contents
define  :  RegexpURIMatcher.contents
interleave
optional
matcher.instance
define  :  matcher.instance
element  :  map:match
attribute  :  pattern
attribute  :  type
choice
value = "regexp"
value = "wildcard"
ref  →  pipeline.matcher
components.readers
define  :  components.readers
element  :  map:readers
zeroOrMore
ref  →  readers.reader
readers.reader
define  :  readers.reader
Schematron
Check the reader names are unique
Context : “map:reader
if not condition “count(//map:reader[@name = current()/@name]) = 1
then output: There should be unique reader names
element  :  map:reader
ref  →  reader.contents
reader.contents
define  :  reader.contents
empty
reader.instance
define  :  reader.instance
element  :  read
empty
map.resources
define  :  map.resources
element  :  resources
zeroOrMore
ref  →  resources.resource
resources.resource
define  :  resources.resource
element  :  map:resource
attribute  :  name
ref  →  pipeline.matcher
map.flows
define  :  map.flows
element  :  map:flow
attribute  :  language
ref  →  data.language
zeroOrMore
ref  →  resources.script
resources.script
define  :  resources.script
Schematron
Check whether attributes are not null
Context : “map:script
If condition “@src = ''
then output: Cannot have null src attribute in script element
element  :  map:script
attribute  :  src
ref  →  data.sourceFileName
empty

Call Resource

Schematron
Check whether corresponding resource for call
Context : “//map:call
if not condition “@resource or @function
then output: Must have resource or function attribute
Context : “//map:call
If condition “@resource and @function
then output: Cannot have resource and function attribute
resource.call
define  :  resource.call
element  :  call
choice
attribute  :  resource
ref  →  data.componentName
attribute  :  function
empty
resource.redirect-to
define  :  resource.redirect-to
Schematron
Check whether attributes are not null
Context : “map:redirect-to
If condition “@uri = ''
then output: Cannot have null uri attribute in redirect-to element
element  :  map:redirect-to
attribute  :  uri
data  :  anyURI
empty
resource.mount
define  :  resource.mount
element  :  map:mount
attribute  :  src
Any text
optional
attribute  :  uri-prefix
data  :  string
empty
map.views
define  :  map.views
element  :  map:views
zeroOrMore
ref  →  views.view
views.view
define  :  views.view
element  :  map:view
attribute  :  name
attribute  :  from-label
ref  →  pipeline.views
components.actions
define  :  components.actions
element  :  map:actions
zeroOrMore
ref  →  actions.action

Actions

actions.action
define  :  actions.action
Schematron
Check the action names are unique
Context : “map:action
if not condition “count(//map:action[@name = current()/@name]) = 1
then output: There should be unique action names
element  :  map:action
ref  →  AuthAction.contents
ref  →  LoginAction.contents
ref  →  LogoutAction.contents
CookiesAction.contents
define  :  CookiesAction.contents
interleave
zeroOrMore
ref  →  pipeline.matcher
CookiesAction.parameters
define  :  CookiesAction.parameters
Schematron
smtp elements only allowed within CookiesAction
Context : “//*[ local-name() = 'default-cookies-name' ]
If condition “parent::*[ not( contains( @src, 'CookiesAction' ) ) ]
then output: default-cookies-name only allowed in CookiesAction
Schematron
Only one of CookiesAction nested elements allowed of each type
Context : “//map:action[ contains( @src, 'CookiesAction' ) ]
If condition “count( default-cookies-name ) > 1
then output: Only 1 default-cookies-name element allowed here
interleave
element  :  default-cookies-name
Any text
SendMailAction.contents
define  :  SendMailAction.contents
interleave
zeroOrMore
ref  →  pipeline.matcher
SendMailAction.parameters
define  :  SendMailAction.parameters
Schematron
smtp elements only allowed within SendMailAction
Context : “//*[ local-name() = 'smtp-host' ]
If condition “parent::*[ not( contains( @src, 'SendMailAction' ) ) ]
then output: smtp-host only allowed in SendMailAction
Context : “//*[ local-name() = 'smtp-user' ]
If condition “parent::*[ not( contains( @src, 'SendMailAction' ) ) ]
then output: smtp-user only allowed in SendMailAction
Context : “//*[ local-name() = 'smtp-password' ]
If condition “parent::*[ not( contains( @src, 'SendMailAction' ) ) ]
then output: smtp-password only allowed in SendMailAction
Schematron
Only one of SendMailAction nested elements allowed of each type
Context : “//map:action[ contains( @src, 'SendMailAction' ) ]
If condition “count( smtp-host ) > 1
then output: Only 1 smtp-host element allowed here
Context : “//map:action[ contains( @src, 'SendMailAction' ) ]
If condition “count( smtp-user ) > 1
then output: Only 1 smtp-user element allowed here
Context : “//map:action[ contains( @src, 'SendMailAction' ) ]
If condition “count( smtp-password ) > 1
then output: Only 1 smtp-password element allowed here
interleave
element  :  smtp-host
Any text
element  :  smtp-user
Any text
element  :  smtp-password
Any text
AuthAction.contents
define  :  AuthAction.contents
Schematron
doctype-public elements only allowed within HTMLSerializer
Context : “//*[ local-name() = 'doctype-public' ]
If condition “parent::*[ contains( @src, 'TextSerializer' ) ]
then output: doctype-public not allowed in TextSerializer
Context : “//*[ local-name() = 'doctype-system' ]
If condition “parent::*[ contains( @src, 'TextSerializer' ) ]
then output: doctype-public not allowed in TextSerializer
Context : “//*[ local-name() = 'encoding' ]
If condition “parent::*[ contains( @src, 'TextSerializer' ) ]
then output: doctype-public not allowed in TextSerializer
interleave
optional
LoginAction.contents
define  :  LoginAction.contents
interleave
optional
optional
optional
LogoutAction.contents
define  :  LogoutAction.contents
interleave
optional
optional
optional
action.instance
define  :  action.instance
element  :  map:act
optional
zeroOrMore
ref  →  pipeline.matcher

Common Rules and Definitions for Cocoon Sitemap

Parameter Elements

Some components have an associated parameter of the form:

    <parameter name="quality" type="float" value="0.9"/>
common.element.parameter
define  :  common.element.parameter
element  :  map:parameter
attribute  :  name
Any text
optional
attribute  :  type
Any text
attribute  :  value
Any text

Boolean Values

common.trueFalseEnum  (Combine: choice)
define  :  common.trueFalseEnum
choice
value = "1"
value = "0"
value = "yes"
value = "no"
value = "true"
value = "false"

Paloose Datatype Definitions

Component Name

data.componentName
define  :  data.componentName
data  :  string
param  :  pattern "[0-9a-zA-Z\.\-]+"

Pipeline Labels

data.componentLabel
define  :  data.componentLabel
data  :  string
param  :  pattern "[0-9a-zA-Z\-]+"

Element Name

data.elementName
define  :  data.elementName
data  :  string
param  :  pattern "[a-zA-Z\-]*:?[a-zA-Z]+[a-zA-Z0-9\-]*"

PHP5 Source File

data.sourceFileName
define  :  data.sourceFileName
data  :  string
param  :  pattern "((resource:/)|(context:/)|(cocoon:/)|(/))(\S+/)*(\S+)"

Lamguage Designator

This needs to be expanded.

data.language
define  :  data.language
data  :  string
param  :  pattern "\S+"

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.