The sitemap is a XML file and is responsible for declaring individual components. It is used to define how those components are used to construct pipelines. Declaring components within the sitemap provides Cocoon with a great deal of extensibility, allowing the plug-and-play addition of new implementations.

The sitemap XML file has the structure shown below:

Example 2-15 Components of a sitemap XML file

<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> <map:components> <!-- component declared here -->

<map:generators/>

<map:readers/>

<map:transformers/>

<map:actions/>

<map:serializers/>

<map:actions/>

<map:matchers/>

<map:selectors/>

</map:components>

<map:pipelines>

<!-- pipeline definitions declared here--> </map:pipelines>

</map:sitemap>

It refers to a specific namespace: ‘"http://apache.org/cocoon/sitemap/1.0", which is used to identify all the elements. As mentioned earlier, the file is divided into two sections: map:components and map: pipelines, reflecting its responsibilities.

This section of this chapter has only served as an introduction to Cocoon. Any further discussions would have involved starting a new chapter. Like any other emerging technology, it tries to compartmentalize data from logic and presentation. Its further acceptance will depend on how much it can keep up with the ever changing requirements of rapidly changing industry.

52 The XML Files: Development of XML/XSL Applications Using WebSphere Studio

Page 68
Image 68
IBM Version 5 manual Example 2-15 Components of a sitemap XML file