Attachment 'sequence.html'

Download

Lenya pipeline sequence documentation

The flow of control through the pipelines is difficult to determine given the number of sitemap files and pipelines within these files. I've documented the flow of control for a single scenario for the "default" publication. The flow of control were determined by setting the logging level to DEBUG for the sitemap category in the lenya/WEB-INF/logkit.xconf and examining the subsequent output in lenya/WEB-INF/logs/sitemap.log.

Use case: Display live document

This use case begins with the user at the publication's overview document. The user then selects the live view (also known as the reader's view). We'll start from there.

The sequence diagram is quite complicated even for this simple use case. There are 18 distinct pipeline matchers used, some multiple time. I provide both a sequence diagram and prose to document.

There are some interesting choices to make when documenting a Cocoon pipeline design using standard UML notation. What is considered an object and another a message is not obvious since the pipeline components do not map directly to the UML object model. This the mapping I've used in this document.

Sequence diagram

Sequence diagram.  See following section for textual description.

Sequence description

1. lenya/sitemap.xmap:265:31

Matcher: Wildcard: **

  1. default/live/index.html
  2. default/live/index.html

Simply mounts lenya/global-sitemap.xmap.

1.1 lenya/global-sitemap.xmap:840:35

Matcher: Wildcard: */*/**

  1. default/live/index.html
  2. default
  3. live
  4. index.html

This invokes the action sitemap.action.resource-exists-enhanced with result that file does not exist. The rest of the action is skipped and continues with the next matcher.

1.2 lenya/global-sitemap.xmap:869:33

Matcher: Wildcard: */**

  1. default/live/index.html
  2. default
  3. live/index.html

Simple mounts the publication specific sitemap.

1.2.1 lenya/lenya/pubs/default/sitemap.xmap:19:31

Matcher: Wildcard: **

  1. live/index.html
  2. live/index.html

Simply mounts the lenya/lenya/pubs/default/publication-sitemap.xmap

This sitemap doesn't seem to serve any real purpose since it only has a single pipeline that simply mounts this one file.

1.2.1.1 lenya/lenya/pubs/default/publication-sitemap.xmap:106:36

Matcher: Wildcard: **.html

  1. live/index.html
  2. live/index

This is the main entry point into the publication. It invokes an action that does some error checking about available languages. This succeeds and it invokes a generator using the cocoon protocol (local) in the subsequence 1.2.1.1.2. It then will transform the result, again using the cocoon protocol (global) in the subsequence 1.2.1.1.3

I don't understand how the URI is change to what is see by the next matcher. Somehow the action is setting this.

1.2.1.1.1 lenya/sitemap.xmap:259:31

Matcher: Wildcard: **

  1. uri-parameter/default/doctype/live/index.html
  2. uri-parameter/default/doctype/live/index.html

This is the first step in implementing the action in this chain. This is an internal-only pipeline (which must be why it wasn't matched in the first step). It simply mounts global-sitemap.xmap.

1.2.1.1.1.1 lenya/global-sitemap.xmap:741:51

Matcher: Wildcard: uri-parameter/*/*/*/**

  1. uri-parameter/default/doctype/live/index.html
  2. default
  3. doctype
  4. live
  5. index.html

Mounts lenya/pubs/{1}/parameter-{2}.xmap which in this scenario is lenya/pubs/default/parameter-doctype.xmap.

1.2.1.1.1.1.1 lenya/lenya/pubs/default/parameter-doctype.xmap:30:38

Matcher: Wildcard: */**.html

  1. live/index.html
  2. live
  3. index.html

This file contains only two pipelines: one for HTML files and one for XML. This is the HTML pipeline. It uses an action to determine the type of the document that is being processed. It determines it is a XHTML by, I believe, looking for the namespace attribute in root element of the document. I believe it then uses this in the URI but I'm not sure how.

I believe this completes the action portion of the matcher in the subsequence 1.2.1.1. The pipeline then continues with the subsequence 1.2.1.1.2 which is a generator component using the cocoon protocol.

1.2.1.1.2 lenya/lenya/pubs/default/publication-sitemap.xmap:79:49

Matcher: Wildcard: lenyabody-*/*/*/*/**

  1. lenyabody-view/default/live/xhtml/index.html
  2. view
  3. default
  4. live
  5. xhtml
  6. index.html

This is the pipeline that builds the page. It aggregates all the navigational elements (breadcrumb, tabs, and menu) with the actual content of the document all within the root element cmsbody. It then transforms using the stylesheet xslt/page2xhtml.xsl. Lastly, it serializes the document as XML.

1.2.1.1.2.1 lenya/sitemap.xmap:259:31

Matcher: **

  1. navigation/default/live/breadcrumb/index.html.xml
  2. navigation/default/live/breadcrumb/index.html.xml

This is the same internal-only pipeline we saw earlier. It simply mounts the global-sitemap.xmap. We are now processing the navigation portion of the final document.

1.2.1.1.2.1.1 lenya/global-sitemap.xmap:736:42

Matcher: navigation/**

  1. navigation/default/live/breadcrumb/index.html.xml
  2. default/live/breadcrumb/index.html.xml

Simply mounts lenya/navigation.xmap.

1.2.1.1.2.1.1.1 lenya/lenya/navigation.xmap:99:39

Matcher: Wildcard: */*/*/**.xml

  1. default/live/breadcrumb/index.html.xml
  2. default
  3. live
  4. breadcrumb
  5. index.html

Invokes a generator using the local cocoon protocol. Then calls a local resource for a fallback transformation.

1.2.1.1.2.1.1.1.1 lenya/lenya/navigation.xmap:65:46

Matcher: Wildcard: */*/sitetree/**.xml

  1. default/live/sitetree/index.html.xml
  2. default
  3. live
  4. index.html

Generates the XML stream using the publication's sitetree.xml file, then uses the default stylesheet lenya/lenya/xslt/navigation/sitetree2nav.xsl to transform the stream.

1.2.1.1.2.2 lenya/sitemap.xmap:259:31

Matcher: **

  1. navigation/default/live/breadcrumb/index.html.xml
  2. navigation/default/live/breadcrumb/index.html.xml

We are now in the same pipeline chain as for the breadcrumb except now for tabs.

1.2.1.1.2.2.1 lenya/global-sitemap.xmap:736:42

Matcher: navigation/**

  1. navigation/default/live/tabs/index.html.xml
  2. default/live/tabs/index.html.xml

Simply mounts lenya/navigation.xmap.

1.2.1.1.2.2.1.1 lenya/lenya/navigation.xmap:99:39

Matcher: Wildcard: */*/*/**.xml

  1. default/live/tabs/index.html.xml
  2. default
  3. live
  4. tabs
  5. index.html

Invokes a generator using the local cocoon protocol. Then calls a local resource for a fallback transformation.

1.2.1.1.2.2.1.1.1 lenya/lenya/navigation.xmap:65:46

Matcher: Wildcard: */*/sitetree/**.xml

  1. default/live/sitetree/index.html.xml
  2. default
  3. live
  4. index.html

Generates the XML stream using the publication's sitetree.xml file, then uses the default stylesheet lenya/lenya/xslt/navigation/sitetree2nav.xsl to transform the stream.

1.2.1.1.2.3 lenya/sitemap.xmap:259:31

Matcher: **

  1. navigation/default/live/breadcrumb/index.html.xml
  2. navigation/default/live/breadcrumb/index.html.xml

We are now in the same pipeline chain as for the breadcrumb except now for menu.

1.2.1.1.2.3.1 lenya/global-sitemap.xmap:736:42

Matcher: navigation/**

  1. navigation/default/live/menu/index.html.xml
  2. default/live/menu/index.html.xml

Simply mounts lenya/navigation.xmap.

1.2.1.1.2.3.1.1 lenya/lenya/navigation.xmap:99:39

Matcher: Wildcard: */*/*/**.xml

  1. default/live/menu/index.html.xml
  2. default
  3. live
  4. menu
  5. index.html

Invokes a generator using the local cocoon protocol. Then calls a local resource for a fallback transformation.

1.2.1.1.2.3.1.1.1 lenya/lenya/navigation.xmap:65:46

Matcher: Wildcard: */*/sitetree/**.xml

  1. default/live/sitetree/index.html.xml
  2. default
  3. live
  4. index.html

Generates the XML stream using the publication's sitetree.xml file, then uses the default stylesheet lenya/lenya/xslt/navigation/sitetree2nav.xsl to transform the stream.

1.2.1.1.2.4 lenya/lenya/pubs/default/publication-sitemap.xmap:50:56

Matcher: Wildcard: lenya-document-*/*/*/**.xml

  1. lenya-document-view/live/xhtml/index/index_en.xml
  2. view
  3. live
  4. xhtml
  5. index/index_en

This is the last part of the aggregation in parent subsequence. We are now processing the document content. All this subsequence does is mount the doctypes.xmap sitemap file.

1.2.1.1.2.4.1 lenya/lenya/pubs/default/doctypes.xmap:21:39

Matcher: Wildcard: */*/**.xml

  1. view/live/xhtml/index/index_en.xml
  2. view
  3. live
  4. xhtml/index/index_en

This has a nested matcher that fails. So processing simply moves to the next matcher.

1.2.1.1.2.4.2 lenya/lenya/pubs/default/doctypes.xmap:32:41

Matcher: Wildcard: */*/*/**.xml

  1. view/live/xhtml/index/index_en.xml
  2. view
  3. live
  4. xhtml
  5. index/index_en

This takes the document content and transforms it using the xslt/xhtml2xhtml.xls stylesheet. It is finally serialized as XML.

1.2.1.1.3 lenya/sitemap.xmap:259:31

Matcher: Wildcard: **

  1. lenya-page/default/live/index.xml
  2. lenya-page/default/live/index.xml

This is the implementation of the transformation in the main entry point into the publication which used the cocoon protocol (global). This is the same matcher we've seen many time now which simply mounts global-sitemap.xmap.

For some reason this sequence is repeated twice in the log file. I have no idea why. Could it be an issue with caching?

1.2.1.1.3.1 lenya/global-sitemap.xmap:681:46

Matcher: lenya-page/*/*/**

  1. lenya-page/default/live/index.xml
  2. default
  3. live
  4. index.xml

This uses a generator using the cocoon protocol to a local pipeline. It then invokes a series of actions and transformers involving i18n and menu creation.

I don't believe this subsequence has any effect on the document.

1.2.1.1.3.1.1 lenya/global-sitemap.xmap:731:63

Matcher: menu-xml/*/**

  1. menu-xml/default/live/index.xml
  2. default
  3. live/index.xml

This is a internal-only matcher that simply mounts the publication specific lenya/pubs/default/menus.xmap.

1.2.1.1.3.1.1.1 lenya/lenya/pubs/default/menus.xmap:17:36

Matcher: live/**

  1. live/index.xml
  2. index.xml

This file only has a single pipeline with two matchers, the first which is matched here. Is uses the XSP lenya/lenya/content/menus/live.xsp which seems to set some meta imformation.

I don't understand what the purpose of this matcher is.

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.

You are not allowed to attach a file to this page.