This project is read-only.

Form (POST) and query string (GET) values

XsltDb provides 3 methods that allow access to controls values and query string parameters:
  • mdo:request ( parameter-name, [default-value] ) - returns GET or POST value.
  • mdo:form ( parameter-name, [default-value] ) - returns POST value
  • mdo:query-string ( parameter-name, [default-value] ) - returns GET value

If parameter is not present in the collection or set to empty value default-value is returned. So mdo:request(name, value) is equal to mdo:coalesce(mdo:request(name),value).


Assume we have an page.

1. Put XstlDb module on that page and create the following configuration:

ID = <xsl:value-of select="mdo:query-string('id', 'not set')"/>
<!-- you can also use short form:
ID = {{mdo:query-string('id', 'not set')}} -->
2. Try different URLs:
ID = not set
ID = 123

Last edited Aug 9, 2010 at 6:09 AM by findy, version 6


No comments yet.