- From: Bruce Chapman <bruce.chapman@nec.co.nz>
- Date: Mon, 08 Mar 2010 17:48:53 +1300
- To: xproc-dev@w3.org
- Message-id: <19EF76FA7148474987CD5B67184680DE@necwlgxpwapp210>
Gentlefolk,
The p:system-property() function allows for implementations to support
properties with names in a non xproc namespace.
<p:log> supports use-when attribute, but use-when requires an xpath
expression that can be evaluated statically - which makes it difficult to
turn <p:log> on/off on a run by run basis without changing pipeline source
code.
If we (http://exproc.org/ ) defined the following two (proposed) extension
namespaces then complying implementations would provide a simple way to
control logging with use-when attribute
1) a namespace for use with p:system-property() to represent the
current environment variables (a notion reasonably consistent across most
operating systems)
Suggested name: http://exproc.org/proposed/ns/properties/env
Suggested normal prefix: env
Example use: <p:log href='.' use-when="p:system-property('env:logall')" />
2) a namespace for use with p:system-property() to represent the
properties of the runtime process - specifically to access
java.lang.System.getProperty() for java based implementations but for use as
appropriate on other platforms (someone more familiar with such
implementations could define more exact semantics here)
Suggested name: http://exproc.org/proposed/ns/properties/runtime
Suggested normal prefix: rt
Example use: <p:log href='.' use-when="p:system-property('rt:log-detail')
> 4" />
Of course these could also be useful outside of <p:log use-when=
As an aside, xproc provides a way to query for the existence of extension
steps ( p:step-available() ) but does not provide a way to check whether
p:system-property() supports a particular extension namespace. Should there
be a standard function to check for p:system-property extension namespace
support?
Received on Monday, 8 March 2010 04:49:40 UTC