| <?xml version="1.0" encoding="iso-8859-1"?> |
| |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You 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. |
| --> |
| |
| <page |
| xmlns:cinclude="http://apache.org/cocoon/include/1.0" |
| > |
| |
| <content> |
| <h2>SVG output</h2> |
| |
| <p> |
| At the end of the pipeline, different Serializers can generate different output formats, |
| provided they're fed the right data (i.e. the required XML elements and namespaces). |
| </p> |
| <p> |
| Let's generate a simple graph out of of our request parameters. If your have an SVG |
| plugin in your browser you can view the result: <a href="../red/request.svg">red/request.svg</a> |
| or <a href="../blue/request.svg">blue/request.svg</a>. If you don't have an SVG plugin see |
| below for the bitmapped version of the same image. |
| </p> |
| |
| <h3>Sitemap excerpt</h3> |
| <cinclude:include element="xml-code" src="cocoon:/xml-element/pipelines/sitemap.xmap/svgRequest"/> |
| |
| <h3>XSL transformation</h3> |
| <p>Here we show only the main template wich generates the SVG skeleton</p> |
| <cinclude:include element="xml-code" src="cocoon:/xml-element/pipelines/xsl/request-to-svg.xsl/main"/> |
| |
| <h3>Typical output</h3> |
| <cinclude:include element="xml-code" src="cocoon:/pipelines/red/request.svg"/> |
| |
| <h2>Bitmapped output</h2> |
| |
| <p> |
| Post-processing the SVG output allows us to generate JPEG |
| (<a href="../cyan/request.jpeg">cyan/request.jpeg</a>) |
| or PNG |
| (<a href="../black/request.png">black/request.png</a>) |
| images, simply by configuring |
| a different serializer at the end of the pipeline. |
| </p> |
| |
| <h3>Sitemap excerpts</h3> |
| <p> |
| Note the use of the <em>cocoon:/</em> protocol to re-use the previous pipeline as input: when a request |
| to <em>blue/request.png</em> is received, the output of the <em>blue/request.svg</em> is used |
| as the input of the first pipeline shown below. |
| </p> |
| <cinclude:include element="xml-code" src="cocoon:/xml-element/pipelines/sitemap.xmap/pngRequest"/> |
| <cinclude:include element="xml-code" src="cocoon:/xml-element/pipelines/sitemap.xmap/jpegRequest"/> |
| |
| </content> |
| </page> |