RELAX NG Schema for Paloose Sitemaps
Hugh Field-Richards
2011-08-03T12:15
en
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.
Sitemap Root
Sitemap Structure
The Paloose site has a similar structure to the Cocoon one, just less of it.
Components
The components definition defines what component that this sitemap requires.
All components definition have an associated default for use in the pipeline.
All component instances may have an associated label (for views).
All aggregation instances may have an associated element attribute.
All component instances may have an associated type.
All component declarations must have an associated source (PHP5 source file).
All component instances must have an associated type.
Some but not all components can be cached.
Some but not compoents can be instructed to use the request paratemers.
Each component has the following set of attributes.
Pipeline Definitions
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.
Generate element must be first in the pipeline
Aggregate element must be first in the pipeline
call element must be last in the pipeline
redirect-to element must be last in the pipeline
Read element must
be only element in the pipeline
Mount element
must be only element in the pipeline
Generators
A Generator generates XML content as DOM objects and initializes the pipeline processing.
There should be unique generator
names
char-encoding parameter only
allowed within TidyGenerator
clean parameter only allowed within
TidyGenerator
word-2000 parameter only allowed
within TidyGenerator
generateXMLFile parameter only
allowed within GedComGenerator
generateDOM parameter only
allowed within GedComGenerator
useXMLFile parameter only allowed
within GedComGenerator
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).
Aggregation
Aggregations only appear as pipeline instances.
There should be unique
transformer names
file parameter only allowed
within PageHitTransformer
unique parameter only allowed
within PageHitTransformer
cookie-name parameter only
allowed within PageHitTransformer
ignore parameter only allowed
within PageHitTransformer
root parameter only allowed
within GalleryTransformer
image-cache parameter only
allowed within GalleryTransformer
max-thumbnail-width parameter
only allowed within GalleryTransformer
max-thumbnail-height parameter
only allowed within GalleryTransformer
max-thumbnail-width parameter
only allowed within GalleryTransformer
resize parameter only allowed
within GalleryTransformer
max-width parameter only
allowed within GalleryTransformer
max-height parameter only
allowed within GalleryTransformer
type parameter only allowed within
SQLTransformer
host parameter only allowed within
SQLTransformer
user parameter only allowed within
SQLTransformer
password parameter only allowed
within SQLTransformer
Catalogues only allowed in I18n
transformer
Catalogue elements only allowed
in I18n transformer
There should be unique selector
IDs
browser element only allowed in
BrowserSelector
parameter-name element
only allowed in RequestParameterSelector
There should be unique user agent
names
MSIE
MSPIE
HandHTTP
AvantGo
DoCoMo
Opera
Lynx
Java
Nokia
UP
Wapalizer
Mozilla/5
Netscape6/
Mozilla
Safari
iPhone
There should be unique serializer
names
doctype-public not allowed in
TextSerializer
doctype-public not allowed in
TextSerializer
doctype-public not allowed in
TextSerializer
There should be unique matcher
names
regexp
wildcard
There should be unique reader
names
Cannot have null src attribute in script element
Call Resource
Must have resource or function attribute
Cannot have resource and function attribute
Cannot have null uri attribute in redirect-to element
Actions
There should be unique action
names
default-cookies-name only allowed in
CookiesAction
Only 1 default-cookies-name element allowed here
smtp-host only allowed in
SendMailAction
smtp-user only allowed in
SendMailAction
smtp-password only allowed in
SendMailAction
Only 1 smtp-host element allowed here
Only 1 smtp-user element allowed here
Only 1 smtp-password element allowed here
doctype-public not allowed in
TextSerializer
doctype-public not allowed in
TextSerializer
doctype-public not allowed in
TextSerializer
Common Rules and Definitions for Cocoon Sitemap
Parameter Elements
Some components have an associated parameter of the form:
]]>
Boolean Values
1
0
yes
no
true
false
Paloose Datatype Definitions
Component Name
[0-9a-zA-Z\.\-]+
Pipeline Labels
[0-9a-zA-Z\-]+
Element Name
[a-zA-Z\-]*:?[a-zA-Z]+[a-zA-Z0-9\-]*
PHP5 Source File
((resource:/)|(context:/)|(cocoon:/)|(/))(\S+/)*(\S+)
Lamguage Designator
This needs to be expanded.
\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.