name = not whitespace
prefix = not whitespace
xmlname = ( prefix + ':' )? + name
value = whitespace + ( not whitespace or "anything" or 'anything' ) + whitespace
comment = indentation + ! + anything
empty default namespace = indentation + '#' <- Must follow element or command.
default namespace = indentation + '#' + value <- Must follow element or command.
namespace = indentation + '#' + value + whitespace + value <- Must follow element or command.
attribute = '@' + value + ( whitespace + value )? <- Must follow element or command.
dynamic attribute = '@@' + value + ( whitespace + value )? <- Must follow element or command.
inline empty attribute = '@' + xmlname
inline attribute = '@' + xmlname + whitespace? + '=' + whitespace? + value
inline dynamic attribute = '@@' + xmlname + whitespace? + '=' + whitespace? + value
inline empty default namespace = '#'
inline default namespace = '#' + value
inline namespace = '#' + name + whitespace? + '=' + whitespace? + value
element = indentation + < + xmlname + ( inline-attribute or inline-namespace )*
newline = indentation + "
text = indentation + " + anything
reliable = '~' for false or '-' for non-fatal or '=' for fatal
command = indentation + ( reliable )? + command + ( value or inline-attribute or inline-namespace )*
line continuation = indentation + '\'
bracket = indentation + ( <- Resets indentation to 0
endbracket = indentation + ) <- Resets indentation to previous bracket

macro = '=macro' +  + name + ( inline-attribute )*
load macros = '=load' + value

Substitute for XML characters whenever used in a value.
& = &amp;
&& = &
< = &lt;
> = &gt;

Have to keep & for literal character references.

indentation indicates nesting

!A comment.
?load local:/common.compact
?define include-request
	include @source=request
		$
?define inline-source @content-type
	inline
		request
			include-request
		source
			$@content-type=$content-type
			$$
log info "Response from adams county (submit)."
	include 
		@source =
		\xpath:/soap:Envelope/soap:Body/on:Submit_PRIA_PackageResponse/on:ClerksTransactionNumber/text()?
		\namespace\=on:http://aptitudesolutions.com
		inline
			@@test =
			\xpath:/soap:Envelope/soap:Body/on:Submit_PRIA_PackageResponse/on:Submit_PRIA_PackageResult/text()='false'?
			\namespace=on:http://aptitudesolutions.com
			request
				include local:submit_pria_package.gizmo
					include request:
			source application/x.gizmo.xslt+xml
				(
<stylesheet
	#http://www.w3.org/1999/XSL/Transform
	#gizmo = http://www.lt-systems.com/gizmo.xsd
	#soap = http://schemas.xmlsoap.org/soap/envelope
	#on = http://aptitudesolutions.com

	<output @method=xml @indent=no

	<template @match=/
		error
			@type = XslError
			@message = "Error submitting document to county."
			@county = 08001
			@service = ERecord

			<value-of @select=//on:Errors/text()
				)
