apache > lenya
 

lenyadoc: Protocol

Warning
The lenyadoc: protocol is deprecated and being phased out in favour of the much more versatile lenya-document: protocol.
New code should not use it anymore. This documentation remains here to help people make sense of legacy code.

The lenyadoc: protocol allows to access the source of a Lenya document without knowing the underlying storage structure. If the relative syntax is used, only the language and the UUID is needed. If the absolute syntax is used, the publication id and the area has to be specified additionally.

Relative Syntax

The relative syntax is used to access Lenya documents in the current context, i.e. the current publication and area is used to resolve the document's location.

Syntax: lenyadoc:/<language>/<uuid>

Example

<map:match pattern="*.xml">
  <map:generate src="lenyadoc:/{page-envelope:document-language}/{page-envelope:document-uuid}"/>
  ...
</map:match>

Absolute Syntax

The absolute syntax allows to specify the document's publication and the area.

Syntax: lenyadoc://<publication>/<area>/<language>/<uuid>

Example

<map:match pattern="*.xml">
  <map:generate src="lenyadoc://{page-envelope:publication-id}/{page-envelope:area}/
                     {page-envelope:document-language}/{page-envelope:uuid}"/>
  ...
</map:match>