blob: ee00a63722a8a7f7345c916b5672b445993e4464 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<module id="tapestry.markup" version="4.0.0" package="org.apache.tapestry.markup">
Support for markup writers and filters.
<configuration-point id="MarkupFilters">
Defines mapping between content types and markup filters; the filters
are then used when constructing markup writers.
<schema>
<element name="content" key-attribute="type">
<attribute name="type">
The content type to define a filter for, such as "text/html". Should
use all lower-case.
</attribute>
<attribute name="filter" translator="object" required="true">
The filter object, which must implement the MarkupFilter interface.
</attribute>
<rules>
<!-- We always use this configuration as a Map, so pushing and adding
is sufficient. A Map can be generated because we specify a
key attribute. -->
<push-attribute attribute="filter"/>
<invoke-parent method="addElement"/>
</rules>
</element>
</schema>
</configuration-point>
<contribution configuration-id="MarkupFilters">
<content type="text/html" filter="instance:AsciiMarkupFilter"/>
<content type="text/html;charset=utf-8" filter="instance:UTFMarkupFilter"/>
<content type="text/plain" filter="instance:AsciiMarkupFilter"/>
<content type="text/xml;charset=utf-8" filter="instance:UTFMarkupFilter"/>
<content type="text/xml" filter="instance:XmlMarkupFilter"/>
<content type="text/vnd.wap.wml" filter="instance:org.apache.tapestry.wml.WMLMarkupFilter"/>
</contribution>
<service-point id="MarkupWriterSource">
Source for markup writer instances, used when rendering page-oriented
responses to the client.
<invoke-factory>
<construct class="MarkupWriterSourceImpl">
<set-configuration property="contributions" configuration-id="MarkupFilters"/>
</construct>
</invoke-factory>
</service-point>
<contribution configuration-id="tapestry.Infrastructure">
<property name="markupWriterSource" object="service:MarkupWriterSource"/>
</contribution>
</module>