| attributes |
-
language
The language in which this page is supposed to be written. This information is available to
sub-tags (like cloud-tag).
see: language attribute of locale
-
country
see: country attribute of locale
-
variant
(since: MMBase-1.8)
see: variant attribute of locale
-
timezone
(since: MMBase-1.8.1)
see: timezone attribute of locale
-
jspvar
-
type
The Content-Type of this page.
Setting the content-type can also trigger a default `escaper' and `postprocessor'.
| Id | Content-Type | Default escaper | Default postprocessor | Default encoding |
| html | text/html | text/html | reducespace | NOTSPECIFIED |
| xhtml | application/xhtml+xml | text/xml | reducespace | |
| xml | application/xml | text/xml | reducespace | |
| text/html | text/html | text/html | reducespace | NOTSPECIFIED |
| text/xml | text/xml | text/xml | reducespace | NOTSPECIFIED |
| application/xml | application/xml | text/xml | reducespace | |
| application/xhtml+xml | application/xhtml+xml | text/xml | reducespace | |
| audio/x-pn-realaudio | audio/x-pn-realaudio | none | reducespace | |
| application/smil | application/smil | text/xml | reducespace | |
| text/vnd.rn-realtext | text/vnd.rn-realtext | text/xml | reducespace | |
| video/x-ms-wmp | video/x-ms-wmp | text/xml | reducespace | |
| text/javascript | text/javascript | none | reducespace | |
| text/css | text/css | none | reducespace | |
-
encoding
The output text encoding. Don't attribute too much value too this. Normally it's better to
arrange this with the page-directive of JSP. Certainly this attribute cannot arrange the
pageEncoding (or the coding of the JSP source itself).
-
expires
Defines when this page expires (in seconds after now). If you set this, this has influence on some
http header being set ('Cache-Control' and `Expires'). This default to one minute
public-caching if there is no session used on the page, and to no caching otherwise.
Setting this to 0 has the effect of disabling all proxy-caching.
If expires is is set to a value greater than 0, and there is a Cloud-tag in the page which
wrote a non-anonymous cloud object to the session, then the Cache-Control header is `private',
rather than public, because such a situation implies that there is something on the page
which is not public.
-
disposition
(since: MMBase-1.8.5)
Provides a proposal filename for the response. The content-disposition of the resonse will be set to 'attachment', and this filename.
-
postprocessor
If this attribute is set the complete body-result is piped through this. If you specified
`type', then a default postprocessor might be defined.
The following postprocessors can be specified (besides the ones defined with mm:escaper tags).
| Postprocessor | |
| reducespace |
Replaces groups of one and more newlines by one new line, and one or more space by one
space. This spares bandwidth and makes the result better readable.
This is default for most XML-like content types.
|
| entities | Any non-ASCII character will be replaced by an XML-entity. |
| xmetodo | Replaces ?, ?, ?, ?, ?, ? with cx, gx, hx, jx, sx, ux |
| hmetodo | Replaces ?, ?, ?, ?, ?, ? with ch, gh, hh, jh, sh, u |
| perl |
Interpret the complete body as a perl program, and write the result.
|
| sitestat |
Rewrites the input to the characters which are alowed in Sitestat keys for
page statistics, being: "A-Z, a-z, 0-9, - . _".
|
see: escaper
-
escaper
The default value of the escape attribute of all writer tags in the body. The values are
defined in taglibcontent.xml. Reasonable defaults apply if you explicitly specify a type.
The `escape' attribute of the surrounded writers can be used to override this. (E.g. if
the writer itself produces HTML (e.g. mm:function name="gui"), then you should use
escape="none").
The following `escapers' can be specified (besides the ones defined with mm:escaper tags):
| Escaper | |
| text/plain | This equals no escaping |
| none | No escaping |
| text/html | Escapes for use in HTML. |
| text/html/attribute | Escapes for use in HTML atributes |
| text/xml | Escapes for use in XML (or XHTML). |
| inline | Interpret as 'enriched' ASCII for 'inline' HTML parts (so no blocks) |
| p | Interpret as 'enriched' ASCII for 'block' HTML parts. It normally generates one or more p-tags (everything is enclosed by a p tag, including lists). |
| pp | As 'p', but only one sequences of one br-tags are produced |
| p-ommit-surrounding | as p, but surrounding p /p tags are omitted (you must place them by hand). This can be needed for 'read-more' links. |
| pp-ommit-surrounding | |
| pl | Interpret as 'enriched' ASCII for 'block' HTML parts. It normally generates one or more p-tags. Lists (ul tags) are placed outside the paragraphs. As such a block may start or end with an ul tag. |
| ppl | As 'p2', but only one sequences of one br-tags are produced |
| pl-ommit-surrounding | as p2, but surrounding p /p tags are omitted (you must place them by hand). |
| ppl-ommit-surrounding | as pp2, but surrounding p /p tags are omitted (you must place them by hand). |
| wiki | Generates piece of XHTML2 compatible XML |
| sql | Escapes for use in SQL (escaping of quotes). You will _not_ have to use this if use mm:constraint. |
| js-single-quotes | Escapes single quotes for use in Javascript (with \'). |
| js-double-quotes | Escapes double quotes for use in Javascript (with "). |
| js-both-quotes | Escapes both quote types (' and ") for use in Javascript (with \'). |
| url | Escapes for use in an URL (using escaping with %). When you use mm:url with mm:param tags you will not have to use this. |
| urlparam | Similar to 'url' but also escapes '+' |
| uppercase | Converts to all uppercase. |
| lowercase | Converts to all lowercase. |
| identifier | Replaces anything which is not alphanumeric by underscores. |
| censor | Finds and replaces 'forbidden' words. |
| swallow | Everything disappears |
| links | Finds and makes clickable URL's. |
| plainlinks | Finds and makes clickable URL's, assuming plain/text input. |
| figlet | Filters through the command-line tool 'figlet', which can have amusing results. |
| trimmer | Trims leading and trailing whitespace |
| cp1252 |
Escapes the CP1252 characters which are not in ISO-8859-1. You don't want to serve your
pages as CP1252 (it is not a standard encoding). It is adviceable to do it using UTF-8, but if
you really want to use ISO-8859-1, you can create reasonable surrogates by this (nicer then question marks).
|
| cp1252wrong |
Escapes the CP1252 characters, but suppose that the String was originally wrongly encoded
(CP1252 bytes were incorrectly supposed ISO-8859-1)
|
| spaceremover |
Replace 1 or more white space characters by one space, unless, those are the first or last of
the string, those are replaced with nothing.
|
| spaceswallower |
Removes all whitespace.
|
| roman |
This works on integers only, and converts them to a roman numbers (lowercase, so see also
'uppercase'). This works only for natural numbers smaller than 4000.
|
| rot13 |
Performs 'rot 13' encoding of the string, to scramble letters. Can be decoded by doing a rot13 again.
|
| rot5 |
Performs 'rot 5' encoding of the string. This scrambles the digits.
|
| md5 | |
| adler32 |
Performs a 'adler32' checksum.
|
| crc32 |
Performs a 'crc32' checksum.
|
| java |
Escapes non-ASCII characters to java escape sequences.
|
| reducespace |
Replaces groups of one and more newlines by one new line, and one or more space by one
space. This spares bandwidth and makes the result better readable.
This is default for most XML-like content types.
|
| entities | Any non-ASCII character will be replaced by an XML-entity. |
| xmetodo | Replaces ?, ?, ?, ?, ?, ? with cx, gx, hx, jx, sx, ux |
| hmetodo | Replaces ?, ?, ?, ?, ?, ? with ch, gh, hh, jh, sh, u |
| perl |
Interpret the complete body as a perl program, and write the result.
|
| sitestat |
Rewrites the input to the characters which are alowed in Sitestat keys for
page statistics, being: "A-Z, a-z, 0-9, - . _".
|
see: escape attribute of writer | function | escaper
-
unacceptable
(since: MMBase-1.8.5)
What to do if the to-be-produced content-type seems to be unacceptable for the client.
| Like not using the attribute, i.e. send the content anyway. |
| CRIPPLE<:message> | Try to cripple the type (degrade application/xtml+xml to text/html), until it is
acceptable. If not possible the message can be used for the NOT_ACCEPTABLE response |
| <:message> | Send a NOT_ACCEPTABLE with this message. If message = "_" it will be leaft empty. |
|