Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Apache Cocoon
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Web application framework}} {{More citations needed|date=May 2022}} {{Infobox software | name = Apache Cocoon | logo = Apache Cocoon logo.svg | screenshot = | caption = | developer = [[Apache Software Foundation]] | latest release version = 2.3.0 | latest release date = {{Start date and age|2023|10|29}} | operating system = [[Cross-platform]] | programming language = [[Java (programming language)|Java]], [[XML]] | genre = [[Web application framework]] | license = [[Apache License 2.0]] | website = {{URL|//cocoon.apache.org}} }} '''Apache Cocoon''', usually abbreviated as '''Cocoon''', is a [[web application framework]] built around the concepts of [[Pipeline (software)|Pipeline]], [[separation of concerns]], and component-based web development. The framework focuses on [[XML]] and [[XSLT]] publishing and is built using the [[Java (programming language)|Java programming language]]. Cocoon's use of XML is intended to improve compatibility of publishing formats, such as [[HTML]] and [[PDF]]. The [[content management system]]s Apache Lenya and Daisy have been created on top of the framework. Cocoon is also commonly used as a [[data warehousing]] [[Extract, transform, load|ETL]] tool or as [[Middleware (distributed applications)|middleware]] for transporting data between systems. ==Sitemap== Apache Cocoon uses sitemaps to allow users to control a variety of components in the Cocoon software, as well as define the [[client–server model|client-server]] interactions in what Cocoon refers to as the ''[[XML pipeline|Pipelines]].'' ==Components== The components within Cocoon are grouped by function. ===Matchers=== Matchers are used to match user requests such as [[Uniform Resource Locator|URL]]s or [[http cookie|cookie]]s against [[Wildcard character|wildcard]] or [[regular expression]] patterns. Each user request is tested against matchers in the sitemap until a match is made. It is within a matcher that the response to a particular request is specified. ===Generators=== Generators create a [[stream (computing)|stream]] of data for further processing. This stream can be generated from an existing XML document or there are generators that can create XML from scratch to represent something on the server, such as a directory structure or image data. ====XSP==== One type of generator is an XML Server Page ('''XSP'''), an XML document containing tag-based directives that specify how to generate dynamic content at request time. Upon Cocoon processing, these directives are replaced by generated content so that the resulting, augmented XML document can be subject to further processing (typically an XSLT transformation). XSPs are transformed into Cocoon producers, typically as Java classes, though any scripting language for which a Java-based processor exists could also be used. Directives can be either built-in ("XSP") or user-defined processing tags, both of which are defined in ''logic sheets''. Tags are defined using XSLT templates that describe how the tags (represented as XML nodes) are transformed into other XML nodes or into procedural code such as Java. The tags are used to embed procedural logic, substitute expressions, retrieve information from the webserver environment, and other operations. Note that XSP is deprecated in recent releases of Cocoon.{{Citation needed|date=May 2022}} ===Transformers=== Transformers take a stream of data and change it in some way. The most common transformations are performed with XSLT to change one [[XML]] format into another. But there are also transformers that take other forms of data ([[SQL]] commands for example). ===Serializers=== A serializer turns an XML event stream into a sequence of bytes (such as HTML) that can be returned to the client. Some serializers allow you to send the data in many different formats including [[HTML]], [[XHTML]], [[portable document format|PDF]], [[Rich Text Format|RTF]], [[Scalable Vector Graphics|SVG]], [[Wireless Markup Language|WML]] and [[plain text]], for example. ===Selectors=== Selectors offer the same capabilities as a [[switch statement]]. They are able to select particular elements of a request and choose the correct pipeline part to use. ===Views=== Views are mainly used for testing. A view is an exit point in a pipeline. You can put out the XML-Stream which is produced till this point. So you can see if the application is working right. ===Readers=== Publish content without parsing it (no [[XML]] processing). Used for images and such. ===Actions=== Actions are Java classes that execute some business logic or manage new content production. ==The Pipeline== A ''[[XML pipeline|pipeline]]'' is used to specify how the different Cocoon components interact with a given request to produce a [[Output (computing)|response]].<ref>{{Cite web |date=2003-10-24 |title=An Introduction to Apache Cocoon 2.1|url=https://www.developer.com/open-source/an-introduction-to-apache-cocoon-2-1/ |archive-url=https://web.archive.org/web/20240716062533/https://www.developer.com/open-source/an-introduction-to-apache-cocoon-2-1/ |archive-date=2024-07-16 |url-status=dead |website=Developer.com |language=en-US}}</ref> A typical pipeline consists of a generator, followed by zero or more transformers, and finally a serializer. ==See also== * [[Reactor pattern]] - the design pattern that Cocoon is based on. * [[XProc]] - a W3C Standard for modelising of XML pipeline. ==References== {{Reflist}} ==External links== * [//cocoon.apache.org/ The Apache Cocoon Project] * {{github|apache/cocoon|Mirror of Apache Cocoon}} {{Application frameworks}} {{Apache Software Foundation}} {{DEFAULTSORT:Apache Cocoon}} [[Category:Apache Software Foundation projects|Cocoon]] [[Category:Web frameworks]] [[Category:Java platform software]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Apache Software Foundation
(
edit
)
Template:Application frameworks
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite web
(
edit
)
Template:Github
(
edit
)
Template:Infobox software
(
edit
)
Template:More citations needed
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)