This article needs additional citations for verification .(May 2022) |
Developer(s) | Apache Software Foundation |
---|---|
Stable release | 2.3.0 / October 29, 2023 |
Repository | |
Written in | Java, XML |
Operating system | Cross-platform |
Type | Web application framework |
License | Apache License 2.0 |
Website | cocoon |
Apache Cocoon, usually abbreviated as Cocoon, is a web application framework built around the concepts of 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. Cocoon's use of XML is intended to improve compatibility of publishing formats, such as HTML and PDF. The content management systems Apache Lenya and Daisy have been created on top of the framework. Cocoon is also commonly used as a data warehousing ETL tool or as middleware for transporting data between systems.
Apache Cocoon uses sitemaps to allow users to control a variety of components in the Cocoon software, as well as define the client-server interactions in what Cocoon refers to as the Pipelines.
The components within Cocoon are grouped by function.
Matchers are used to match user requests such as URLs or cookies against 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 create a 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.
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 ]
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).
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, PDF, RTF, SVG, WML and plain text, for example.
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 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.
Publish content without parsing it (no XML processing). Used for images and such.
Actions are Java classes that execute some business logic or manage new content production.
A pipeline is used to specify how the different Cocoon components interact with a given request to produce a response. [1] A typical pipeline consists of a generator, followed by zero or more transformers, and finally a serializer.
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0 Specification of 1998 and several other related specifications—all of them free open standards—define XML.
XSLT is a language originally designed for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text or XSL Formatting Objects, which may subsequently be converted to other formats, such as PDF, PostScript and PNG. Support for JSON and plain-text transformation was added in later updates to the XSLT 1.0 specification.
Jakarta Server Pages is a collection of technologies that helps software developers create dynamically generated web pages based on HTML, XML, SOAP, or other document types. Released in 1999 by Sun Microsystems, JSP is similar to PHP and ASP, but uses the Java programming language.
In computing, the Java API for XML Processing (JAXP), one of the Java XML application programming interfaces (APIs), provides the capability of validating and parsing XML documents. It has three basic parsing interfaces:
In software, an XML pipeline is formed when XML processes, especially XML transformations and XML validations, are connected.
Schematron is a rule-based validation language for making assertions about the presence or absence of patterns in XML trees. It is a structural schema language expressed in XML using a small number of elements and XPath languages. In many implementations, the Schematron XML is processed into XSLT code for deployment anywhere that XSLT can be used.
Apache Struts 1 is an open-source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model–view–controller (MVC) architecture. It was originally created by Craig McClanahan and donated to the Apache Foundation in May 2000. Formerly located under the Apache Jakarta Project and known as Jakarta Struts, it became a top-level Apache project in 2005.
An XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed by XML itself. These constraints are generally expressed using some combination of grammatical rules governing the order of elements, Boolean predicates that the content must satisfy, data types governing the content of elements and attributes, and more specialized rules such as uniqueness and referential integrity constraints.
Ajax is a set of web development techniques that uses various web technologies on the client-side to create asynchronous web applications. With Ajax, web applications can send and retrieve data from a server asynchronously without interfering with the display and behaviour of the existing page. By decoupling the data interchange layer from the presentation layer, Ajax allows web pages and, by extension, web applications, to change content dynamically without the need to reload the entire page. In practice, modern implementations commonly utilize JSON instead of XML.
The Jakarta Standard Tag Library is a component of the Java EE Web application development platform. It extends the JSP specification by adding a tag library of JSP tags for common tasks, such as XML data processing, conditional execution, database access, loops and internationalization.
The Oxygen XML Editor is a multi-platform XML editor, XSLT/XQuery debugger and profiler with Unicode support. It is a Java application so it can run in Windows, Mac OS X, and Linux. It also has a version that can run as an Eclipse plugin.
Apache OFBiz is an open source enterprise resource planning (ERP) system. It provides a suite of enterprise applications that integrate and automate many of the business processes of an enterprise.
eXtensible Server Pages (XSP) is an XML-based language, which offers the possibility of dynamically arranged Java code into XML documents.
In computer science, marshalling or marshaling is the process of transforming the memory representation of an object into a data format suitable for storage or transmission, especially between different runtimes. It is typically used when data must be moved between different parts of a computer program or from one program to another.
XPath is an expression language designed to support the query or transformation of XML documents. It was defined by the World Wide Web Consortium (W3C) in 1999, and can be used to compute values from the content of an XML document. Support for XPath exists in applications that support XML, such as web browsers, and many programming languages.
XQuery API for Java (XQJ) refers to the common Java API for the W3C XQuery 1.0 specification.
An XML transformation language is a programming language designed specifically to transform an input XML document into an output document which satisfies some specific goal.
Diazo, previously named xdv, is a general-purpose, open source website theming tool. It is written in Python and generates XSLT. Diazo creates a separation between theme pages and transformation rules, allowing web designers to work on templates in plain HTML, without knowledge of XSLT or special template-related codes.
Stylus Studio is an integrated development environment (IDE) for the Extensible Markup Language (XML). It consists of a variety of tools and visual designers to edit and transform XML documents and legacy data such as electronic data interchange (EDI), comma-separated values (CSV) and relational data.