Examples
Redirection with the PFC
The following example illustrates how to perform a simple redirection with the PFC. Assume you want some path, /a
, to be redirect to another path, /b
. You can do this as follows:
Note that you do not have to use redirect
, but that doing so will cause the user agent to display the path to page /b
in its URL bar. The instance-passing
attribute is also unnecessary if redirect
is already the default instance passing mode.
Implementing XML services with the PFC
The PFC allows you to very easily receive an XML document submitted, for example with an HTTP POST
, and to generate an XML response. This can be useful to implement XML services such as XML-RPC, SOAP, or any XML-over-HTTP service. The following PFC configuration defines a simple XML service:
Notice that there is no view
attribute: all the processing for this page is done in the page model.
The following content for xml-rpc.xpl
implements an XML service returning as a response the POST-ed XML document:
Notice the optional schema-href
attributes which allow validating the request and the response against schemas.