Attributes

name
Name of the data view. Must be unique across the whole configuration.
timeout
The maximum time for building the XML view (default=infinite). If this attribute is set, then the builds are done in new threads, and these threads are automatically cancelled whenever the specified time is elapsed.
authorized
User is authorized if the XPath contained in this attribute is evaluated to 'true', else access is denied. All the Lavoisier XPath functions can be used. In particular, the function user() returns the user identifier. Possible configurations include:
  • static or dynamically generated white/black list
  • authorization depending on the user request (value of the request arguments)

post-processors
This attributes references the processors section that is executed at the end of the view (i.e. after the cache plugin if one is configured). If this attribute is not set, then the default processors section "_post-view_" is executed.

Elements

argument

A data view can have arguments. Arguments with a default value are optionals and can be ignored by the user. Other arguments are required and they must be set whenever the data view is invoked. User is allowed to pass undeclared arguments, but of course such arguments will be used only if this is supported by the data view. Undeclared and declared arguments are both accessible through the XPath function arguments().

It is up to the user to choose how to transmit the arguments values. However, each argument must be set only once by request. For example, if the data view declares arguments "arg1" and "arg2", then these arguments can be set by one of the following syntax or any combination of them:

  • Path of the URL (if allowed by the data view, see @path-format below):
    • Any path e.g. XPath or path to a file
    • REST-like with explicit name: http://host:8080/lavoisier/myview/arg1/value1/arg2/value2
    • REST-like with implicit name: http://host:8080/lavoisier/myview/value1/value2
  • Query field of the URL: http://host:8080/lavoisier/myview?arg1=value1&arg2=value2
  • Data stream sent with a POST HTTP request: http://host:8080/lavoisier/myview
    arg1=value1&arg2=value2

Argument elements support the following attributes:

  • @name: The name of the argument. This is the only required attribute. The value of declared arguments can be accessed with their name, prefixed by character "$". It can also be accessed with: arguments()[@key='my-arg']
  • @pattern: A regular expression pattern that can be used to restrict possible values for an argument. The default pattern is "[^/]*".
  • @path-format: This attributes defines the syntax for setting an argument from the path of the URL. Supported options are:
    • none: this option disables setting argument value in the path of the URL
    • value (default): this option enables setting value in the path, with implicit argument name
    • name_value: this option enables setting value in the path, with explicit argument name
  • @eval/text(): The default value of the argument. If @eval or text() is set, then the argument is optional, else it is required. The text() node contains a static value, while the attribute @eval contains a XPath that is dynamically evaluated when view is invoked. This XPath can use value of other arguments, even if these arguments are set by the user.

namespace
For internal purpose. You should use the standard notation instead:
xmlns:prefix="..."

info
A list of tags associated to the view. Usage examples for this include:
  • view description
  • group or category of data views
  • view visibility (public, private)
  • view production status (production, test)
  • author
  • ...
This can be used for pure informational purpose, as well as for automatic processing through XSL stylesheet for example.