\n\n","\n \n\n","The second definition of the my:foo function won't override the first one because the "," attribute is set to ","no"," (even though the expanded QName and the arity of the functions are the same). \n","4.10.1 Function signature syntax "," attribute of the "," element has the following syntax:\n"," CustomFunctionSignature\n"," ::=\n","FunctionName \"(\" ParamList? \")\" (\"as\" SequenceType)?"," FunctionName\n","QNameButNoNCName"," ParamList\n","Param (\",\" Param)*"," Param\n","\"$\" QName TypeDeclaration?"," TypeDeclaration\n","\"as\" SequenceType","\nThe function name is a QName but not an NCName. This means that a form author cannot add functions to the default function namespace.\n","The parameter list defines the formal arguments to the function. When the function is called using a function-call in an expression, the first argument supplied is assigned to the first parameter, the second argument supplied is assigned to the second parameter, and so on.\n","The type declaration defines the required type of the parameter. The rules for converting the values of the actual arguments supplied in the function call to the types required by each parameter are defined in [XPath 2.0]. The rules that apply are those for the case where XPath 1.0 compatibility mode is set to false.\n","If the value of a parameter to a custom function cannot be converted to the required type, a type error is signaled.\n","If the type declaration is omitted, no conversion takes place and any value is accepted.\n","[ERR] It is a static error if two parameters of a custom function have the same name.\n","We do not allow optional parameters.","The following are examples of some function signatures:\n","function with name my:foo that has no arguments and returns an xs:integer","my:foo() as xs:integer","function with name my:sumproduct that takes two sequences of xs:decimal and returns an xs:decimal","my:sumproduct($p as xs:decimal*, $q as xs:decimal*) as xs:decimal","4.10.2 Function body ","The function body contains an optional sequence of variables, followed by a constructor for the return value of the function. The constructor can either be a sequence of "," elements or a sequence of ","script","Both the "," elements allow specifying a return value comprised or atomic values or nodes.\n","The definition of the function is skipped when the "," element uses a language that isn't supported by the XForms implementation. The script implementation should be stable (calling the same function twice within an execution scope with the same arguments returns the same result) and should be side effect free (they should for example not change any instance data).\n"," 2012-03-15\n"," We are considering a lighter syntax, we are thinking of also allow a value attribute on the function element and/or making the expression/script the child contents of the element.\n","The implementation of the function should be stable and should not change any instance data, nor should it change the internal state of form (e.g.: should not change the repeat index) or processor.\n","4.10.3 Function body evaluation context ","Within the body of a custom function, the focus is initially undefined; this means that any attempt to reference the context item, context position, or context size is a non-recoverable dynamic error ([err:XPDY0002] as defined in XPath 2.0)\n","The variables in scope for the function body include all variables representing the function parameters, as well as all variables that are in scope where the custom function is defined.\n","Note: Function parameter names can mask variables that would otherwise be in scope for the function body. \n","XPath expressions within the function body may refer to instance data through the instance() function.\n","4.10.4 The sequence element "," element is used to construct a sequence. The element is used inside a "," element to construct the result the function.\n"," Contains the expression that is used to construct the sequence. \n","4.11 Extension Functions","XForms documents may use additional extension functions beyond those defined in the document and added by the expression language. A number of useful community extensions are defined at "," [EXSLT]",". The names of any such extension functions must be declared in attribute "," on element ",". Such declarations are used by the XForms Processor to check against available extension functions. XForms Processors perform this check at the time the document is loaded, and halt processing by signaling an exception (",") if the XForms document declares an extension function for which the processor does not have an implementation.\n","Explicitly declaring extension functions enables XForms Processors to detect the use of unimplemented extension functions at document load-time, rather than throwing a fatal exception (xforms-bind-exception or xforms-compute-exception) during user interaction. Failure by authors to declare extension functions will result in an XForms Processor potentially halting processing during user interaction with a fatal error.\n","5 Datatypes","This chapter defines the datatypes used in defining an XForms Model.\n","5.1 XML Schema Built-in Datatypes","XForms supports all XML Schema 1.0 ","datatypes"," except for ","xsd:ENTITY","xsd:ENTITIES","xsd:NOTATION",". Concepts ","value space","lexical space"," and constraining ","facets"," are as specified in [","]. XForms Processors must treat these datatypes as in-scope without requiring the inclusion of an XML Schema.\n","The built-in datatype ","xsd:duration"," does not support a total ordering. Form authors are encouraged to use ","xforms:dayTimeDuration","xforms:yearMonthDuration"," instead.\n","5.2 XForms Datatypes","XForms defines the following types in the XForms namespace. These datatypes can be used in the "," model item property without a namespace prefix when the default namespace is the XForms namespace. All of these datatypes allow empty content. XForms Processors must treat these datatypes as in-scope without requiring the inclusion of an XML Schema.\n","5.2.1 XForms Datatypes Allowing Empty Content","Many default XML schema types report empty content as invalid, which conflicts with the use of the "," model item property. The following XForms datatypes are defined as having a lexical space consisting of either the empty string or the lexical space of the corresponding XML schema datatype. Although some XML schema datatypes do allow empty string content, they have also been added to the available XForms datatypes for form authoring consistency.\n","Built-in primitive types (in the XForms namespace):\n","\n\ndateTime
time
date
duration
gYearMonth
gYear
gMonthDay
gDay
gMonth
string
boolean
base64Binary
hexBinary
float
decimal
double
anyURI
QName\n\n","Built-in derived types (in the XForms namespace):\n","\n\nnormalizedString
token
language
Name
NCName
ID
IDREF
IDREFS
NMTOKEN
NMTOKENS
integer
nonPositiveInteger
negativeInteger
long
int
short
byte
nonNegativeInteger
unsignedLong
unsignedInt
unsignedShort
unsignedByte
positiveInteger\n\n","5.2.2 xforms:listItem","This datatype serves as a base for the listItems datatype. The lexical space for listItem permits one or more characters valid for xsd:string, except white space characters.\n","5.2.3 xforms:listItems","XForms includes form controls that produce simpleType list content. This is facilitated by defining a ","derived-by-list"," datatype. The lexical space for listItems is defined by list-derivation from "," listItem","In most cases, it is better to use markup to distinguish items in a list. See The itemset Element.\n","5.2.4 xforms:dayTimeDuration","XForms includes a totally ordered duration datatype that can represent a duration of days, hours, minutes, and fractional seconds. The value space for this datatype is the set of fractional second values. This datatype is derived from ","The dayTimeDuration datatype is made available by the XForms processor based on the following lexical space definition:\n","xforms:dayTimeDuration type definition","\n \n\n \n\n \n\n","Example xforms:dayTimeDuration values"," P13D\n PT47H\n P3DT2H\n-PT35.89S\n P4DT251M\n","5.2.5 xforms:yearMonthDuration","XForms includes a totally ordered duration datatype that can represent a duration of a whole number of months and years. The value space for this datatype is the set of integer month values. This datatype is derived from ","The yearMonthDuration datatype is made available by the XForms processor based on the following lexical space definition:\n","xforms:yearMonthDuration type definition","\n \n\n \n\n \n\n","Example xforms:yearMonthDuration values","P3Y\nP36M\n-P1Y1M\n","5.2.6 xforms:email","This datatype represents an email address, as defined by [RFC 2822]. Internationalized email addresses are not restricted by XForms beyond the definition in the RFC. For simplicity, some extremely uncommon features of the RFC syntax are not allowed, such as \"Obsolete Addressing\" from section 4.4, square-bracketed \"domain-literal\"s, and insignificant whitespace and comments.\n","The email datatype is made available by the XForms processor based on the following lexical space definition:\n","xforms:email type definition","\n \n\n \n\n \n\n","Example xforms:email addresses","editors@example.com\n~my_mail+{nospam}$?@sub-domain.example.info\n","Whilst the string "," is a valid xsd:anyURI, it is not a valid xforms:email because the colon separator for the URI scheme is not allowed before the '@' symbol. A valid xforms:email address does not include a ","mailto:"," URI scheme.\n","5.2.7 xforms:card-number","This type defines the basic lexical properties of a datatype that can be used to represent various ID, debit and credit card numbers.. The lexical space of the xforms:card-number datatype is a pattern restriction on ","xsd:string",": it must be zero or more digits (0 - 9).\n","The display representation of this datatype by form controls is not required to match the lexical space of the bound instance data. User agents should apply appropriate conventions to the display and input of values, including separator characters.\n","xforms:card-number type definition","\n \n \n This type defines the basic lexical properties for a datatype that can be used to represent\n various ID numbers such as for debit and credit cards.\n This type does not apply the Luhn checksum algorithm.\n \n \n \n \n \n\n","The standard defines the structure of the number as well as how to apply the Luhn formula to ensure a correct check digit. This type only specifies the format of the number. The complementary function ","is-card-number()"," should be used to validate that the ID number conforms to the specification.\n","Credit Card Example","http://www.w3.org/2002/xforms\">\n \n \n 4111111111111111\n \n \n \n \n\n","This example specifies that the element "," is of the type ","card-number"," and that to be valid the "," function must evaluate to true indicating that check digit is valid.\n","6 Model Item Properties","This chapter defines infoset contributions that can be bound to ","instance data nodes"," with element ","The bind Element","). The combination of these contributions to an ","instance data node"," is called a ","model item",". Taken together, these contributions are called ",", and are defined in the following section. In contrast, the term ","Schema constraint"," refers only to XML Schema constraints from the "," of a given datatype.\n","It is an exception (The xforms-binding-exception Event) to attach Model Item Properties to atomic values or nodes that don't belong to an instance.\n","6.1 Model Item Property Definitions","Model item properties can be distinguished along various axes.\n","Computed expressions vs. fixed properties:\n"," Fixed properties are static values that the XForms Processor evaluates only once. Such properties consist of literals, and are not subject to evaluation of expressions.\n"," Computed expressions are expressions that provide a value to the XForms Processor. Such values are recalculated at certain times as specified by the XForms Processing Model (see Processing Model). These expressions encode dynamic properties, often constraints, such as the dependency among various data items. Computed expressions are not restricted to examining the value of the instance data node to which they apply. Expressions provide the means to traverse the instance data; more complex computations may be encoded as call-outs to external scripts.\n","Inheritance rules:\n","Some model item properties define inheritance rules, in which case the XForms Processor needs to keep track of two separate values: 1) the ","local value",", which is applied from an attribute of element ",", and 2) the ","inherited value",", which is determined by combining the evaluated local value with the evaluated values from ancestor nodes in the instance data.\n","The sample recalculation algorithm defined in Recalculation Sequence Algorithm is defined to operate only on the local values of a model item property. It assumes that an implementation propagates the combined values to a node's descendants.\n","Assigning local values:\n","Local values are assigned by processing all bind elements in an XForms Model in document order.\nFor most properties it is allowed to assign the same property more than once to a value using different bind elements (for instance having two binds selecting the same element, each specifying a constraint). Depending on the property, the additional bindings are either combined so that all have to be true, or that at least one has to be true, according to the following table:\n"," property\n"," combination\n"," type\n"," all\n"," constraint\n"," relevant\n"," required\n"," one\n"," readonly\n"," calculate\n"," (not allowed)\n"," p3ptype\n","For example, \n","\n\n","has the same effect as\n","\n","See also The xforms-rebuild Event for details of the properties being applied.\n","The following sections list the model item properties available as part of all model items. For each, the following information is provided:\n","\n\nDescription
Computed Expression (yes or no)
Legal Values
Default Value
Inheritance Rules\n\n","6.1.1 The type Property","Description: The "," model item property [doesn't support AVT] can be applied to both elements and attributes. The "," model item property is not applied to instance nodes that contain child elements. The "," model item property associates a datatype (as defined in [","]) with the string-value (as defined in [","]) of an instance node. The datatype being associated can be obtained from a simpleType definition or a simpleContent definition from a complexType. If the datatype cannot be obtained as just described, then the Default Value of "," is used. This model item property does not prevent form controls and XForms actions from setting invalid values into data nodes.\n","Computed Expression: No.\n","Legal Values: Any ","xsd:QName"," representing a datatype definition in an XML Schema. The namespace context from the parent "," of the "," attribute is used to resolve the namespace qualification of the value.\n","Default Value: ","Inheritance Rules: does not inherit.\n","This model item property contributes to the overall validity assessment of a node; the effect of validity state on bound form controls is described in Section Implementation Requirements Common to All Form Controls.\n","In XML Schema, an element can be made nillable. Although this means it can have empty content, nillable is defined by [","] to be a property of an element, not a type. Therefore, the nillable property from XML Schema cannot be applied to instance nodes using the "," model item property.\n","Associating datatypes with instance nodes","\n\n \n \n\t\n \n \n\t\n \n\n \n \n \n \n \n \n \n \n\n \n \n Hello, world!\n \n 100.00\n abc\n 100.00\n abc\n \n \n 100.00\n abc\n 100.00\n abc\n \n \n \n\n \n \n \n \n \n\n\n","The first bind expresses the default datatype of xsd:string.\n","The second and third binds place type model item properties on each of the four ","price"," element children of the elements ","simpleType","complexType",". Both binds associate the datatype ","xsd:double"," with the nodes. In both cases, the first and third nodes are considered valid according to the type model item property because their content matches the "," datatype constraint. For both binds, the second and fourth "," nodes are not valid due to their content.\n","The fourth bind places a type model item property on the ","currency"," attribute of the third "," element. According to this association, the "," attribute node is not valid because its content does not match the enumeration given for ","my:Currency",". Note that the containing element "," is valid according to its type model item property.\n","The fifth bind attempts to associate a datatype with the ","data"," element. The association is ignored since the "," element contains child elements.\n","6.1.2 The readonly Property","Description: describes whether the node content is restricted from changing.\n","Computed Expression: Yes.\n","Legal Values: Any expression that is convertible to a ","boolean"," as described in the ","false()",", unless a "," is specified for the value property, then ","true()","Inheritance Rules: If any ancestor node evaluates to ","true",", this value is treated as ",". Otherwise, the local value is used.\n","This is the equivalent of taking the logical OR of the evaluated "," property on the local and every ancestor node.\n",", this model item property indicates that the XForms Processor must not allow any direct changes to the content of the bound instance data node from constructs other than the model item property system (i.e. other than a ","). Instance mutations performed by ",", form controls, DOM interface access, and XForms actions must not insert or copy a new node into a parent node that is readonly, delete or replace a node whose parent is readonly, nor change the value or content of a readonly node. A node that is readonly but whose parent is not readonly can be entirely deleted or replaced by a submission even though doing so indirectly results in deletion or replacement of readonly descendant nodes.\n","In addition to restricting value changes, the "," model item property provides information to the XForms user interface about how bound form controls should be rendered. Form controls bound to instance data with the "," model item property that evaluates to "," should indicate that entering or changing the value is not allowed. This specification does not define any effect of the "," model item property on visibility, focus, or navigation order.\n","Attaching a readonly property","\n \n Roland\n \n \n\n\n","Here, we have associated a "," property with an element.\n","The following example illustrates the ability to override the default "," setting on calculated nodes.\n","Setting a default value","\n \n \n \n \n \n ...\n \n","The calculate on ","my:data"," is executed on any recalculate that follows a rebuild, including the form initialization, so the user initially sees the word 'default'. The user may make any change to "," with the ",", and the calculation will be executed again as a result. Therefore, if the user enters an empty value, then the calculate will change "," back to 'default'.\n","6.1.3 The required Property","Description: describes whether a value is required before the instance data is submitted.\n","A form may ","require"," certain values, and this requirement may be dynamic. When evaluating to ",", this model item property indicates that a non-empty instance data node is required before a submission of instance data can occur. Non-empty is defined as: The value of the bound instance data node must be convertible to ","string"," using the string conversion function as described in the "," with a length greater than zero.\n","The XML Schema feature represented by ","nillable","xsi:nil"," is unrelated to the XForms "," model item property. An element may have the "," attribute set to "," to indicate that its empty content is schema valid, but if the "," model item property for that element node is ",", then the element violates the "," constraint because a required node must be non-empty as defined above.\n","Except as noted below, the "," model item property does not provide a hint to the XForms user interface regarding visibility, focus, or navigation order. XForms authors are strongly encouraged to make sure that form controls that accept "," data are visible. An XForms Processor must provide an indication that a form control is required, and may provide immediate feedback, including limiting navigation. This model item property does not prevent form controls and XForms actions from setting empty strings into data nodes.\n","Attaching a required property","\n \n Roland\n \n \n\n\n"," property with element ","my:last-name"," to indicate that a value must be supplied.\n","XML Schema has a similarly named concept with ","use","=","\"required|optional|prohibited\"",". This is different than the XForms Model item property, in two ways: 1) "," applies only to attributes, while XForms "," applies to any node. 2) "," is concerned with whether the entire attribute must be specified (without regard to value), while "," determines whether a value is required of the node before submission.\n","6.1.4 The relevant Property","Description: indicates whether the model item is currently ",". Instance data nodes with this property evaluating to ","false"," are unavailable in the user interface and can be removed from submission serialization.\n","This is the equivalent of taking the logical AND of the evaluated ","Many forms have data entry sections that depend on other conditions. For example, a form might ask whether the respondent owns a car. It is only appropriate to ask for further information about their car if they have indicated that they own one.\n","Through single node UI bindings, the "," model item property provides information to the XForms user interface regarding visibility, focus, and navigation order. In general, when ",", associated form controls should be made available for user interaction. When ",", associated form controls (and any children) and group and switch elements (including content) must be made unavailable, removed from the navigation order, and not allowed focus. Typically, non-relevant user interface content is not presented, or it may be styled as disabled. Elements other than form controls may also use a Single Item Binding that selects a non-relevant node, but such elements are not made unavailable or non-operable due to the Single Item Binding because it is not a ","UI binding expression",". For example, actions such as ","The setvalue Element","The message Element"," or the ","The submission Element"," remain operable if their Single Item Bindings select a non-relevant node. However, some such elements may indirectly be affected by the "," model item property. For example, it is possible for non-relevant nodes to be excluded from the data of a submission. Similarly, non-relevance indirectly affects the running of actions because a non-relevant form control disables event handlers that listen for events targeted at the form control element.\n","A core form control, group or switch must express a Single Item Binding in order to be associated with an instance node. Due to the definition of ","repeat object"," model item property of the node in the associated ","repeat item"," affects the availability of the repeat object.\n","Attaching a relevant property","\n \n \n \n 100\n \n \n\n 1000\"/>\n","my:discount"," to indicate a discount is relevant when the order amount is greater than 1000.\n","6.1.5 The calculate Property","Description: supplies an expression used to calculate a string value for the associated instance data node.\n","Legal Values: Any expression.\n","Default Value: none.\n","An XForms Model may include model items whose string values are computed from other values. For example, the sum over line items for quantity times unit price, or the amount of tax to be paid on an order. The formula for such a computed value can be expressed with a "," property, whose expression is evaluated, converted to a string with the "," conversion function as described in the ",", and stored as the value content of the calculated data node. Chapter ","Processing Model"," contains details of when and how the calculation is performed.\n","Attaching a calculate property","\n \n \n \n \n \n \n\n 1000\"/>\n"," to indicate a discount of 10% is relevant when the order amount is greater than 1000.\n","6.1.6 The constraint Property","Description: specifies a predicate that needs to be satisfied for the associated instance data node to be considered valid.\n","When evaluating to ",", the associated model item is not valid; the converse is not necessarily true. This model item property does not prevent form controls and XForms actions from setting invalid values into data nodes. Chapter "," contains details of when and how the constraint is calculated as well as when validation is performed. This model item property contributes to the overall validity assessment of a node; the effect of validity state on bound form controls is described in Section ","Implementation Requirements Common to All Form Controls","Attaching a constraint property","\n \n \n \n \n\n ../my:from\" />\n","Here, a ","constraint"," property associated with element ","my:to"," indicates that its value must be greater than that of element ","my:from","Specifying minimum and maximum occurrences for nodes in the instance data can be achieved by using the "," function within a "," property.\n","6.1.7 The p3ptype Property (deprecated)","The p3ptype is deprecated.\n","Description: Attaches a P3P data element to an instance data node, indicating the specific kind of data collected there. The attribute doesn't support AVT.\n","Legal Values: ","Default Value: none\n","This model item property holds a description of the kind of data collected by the associated instance data node, based on the P3P datatype system [P3P 1.0]. This information may be used to enhance the form-fill experience, for example by supplying previously-known data.\n","Attaching a type constraint using Binding","\n \n \n \n \n\n\n","Here, we have attached both XML Schema and P3P type information to element ","first-name"," via element ","6.2 Schema Constraints","Chapter ","Datatypes"," described how XForms uses the XML Schema datatype system to constrain the "," of data values collected by an XForms Model. Such datatype constraints can be provided via an XML Schema. Alternatively, this section lists various mechanisms for attaching type constraints to instance data. Attributes ","xsi:schemaLocation","xsi:noNamespaceSchemaLocation"," are ignored for purposes for locating a Schema.\n","6.2.1 Atomic Datatype","The XForms Processing Model applies XML Schema facets as part of the validation process. At the simplest level, it is necessary to associate a set of facets (through an XML Schema datatype) with a model item. This has the effect of restricting the allowable values of the associated instance data node to valid representations of the lexical space of the datatype.\n","The set of facets associated with a model item must be determined by the following list, as if it were processed in the given order. When multiple datatype restrictions apply to the same model item, the combination of all given restrictions must apply. Note that it is possible to produce a combination of restrictions that is impossible to satisfy; authors are encouraged to avoid this practice.\n"," Applicable XML schema definitions (including those associated an external or an inline schema, or by ","xsi:type",")\n"," An XForms "," constraint associated with the instance data node using XForms ","binding"," If no type constraint is provided, the instance data node defaults to ","type=\"xsd:string\""," (default to string rule).\n","The following declares a datatype based on "," with an additional constraining facet.\n","Type Constraint Using XML Schema","\n \n \n \n\n","This new datatype would then be associated with one or more model items through one of the methods outlined here.\n","Attaching A Type Constraint","\n","This defines element "," to be of type ","my:nonEmptyString","Attaching Type Constraint Using XForms Binding","\n \n\n\n","Here, we have attached type information to element ",". Thus the XForms author can extend external schemas without having the ability to change them.\n","7 The XForms Submission Module","XForms is designed to gather instance data, serialize it into an external representation, and submit it with a protocol. XForms defines a set of options for serialization and submission. The following sections define the processing of instance data for submission, and the behavior for the serialization and submission options.\n","7.1 The submission Element"," element represents declarative instructions on what to submit, how to submit it, and what to do with the result.\n"," Overview of Attributes and Their Content (after AVT evaluation)\n"," Overview of Content Model\n","\n\nCommon
\nref (binding-expression)
\nbind (xsd:IDREF)
\nrelevant (xsd:boolean)
\nvalidate (xsd:boolean)
\n\nresource (xsd:anyURI)
\naction (xsd:anyURI) [deprecated]
\nmode (\"asynchronous\"|\"synchronous\")
\nmethod (\"post\"|\"get\"|\"put\"|\"delete\"|\"multipart-post\"|\"form-data-post\"|\"urlencoded-post\"|Any other NCName|QNameButNotNCName)
\nserialization (xsd:string)
\nmediatype (xsd:string)
\nencoding (xsd:string)
\n\nreplace (\"all\"|\"instance\"|\"text\"|\"none\" | QNameButNotNCName)
\ninstance (xsd:IDREF)
\ntargetref (node-sequence Expression)
\n\nseparator (';' | '&')
\n\nversion (xsd:NMTOKEN)
\nindent (xsd:boolean)
\nomit-xml-declaration (xsd:boolean)
\nstandalone (xsd:boolean)
\ncdata-section-elements (QNameList)
\nincludenamespaceprefixes (xsd:NMTOKENS)\n\n","(resource | method | header)*, Action*\n","Below is a more detailed decription of each attribute whose name and datatype information appears above.\n","What to submit:\n"," Author-optional selector binding expression enabling submission of a portion of the instance data. The selected node, and all descendants, are selected for submission. The default value is \"/\".\n"," element. When present, the binding reference on this attribute is used in preference to any binding reference from the "," Author-optional boolean attribute that indicates whether or not the relevance pruning of the submission is performed. The default value is \"false\" if the value of "," is \"none\" and \"true\" otherwise.\n"," validate\n"," Author-optional boolean attribute that indicates whether or not the data validation checks of the submission are performed. The default value is \"false\" if the value of ","How to submit it:\n"," Attribute indicating the destination URI for submitting instance data. This attribute is not author-optional unless the destination URI is provided by the "," element, which can dynamically specify the URI based on instance data, or the "," attribute. This attribute should be used in place of the "," attribute. Behavior of relative URIs in links is determined by the host language, although [","XML Base","] processing is strongly recommended.\n"," action\n"," Deprecated author-optional attribute indicating the destination URI for submitting instance data. Behavior of relative URIs in links is determined by the host language, although [","] processing is strongly recommended. Due to the addition of the "," attribute, this attribute is deprecated and optional. However, the destination URI must be specified by this attribute or by either the "," attribute or the "," mode\n"," Author-optional attribute defaulting to \"asynchronous\" and with legal values of \"synchronous\" and \"asynchronous\". This attribute controls whether or not the submission response processing is performed as part of the default processing of event ","xforms-submit",". An asynchronous submission can complete default processing for this event before the submission response is received; in this case, submission response is processed once it is completely received asynchronously. For a \"synchronous\" submission, the submission response is received and processed during the default processing of event "," method\n"," Author-optional attribute specifying the protocol operation to be used to transmit the serialized instance data. There is no default value because either the attribute "," or the element "," must be specified. See Section ","Submission Options"," for information on how this attribute affects the default serialization of instance data and the HTTP method [","RFC 2616"," serialization\n"," Author-optional attribute that controls how and whether to serialize instance data as part of the submission. The format is type/subtype, or the single word \"none\". Allowable values are \"application/xml\", \"application/x-www-form-urlencoded\", \"multipart/related\", \"multipart/form-data\", or any of the values allowed in the section ",". The default value of this attribute is based on the submission "," as described in Section ",". If the attribute value is \"none\", then instance data is not serialized as part of the submission. This can be useful for requests that either require no data or that have the data already gathered in the URI. "," Setting "," to \"none\" will also have the default effect of preventing relevance pruning and validation. However, the author is free to override this by setting "," and/or ","validate"," attributes to \"true\"."," mediatype\n"," Author-optional attribute specifying the mediatype of the serialization, to be used in the ","Content-type"," header of HTTP, or similar, according to the format specified in [","RFC 2119","]. It is the author's responsibility to ensure that the type specified is compatible with the serialization used, such as ","application/xhtml+xml"," for posted XML data. The default is serialization-dependent, but is \"application/xml\" for XML serialization. "," This attribute does not affect serialization and does not override the "," attribute. It is only used to provide additional information about the submission data serialized. For example, this attribute could be used to indicate that the content type of an XML serialization is "," encoding\n"," Author-optional attribute specifying the character encoding to be used for serialization. The default is \"UTF-8\".\n","What to do with the result:\n"," replace\n"," Author-optional attribute specifying how the information returned after submit should be applied. The legal values are \"all\", \"instance\", \"text\" and \"none\", with a default of \"all\"\n"," instance\n"," Author-optional attribute specifying the instance to replace when the ","replace"," attribute value is \"instance\". When the attribute is absent, then the default is the instance that contains the submission data. An xforms-binding-exception (",") occurs if this attribute does not indicate an instance in the same model as the submission.\n"," targetref\n"," Author-optional attribute containing an expression that indicates the target node for data replacement. The in-scope evaluation context of the "," element is used to evaluate the expression. If "," is \"instance\", then the target node is replaced by the submission result. If "," is \"text\", then the content of the target node is replaced by the submission result. For other values of the "," attribute, this attribute is ignored. By default, the target node is the document element of the instance indicated by the ","If the data is serialized as application/x-www-form-urlencoded, the following attribute also applies:\n"," separator\n"," Author-optional attribute specifying the separator character between name/value pairs in urlencoding. The default value is '&'. To express the default, character entity encoding is used: ","separator='&'","If the data is serialized as XML, the following attributes also apply:\n"," Author-optional attribute specifying the "," of XML to be serialized. The default is \"1.0\".\n"," indent\n"," Author-optional attribute specifying whether the serializer should add extra white space nodes for readability. The default is \"false\".\n"," omit-xml-declaration\n"," Author-optional attribute specifying whether to omit the XML declaration on the serialized instance data. The default value is \"false\".\n"," standalone\n"," Author-optional attribute specifying whether to include a standalone declaration in the serialized XML. If the ","omit-xml-declaration"," attribute has the value ",", then this attribute is ignored. Otherwise, if this attribute is omitted, then the XML declaration does not include a standalone document declaration, and if this attribute is specified, then the XML declaration includes a standalone document declaration with the same value as this attribute.\n"," cdata-section-elements\n"," Author-optional attribute specifying element names to be serialized with CDATA sections. The default is empty string.\n"," includenamespaceprefixes\n"," Author-optional attribute providing control over namespace serialization. If absent, all namespace nodes present in the instance data are considered for serialization. If present, specifies list of namespace prefixes to consider for serialization, in addition to those visibly utilized. As in ","Exc-C14N"," [","], the special value ","#default"," specifies the default namespace.\n","The following examples show how various options on element "," can affect serialization as ","application/xml",". Given the following XForms fragment:\n","http://www.w3.org/2002/xforms\"\n xmlns:my=\"http://ns.example.org/2003\">\n \n my:sample\n \n \n\n","Note that the "," attribute is not present, which causes all namespace nodes to be serialized, resulting in the following serialized instance data:\n","http://www.w3.org/2002/xforms\"\n xmlns:my=\"http://ns.example.org/2003\">my:sample\n","In particular, note that the XForms namespace has been serialized. To prevent this example from including the unneeded XForms namespace while maintaining the needed ","my"," prefix, ","includenamespaceprefixes=\"my\""," must be added to the submission element. When this attribute is present, the author takes responsibility to list all namespace prefixes not visibly utilized by the submitted instance data.\n","The following attributes correspond (in spelling, processing, and default values) to attributes on the "," element of [","XSLT 1.0","], with the exception of using ","xsd:boolean"," to replace ","\"yes\"|\"no\"","\n\nversion
indent
encoding
omit-xml-declaration
cdata-section-elements\n\n","The following XSLT attributes have no counterpart in XForms:\n","\n\ndoctype-system
doctype-public\n\n","The table below provides an overview of the child elements of the XForms "," element, including their attributes and content models. Elements defined in the XForms Actions module are also allowed in the content model of "," value (string Expression)\n"," PCDATA\n"," header\n"," ref (node-sequence Expression) | nodeset (node-sequence Expression, deprecated)\n"," name, value+\n","Action"," various\n","7.2 The xforms-submit Event","Target: ","Bubbles: Yes\n","Cancelable: Yes\n","Context Info: None\n","For brevity in the following, the text \"the submission succeeds\" means \"submission processing concludes after dispatching ","xforms-submit-done"," with appropriate context information\", and the text \"the submission fails with ","error-code","\" means \"the submission processing concludes after dispatching ","xforms-submit-error"," with appropriate context information, including an ","error-type"," of ","\".\n","No more than a single submit process can be under way at any time for a particular XForms submission. From the start of the default action of "," for a ",", until immediately before "," is dispatched to that ",", the default action for subsequent "," events dispatched to that "," is to dispatch "," to that submission with context information containing an ","submission-in-progress","Otherwise, the default action for this event results in the following steps:\n"," The data model is updated based on some of the flags defined for ","deferred updates",". Specifically, if the deferred update "," flag is set for the "," containing this ",", then the rebuild operation is performed without dispatching an event to invoke the operation. Then, if the deferred update ","recalculate",", then the recalculate operation is performed without dispatching an event to invoke the operation. This sequence of operations affects the ","deferred update behavior"," by clearing the deferred update flags associated with the operations performed.\n"," If the binding attributes of "," indicate an empty sequence or an item other than an element or an instance document root node, then submission fails with ","no-data",". Otherwise, the binding attributes of "," indicate a node of instance data.\n"," The indicated node and all nodes for which it is an ancestor are selected. If the attribute "," is ",", whether by default or declaration, then any selected node which is not relevant as defined in ","The relevant Property"," is deselected (pruned). If all instance nodes are deselected, then submission fails with "," If the attribute ",", whether by default or declaration, then all selected instance data nodes are checked for validity according to the definition in ","The xforms-revalidate Event"," (no notification events are marked for dispatching due to this operation). If any selected instance data node is found to be invalid, submission fails with ","validation-error"," The submission method is determined.\n"," The ","submission resource"," is determined. If the resource is not specified, then submission fails with ","resource-error"," If the "," attribute value is ","\"none\"",", then the submission data serialization is the empty string. Otherwise, the event ","xforms-submit-serialize"," is dispatched; if the ","submission-body"," property of the event is changed from the initial value of empty string, then the content of the "," property string is used as the ","submission data serialization"," consists of a serialization of the selected instance data according to the rules stated in ","Serialization","submission headers"," are determined using the header entries produced by the ","header"," element(s) in the submission and the "," attribute or its default.\n"," The submission is performed based on the ","submission method",". The exact rules of submission are based on the URI scheme and the ",", as defined in ","mode","asynchronous",", then default processing for this event ends after the above steps, and submission processing is resumed once the response from the submission is returned. In the same manner used to handle user-generated events or the dispatch and processing of delayed events, the processing of the asynchronous submission response is done without interrupting the processing of any other event and its event handlers. If the ","synchronous",", then the XForms processor suspends user interaction with all form controls of the document and action processing is blocked within the default processing for this event until the response from the submission is returned.\n"," with no resource specification can be used to test validity of data. If the selected data is invalid, then the "," has an ",". If the selected data is valid, then the ","7.2.1 Processing the Response from a Submission","For success responses, if the response does not include a body, submission succeeds; otherwise, processing depends on the value of the "," attribute on element ","none",": submission succeeds.\n","all",": the event ","may"," be dispatched with appropriate context information, and submit processing concludes with the entire containing document being replaced with the returned body.\n",": If the body is not of type accepted by the processor, as specified in ",", nothing in the document is replaced and submission fails with ",". Otherwise the body is parsed to give an XPath Data Model according to ",". If the parse fails, then submission fails with ","parse-error",". If the parse succeeds, then instance data replacement is performed according to ","Replacing Data with the Submission Response",". If this operation fails, submission fails with ","target-error",". Otherwise, submission succeeds. \n","text",": If the body is neither an XML media type (i.e. with a content type not matching any of the specifiers in [","RFC 3023","]) nor a text type (i.e. with a content type not matching ","text/*","), nothing in the document is replaced and submission fails with ",". Otherwise the content replacement is performed according to ",". If this operation fails, then the submission fails with ",". Otherwise, submission succeeds.\n","For error responses, processing depends on the value of the ",": either the document is replaced with an implementation-specific indication of an error or submission fails with "," any other value: nothing in the document is replaced, and submission fails with ","Behaviors of other possible values for attribute "," are not defined in this specification.\n","In addition to initiating a submission with its default processing, XForms actions can also provide handlers for the "," event to perform tasks such as data preparation.\n","Example:\n","Preparing data for submission","\n \n \n \n \n\n","The schema for the doctor search service requires certain portions of the patient record in order to provide a list of specialists who could treat the patient. The server-side module may perform database searches for doctors with the required specialties as well as implement business rules such as providing doctors that are within an acceptable distance of the given city. The resulting list is provided to a separate instance so it can be presented to the user for selection or used in subsequent availability searches.\n","7.2.2 Replacing Data with the Submission Response","First, the replacement target node is determined:\n"," if the "," element has neither an "," attribute nor a ","targetref"," attribute, the replacement target node is the document element node of the default instance of the model;\n"," element has an "," attribute but no "," attribute, the replacement target node is the document element node of the instance identified by the "," attribute;\n"," element has a "," attribute, the attribute value is interpreted as a "," to which the ","first-item rule"," is applied to obtain the replacement target node. The evaluation context for this attribute is the in-scope evaluation context for the "," element, except the context node is modified to be the document element of the instance identified by the "," attribute if present.\n","If the replacement target node is any of the following, the processing of the replacement fails:\n"," an empty sequence\n"," a readonly node, if ","replace=\"text\""," a non-element, if ","replace=\"instance\""," a node whose parent is readonly, if ","Then the replacement is done according to the value of the "," attribute:\n",": the response data is treated as text, regardless of its media type, and used to replace the content of the replacement target node using the XForms Action "," (",").\n",": the XML obtained from the submission response is used to replace the target node. The XML in the response may have comment and processing instruction nodes before and after the document element. These nodes are discarded if the replacement target node is not the document element of an instance. Otherwise, those processing instructions and comments replace any processing instructions and comments that previously appeared outside of the document element of the instance being replaced. The replacement is performed by an XForms action that performs some combination of node insertion and deletion operations that are performed by the "," action (","The insert Element",") and the ","The delete Element","). \n"," has a "," of \"","\", then the text replacement action or the instance node replacement action is an outermost action handler, so the "," occurs at the end of the action. If the "," is \"","\", then the text replacement action or the instance node replacement action is not outermost since it occurs during the default processing of ",", so the appropriate ","deferred update flags"," are set based on whether the action was a "," or whether it performed a series of "," actions.\n","For backwards compatibility with earlier versions of this specification, the processor may treat an attribute named ","target"," as equivalent to "," as long as there is no "," attribute present.","In an asynchronous submission, the deferred update behavior ensures that the user interface is up to date with the latest calculated values before the "," event is dispatched. In a synchronous submission, the calculated values dependent on replaced text or data nodes can be made available to actions in the "," handler by first invoking the "," action. A sequence of synchronous submissions performed with successive ","send"," actions can avoid refreshing the user interface until after the completion of the last "," action.","Examples:\n","Replacing a subtree of instance data","\n","This submission would be invoked after the user enters a value for ",". Based on the name given, a simple server-side database lookup is performed to get a last known address. The ","address"," element is replaced with the result, prefilling part of the form for the user.\n","Replacing text in an instance","\n","The address information is past to a postal code search service that returns a textual result, which is placed into the ","postalCode","Submission and Read-Only Content","\n \n \n \n John\n Doe\n \n \n 123 Main St.\n Smallville\n \n \n \n\n \n \n\n \n \n\n \n \n\n","Submission S1 succeeds because a readonly node (","my:name",") can be replaced if its parent is not readonly. Submission S2 fails because a node (","my:first-name",") cannot be replaced if its parent is readonly. Submission S3 fails because the content of a readonly node cannot be replaced, even if it is readonly due to inheritance. Submission S4 failse because the content of a readonly node cannot be replaced, even if the node's parent is not readonly.\n","7.3 The xforms-submit-serialize Event","Dispatched at the beginning of "," serialization (see ","The xforms-submit Event","Cancelable: No\n","Context Info:\n"," Property\n"," Type\n"," Value\n"," submission-body\n"," node-sequence\n"," A document element node with a QName of ",". The node initially contains an empty string. Event handlers can write data into the node. If the string value of this node is non-empty, then the string value is used in the submission in lieu of the default instance data serialization.\n"," property is a string, but the ","event()"," function encapsulates the string in a text node so that the string can be modified by the "," action, which sets a value into a node determined by its Single Item Binding.\n"," is a string, this feature may be used to submit non-XML data.\n","Default Action: If the event context "," property string is empty, then no operation is performed so that the "," will use the normal serialization data (see ","). Otherwise, if the event context "," property string is non-empty, then the serialization data for the "," is set to be the content of the "," string.\n","Submitting plain text","\n \n\n","The string value of the element ","my/text"," is placed into the node representing the submission body, so that is the text posted by the submission. In this example, the result returned by the submission replaces the document. This feature could be used to submit plain text, but it could also be used to allow a document to submit its serialization rather than just submitting instance data.\n","7.4 The xforms-submit-done Event","Dispatched as an indication of: successful completion of a submission process\n"," resource-uri\n"," string\n"," The submission resource URI that succeeded (xsd:anyURI)\n"," response-status-code\n"," number\n"," The protocol return code of the success response, or ","NaN"," if the submission did not receive a success response.\n"," response-headers\n"," Zero or more elements, each one representing a content header in the success response received by the submission. The returned node-sequence is empty if the submission did not receive a response or if there were no headers. Each element has a local name of "," with no namespace URI and two child elements, ",", whose string contents are the name and value of the header, respectively.\n"," response-reason-phrase\n"," The protocol response reason phrase of the success response. The string is empty if the submission did not receive a response or if the response did not contain a reason phrase.\n","Default Action: None; notification event only.\n","Submission Sequencing","https://example.com/getRecord\" method=\"post\" replace=\"instance\" instance=\"record\">\n \n\nhttps://example.com/chargeForRecord\" method=\"get\" serialization=\"none\" replace=\"none\"/>\n","The default instance data is submitted as the search criteria for a desired record. Only upon successful completion of the submission is a second submission performed to charge the user's account for the record.\n","7.5 The xforms-submit-error Event","Dispatched as an indication of: failure of a submission process\n"," error-type\n"," One of the following: "," The submission resource URI that failed (xsd:anyURI)\n"," The protocol return code of the error response, or "," if the failed submission did not receive an error response.\n"," Zero or more elements, each one representing a content header in the error response received by a failed submission. The returned node-sequence is empty if the failed submission did not receive an error response or if there were no headers. Each element has a local name of "," The protocol response reason phrase of the error response. The string is empty if the failed submission did not receive an error response or if the error response did not contain a reason phrase.\n"," response-body\n"," object (string or node-sequence)\n","When the error response specifies an XML media type as defined by [","], the response body is parsed into an XML document and the root element of the document is returned. If the parse fails, or if the error response specifies a text media type (starting with ","text/","), then the response body is returned as a string. Otherwise, an empty string is returned.\n","Reporting a Submission Error","https://example.com/getRecord\" method=\"post\" replace=\"instance\" instance=\"record\">\n A submission error (\n\n","7.6 The Submission Resource"," is the URI for the submission. It is of type ","In XForms 1.0, the URI for submission was provided by the "," attribute. For consistency, form authors should now use the attribute "," of type ",", which deprecates the "," attribute. If both "," are present, then the "," attribute takes precedence.\n"," element provides the submission URI, overriding the "," attribute and the "," attribute. If a "," has more than one "," child element, the first "," element child must be selected for use. Individually, the "," element, the "," attribute are not required. However, one of the three is mandatory as there is no default submission resource.\n","7.6.1 The resource Element"," element (deprecated in favor of using an AVT in the resource attribute) allows the URI used for a submission to be dynamically calculated based on instance data.\n"," Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. To obtain the URI, the result of the expression is processed as if by call to the ",". An empty string is used if the evaluation fails.\n","Content: PCDATA\n","The URI to be used by the "," can be specified with either the "," attribute or the string content of the "," element. If both are specified, then the "," attribute takes precedence. If the "," does not have a "," child element, then the submission URI is obtained from the ","Submitting the default instance to a location determined dynamically from an instance","\n \n\n","7.7 The Submission Method"," indicates the submission protocol operation to be performed.\n","The submission method may be specified by the "," attribute. The "," element can have a child element named ",", which overrides the submission method setting obtained from the "," attribute if both are specified. If more than one "," element is given, the first occurrence in document order must be selected for use. Individually, the "," element and the "," attribute are not required. However, one of the two is mandatory as there is no default submission method.\n","7.7.1 The method Element"," element (deprecated in favor of using an AVT in the method attribute) allows the submission method to be dynamically calculated based on instance data.\n"," Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. To obtain the method, the result of the expression is processed as if by call to the ","The method to be used by the "," child element, then the submission method is obtained from the ","7.8 The header Element"," element can be used to contribute information to the preamble of a submission in a manner appropriate to the protocol. The "," element can contain zero or more "," child elements. Each produces zero or more header entries containing a name, a value, and a combination. The entries are provided to the submission protocol in the specified order. It is the responsibility of the submission protocol implementation to combine the entries and to serialize the result into submission protocol headers. Accordingly, entries may be re-ordered, combined, or otherwise altered in accordance with the specific protocol implementation requirements.\n","\nSpecial Attributes:\n"," Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. One or more header entries are generated for each item selected by this attribute.\n"," Deprecated synonym for attribute ",". If "," is present, "," has no meaning.\n"," combine\n"," Author-optional attribute defaulting to \"append\" and with legal values of \"append\", \"prepend\", and \"replace\". This attribute controls the method of combination for entries produced by this element "," with other entries produced by other "," elements. This attribute and its default also provide information for the protocol implementation, which may use some or all of the information to combine XForms submission headers with headers provided by the user agent.\n","Content: (","+) | (","+, "," element does not contain a ",") attribute, then one header entry is created for each "," element. If the "," element contains a ",") attribute, then for each selected item, one header entry is created for each "," element. The name and value of the header entry are obtained from the required child elements ","The name Element",") and ","The value Element","). If the name obtained from the "," element is the empty string, then the header entry is omitted.\n","The header entry order is determined as follows:\n"," document order of "," elements\n"," item order of items in ",") attribute\n","The application of this order information to header serialization is determined by the submission protocol.\n","If a "," element defines the "," header, then this setting overrides a "," set by the ","In the case of a multipart submission, the header entries are combined with those for the first part of the submission.\n","Setting the Accept header","In the example below, the submission request uses the "," element to replace the user agent's existing value of the HTTP Accept header with ","application/sparql-results+xml","\n \n Accept\n application/sparql-results+xml\n \n\n","7.8.1 The name Element","When the "," element appears as a child of element ",", it is used to specify the name of a header entry to be provided to the submission protocol.\n"," child element of a "," Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. To obtain the header name, the result of the expression is processed as if by call to the ","The header entry name may be given by the string content of the "," element, or by the result of the "," attribute. If both are given, the result from the "," attribute takes precedence. If the resulting name is the empty string, then the entry is considered to be void, and it is not supplied to the submission protocol.\n","7.8.2 The value Element",", it is used to specify the value component of a header entry to be supplied to the submission protocol to be added to the preamble of a submission. The "," element may be used more than once in a given element ",", in which case each value produces a new header entry.\n"," Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. To obtain the header entry value, the result of the expression is processed as if by call to the ","The header entry value may be given by the string content of the "," combines multiple items by concatenating them into a string separated with spaces. As a result, a header value specified by a "," element sequence containing multiple items may not be properly serialized in a submission protocol preamble. To assure proper delivery of individual header items to the submission protocol, restrict use of expressions producing sequences for element "," with attribute ","), where each item will produce its own separate header entry, and use expressions resulting in only a single item in element ","7.9 Submission Options","The XForms Model specifies a "," element containing the following attributes and child elements that affect serialization and submission. This section summarizes the behaviors for the allowable values of these attributes and child elements, and presents subsections that define the behavior for submission and serialization.\n"," the submission resource\n"," the submission method\n","For the submission protocol obtained from the URI scheme in the submission resource, XForms normatively defines a binding to HTTP/1.1 [RFC 2616], and to HTTPS [RFC 2818].\n","Other bindings, in particular to the URI scheme \"mailto:\" may, and the scheme \"file:\" should, be supported. Bindings to these schemes are not normatively defined in XForms. Implementations that choose to provide a binding to these schemes should pay particular attention to privacy and security concerns. Within the \"http:\" and \"https:\" schemes, form creators are encouraged to follow the finding of the W3C Technical Architecture Group on when to use the GET method: [TAG Finding 7]\n","The submission method determines the default data serialization format, and both the submission method and the URI scheme in the submission resource determine the submission protocol operation, according to the following table:\n"," URI scheme\n","Submission Method"," Default Serialization\n"," Submission Protocol Operation\n"," http https mailto\n"," \"post\"\n"," HTTP POST or equivalent\n"," http https file\n"," \"get\"\n","application/x-www-form-urlencoded"," HTTP GET or equivalent\n"," \"delete\"\n"," HTTP DELETE or equivalent\n"," \"put\"\n"," HTTP PUT or equivalent\n"," \"multipart-post\"\n","multipart/related"," \"form-data-post\"\n","multipart/form-data"," \"urlencoded-post\"\n"," (any)\n","Any other NCName\n","As given by the Submission Method\n","QNameButNotNCName"," implementation-defined\n","Foreign-namespaced attribute values are allowed in the Submission Method, but no behavior is defined by XForms.\n","7.9.1 The get Submission Method","This submit method represents HTTP GET or the equivalent concept. The serialized form data is delivered as part of the URI that is requested during the submit process.\n","This method is not suitable for submission of forms that are intended to change state or cause other actions to take place at the server. See [RFC 2616] for recommended uses of HTTP GET.\n","The URI is constructed as follows:\n"," The submit URI is examined. If it does not already contain a ","?"," (question mark) character, one is appended. If it does already contain a question mark character and the serialized form data is non-empty, then a separator character from the attribute ","separator"," is appended.\n"," The serialized form data, if any, is appended to the URI.\n","No message body is sent with the request.\n","Simple search submission","\n","After doing relevance and validity checking on the data, the leaf nodes of the default instance are submitted asynchronously, encoded as a URL (","), to ","http://example.com/search",". The result replaces the whole page.\n","Reading from a local file","\n","Replaces the instance 'data' with the content of the file data.xml. Serialization, and its associated validity and relevance processing, is not needed. See the corresponding example for saving a file in Section The put Submission Method. The user agent may restrict file access to a user-specific and domain-specific security zone in local storage.\n","7.9.2 The post, multipart-post, form-data-post, and urlencoded-post Submission Methods","These submit methods represent HTTP POST or the equivalent concept (such as a mail message). The serialized form data is delivered as the message body.\n","Posting instance data","https://example.com/jsp/orders\" method=\"post\" ref=\"/purchaseOrder\" />\n","Submits the XML for a purchase order to a secure server order processing system.\n","Simple posted login","\n","After doing relevance pruning and validity checking on the login data, the leaf nodes of the default instance are submitted asynchronously in the posted data, encoded based on the "," serialization, to ","http://example.com/login","7.9.3 The put Submission Method","This submit method represents HTTP PUT or the equivalent concept (such as writing to a local file). The serialized form data is delivered as the message body.\n","Saving to a local file","\n","Saves the instance 'data' to the file data.xml without validation checking and relevance pruning. See the corresponding example for reading from a local file in Section The get Submission Method. The user agent may restrict file access to a user-specific and domain-specific security zone in local storage.\n","7.9.4 The delete Submission Method","This submit method represents HTTP DELETE or the equivalent concept (such as deleting a local file). The serialized form data is delivered in the same manner as the get submission method (see The get Submission Method).\n","7.9.5 Serialization","7.9.5.1 Serialization as application/xml","This format permits the expression of the instance data as XML that is straightforward to process with off-the-shelf XML processing tools. In addition, this format is capable of submission of binary content.\n","The steps for serialization are as follows:\n"," An XML document is produced following the rules of the XML output method defined in [","] section 16 and 16.1, using the values supplied as attributes of the "," Handling of namespace nodes: The default behavior is that every namespace node is serialized according to the rules of the XML output method, so that at least one namespace declaration appears in the serialized XML for each in-scope namespace. Additional inherited namespaces are declared on the root element of the serialized XML. If, however, attribute "," is present, then all namespace declarations not visibly utilized in the instance data (as defined in [","]) and the default namespace if it is empty are excluded from the root element serialization, unless the corresponding namespace prefix is listed in the "," attribute. The special value "," represents the default namespace.\n"," Mediatype: By default, the mediatype of the serialized XML instance is ",", but can be changed to a compatible type using element ",". Authors should ensure that the type specified is compatible with ","We are considering adding extra serialization parameters added by http://www.w3.org/TR/xslt-xquery-serialization/, but are waiting for further implementation experience and user feedback, to decide which serialization parameters to add.","7.9.5.2 Serialization as multipart/related","This format is intended for integration of XForms into environments that involve large amounts of binary data where the inclusion of the data as ","xsd:base64Binary","xsd:hexBinary"," is undesirable.\n","In this format, XML instance data is serialized as one part of the [","RFC 2387","] "," message, using the rules as described in ","Serialization as application/xml",". Binary content from "," instance nodes populated by the ","upload","The upload Element",") control is serialized in separate parts of the ["," message.\n","This format follows the rules of "," MIME data streams for in [","], with specific requirements of this serialization listed below:\n"," message header requirements:\n"," Must contain a "," parameter of the mediatype of the serialized XML instance.\n","start"," parameter referring to the Content-ID first body part (root).\n"," First body part (root) requirements:\n"," Must have ","Content-Type"," parameter of the type specified by the "," Content is serialized by the rules at Serialization as application/xml.\n"," Subsequent part requirements:\n"," One part for each node with a datatype of "," populated by "," with:\n"," A "," header that represents the type of the attachment if known, otherwise ","application/octet-stream","Content-Transfer-Encoding"," header.\n","Content-ID"," header whose value matches the URI in the associated instance data node.\n"," The binary content associated with the URI, serialized according to the "," heading.\n","\n","Submits the instance data in ",", along with the selected file as an attachment.\n","POST /photo HTTP/1.0\nHost: example.com\nContent-Type: multipart/related; boundary=f93dcbA3; type=application/xml; start=\"<980119.X53GGT@example.com>\"\nContent-Length: xxx\n\n--f93dcbA3\nContent-Type: application/xml; charset=UTF-8\nContent-ID: <980119.X53GGT@example.com>\n\n\n\n My Proposal\n E. X. Ample\n A proposal for a new project.\n (see handwritten region)\n project proposal funding\n false\n image.png\n cid:980119.X25MNC@example.com\n\n--f93dcbA3\nContent-Type: image/png\nContent-Transfer-Encoding: binary\nContent-ID: <980119.X25MNC@example.com>\n\n...Binary data here...\n--f93dcbA3\nContent-Type: image/png\nContent-Transfer-Encoding: binary\nContent-ID: <980119.X17AXM@example.com>\n\n...Binary data here...\n--f93dcbA3--\n","7.9.5.3 Serialization as multipart/form-data","This format is for legacy compatibility to permit the use of XForms clients with [RFC 2388] servers. This method is suitable for the persistence of binary content. Contextual path information, attribute values, namespaces and namespace prefixes are not preserved. As a result, different elements might serialize to the same name.\n","Existing HTML user agents fail to encode special characters (such as double quotes) and non-ASCII characters in the ","Content-Disposition: form-data"," parameters. Since this serialization method is supported for legacy applications only, new applications should use ","This format follows the rules for "," MIME data streams in [","RFC 2388"," Each element node is visited in document order, except non-relevant elements are skipped if the "," setting of the "," Each visited element that has no child element nodes (i.e., each leaf element node) is selected for inclusion, including those that have no value (no text node).\n"," Element nodes selected for inclusion are encoded as "," MIME parts as defined in [","], with the "," parameter being the element local name.\n"," Element nodes of any datatype populated by "," also have a ","Content-Disposition"," parameter, if the filename is available.\n"," are serialized as the specified binary content. In the case of "," and derived types, the serialization content is obtained from the URI. For ",", and derived types, the serialization content is obtained by decoding the element string value.\n"," Element nodes of any datatype not populated by "," are serialized as the string value of the element (the concatenation of all text node children, or empty string if the element has no text node children).\n"," must be ","text/plain",", and derived types, in which case the header represents the media type of the attachment if known, otherwise ",". If a character set is applicable, the "," may have a ","charset"," parameter.\n","\n",", along with the selected file as a part.\n","POST /photo HTTP/1.0\nHost: example.com\nContent-Type: multipart/form-data; boundary=AaB03x\nContent-Length: xxx\n\n--AaB03x\nContent-Disposition: form-data; name=\"document\"; filename=\"b.txt\"\nContent-Type: text/plain; charset=iso-8859-1\nThis is a file.\nIt has two lines.\n--AaB03x\nContent-Disposition: form-data; name=\"title\"\nA File\n--AaB03x\nContent-Disposition: form-data; name=\"summary\"\nThis is my file\nfile test\n--AaB03x--\n","7.9.5.4 Serialization as application/x-www-form-urlencoded","This format represents an extension of the [","] form content type "," with specific rules for encoding non-ASCII and reserved characters.\n","This format is not suitable for the persistence of binary content. Therefore, it is recommended that forms capable of containing binary content use another serialization method.\n",". Each visited element that has no child element nodes (i.e., each leaf element node) is selected for inclusion, including those that have no value (no text node). Note that attribute information is not preserved.\n","EltName=value",", where "," is a literal character, ","EltName"," represents the element local name, and "," represents the string value of the element (the concatenation of all text node children, or empty string if the element has no text node children). The separator character {sep} from the "," is used between pairs of encoded name/value pairs, e.g. ","EltName1=value1{sep}EltName2=value2{sep}EltName3=value3",". Note that contextual path information is not preserved, nor are namespaces or namespace prefixes. As a result, different elements might serialize to the same name.\n"," The encoding of "," are as follows: space characters are replaced by ","+",", and then non-ASCII and reserved characters (as defined by [","RFC 2396","] as amended by subsequent documents in the IETF track) are escaped by replacing the character with one or more octets of the UTF-8 representation of the character, with each octet in turn replaced by ","%HH","HH"," represents the uppercase hexadecimal notation for the octet value and ","%"," is a literal character. Line breaks are represented as \"CR LF\" pairs (i.e., ","%0D%0A"," All such encodings are concatenated, maintaining document order.\n","GivenName=Ren%C3%A9\n","This format consists of simple name-value pairs.\n","\n René\n\n","Here is the instance data for the above example. Note that very little of the data is preserved. Authors desiring greater data integrity should select a different serialization format.\n","7.10 Integration with SOAP","This section describes the integration of XForms submission with [SOAP 1.1] and [SOAP 1.2]\n","7.10.1 Representation of SOAP Envelope","The Single Item Binding of the "," element refers to the XML data to be submitted. In the case of a SOAP submission, the instance data includes the SOAP envelope and related SOAP tags.\n","The form author may choose to store the data payload in one instance and copy the data to the submission instance containing the SOAP envelope as part of an "," event handler. The form author is responsible for declaring the appropriate model item properties on both instances (e.g. the "," declarations).\n","7.10.2 Indicating a SOAP submission","For a SOAP submission, the "," attribute of the ","must"," be set to the MIME type of ","application/soap+xml",". The form author may append "," MIME parameters.\n"," MIME parameter has no effect unless the submission "," is \"post\" because the GET method implies no SOAP processing by the receiving SOAP node.\n","SOAP 1.1 does not support the HTTP GET operation.\n","7.10.3 SOAP HTTP Binding"," be set to ","get","post"," in order to access the SOAP HTTP binding.\n","If ","method=\"get\"",", then the SOAP response message exchange pattern is used. The HTTP headers "," contain the Accept parameter with a value conforming to the following properties:\n"," begin with "," If the submission "," contains a "," MIME parameter, then it is appended to the "," MIME type. Otherwise, a "," MIME parameter with same value as the ","encoding"," attribute (or its default) is appended to the "," MIME type.\n"," No other MIME parameters from the "," are copied to the "," MIME type\n","q"," MIME parameter ","must not"," be specified in the "," MIME type so that the default quality of 1 is used.\n","method=\"post\"",", then the SOAP request-response message exchange pattern is used. For SOAP 1.2, the current submission behavior of using the "," attribute value as the value of the "," parameter in the HTTP headers is sufficient. If the instance data being submitted has as its root element node a SOAP envelope in the SOAP 1.1 namespace (","), then:\n"," HTTP header is changed to ","text/xml"," MIME parameter is appended . The charset parameter value from the "," attribute is used if it is specified. Otherwise, the value of the "," attribute (or its default) is used.\n"," MIME parameter appears in the "," then a SOAPAction HTTP header is added and given a value equal to the content of the "," MIME parameter\n","XForms 2.0 does not support the SOAP email binding, so method=\"post\" with a "," scheme results in an "," event before any submit processing message is dispatched.\n","XForms 2.0 does not support the SOAP 1.1 binding to the HTTP Extension Framework.\n","Consuming a SOAP 1.1 Request-Response Web Service","http://schemas.xmlsoap.org/soap/envelope/\"\n xmlns:tns=\"http://www.webservice.net\">\n \n \n Victoria\n Canada\n Mostly sunny and cool. High 12C. Low 3C.\n \n \n\n \n\t http://schemas.xmlsoap.org/soap/envelope/\">\n\t\t \n\t\t\thttp://www.webservice.net\">\n\t\t\t Victoria\n\t\t\t Canada\n\t\t\t\n\t\t \n\t \n \n \n\t http://schemas.xmlsoap.org/soap/envelope/\">\n\t\t \n\t\t\thttp://www.webservice.net\">\n\t\t\t Mostly sunny and cool. High 12C. Low 3C.\n\t\t\t\n\t\t \n\t \n \n\n http://www.webservice.net/getweather.asmx\" method=\"post\"\n ref=\"instance('GetWeatherSoapIn')\"\n mediatype=\"application/soap+xml; action=http://www.webservice.net/GetWeather\"\n replace=\"instance\" instance=\"GetWeatherSoapOut\">\n \n \n \n \n \n \n \n \n\n\n\n \n \n\n\n \n \n\n\n","This form accepts input of a city name and country name from the user. When the user changes either value, the 'GetWeather' web service is initiated. On ",", the user input is copied into the request envelope. When the web service submission result is received, the "," handler copies the weather forecast from the response envelope to the data instance.\n","The submission and the request and response instances correspond to the web service definition below:\n","http://schemas.xmlsoap.org/wsdl/\"\n xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\"\n xmlns:tns=\"http://www.webservice.net\" targetNamespace=\"http://www.webservice.net\">\n \n http://www.webservice.net\">\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ...\n \n\n \n \n \n \n \n \n ...\n \n \n \n \n \n ...\n \n ...\n \n http://schemas.xmlsoap.org/soap/http\" style=\"document\" />\n \n http://www.webservice.net/GetWeather\" style=\"document\" />\n \n \n \n \n \n \n \n ...\n \n\n \n \n http://www.webservice.net/getweather.asmx\" />\n \n ...\n \n\n","7.10.4 Handling the SOAP Response","The XForms processor must handle client authorization and redirection.\n","SOAP faults (400 and 500 level errors) are handled in the same manner as underlying HTTP errors, which is to say that an "," event is dispatched.\n","On successful completion, the results are consumed according to the XForms submission process, culminating in an "," event. The form author may capture this event and copy data from the target instance that receives the returned SOAP envelope to other instances that are designed to carry only data.\n","8 Core Form Controls","This chapter covers the XForms view layer features for directly interacting with instance data and properties from the XForms Model. This includes features that provide data from the model to the view layer as well as features of the view layer that commit data collected from the user to the model.\n","8.1 The XForms Core Form Controls Module","Form controls are declared using markup elements, and their behavior refined via markup attributes. The core form controls are described in this module, including their attributes and their content models (their metadata elements). A core form control is an element that acts as a direct point of user interaction and often provides read, write, or read/write access to a node of instance data. See Section Container Form Controls for a description of container form controls.\n"," Core Form Control Element\n"," Attributes and Their Content (after AVT evaluation)\n","Common, UI Common, Single Item Binding, inputmode (xsd:string), incremental (xsd:boolean)\n","label, (UI Common)*\n","secret","textarea","Common, Single Item Binding (author-optional), appearance (\"full\"|\"compact\"|\"minimal\"|QNameButNotNCName), value (Expression), mediatype (xsd:string)\n","label?, mediatype? [deprecated], (UI Common)*\n","Common, UI Common, Single Item Binding, mediatype (xsd:string), incremental (xsd:boolean)\n","label, filename?, mediatype? [deprecated], (UI Common)*\n","range","Common, UI Common, Single Item Binding, start (xsd:string), end (xsd:string), step (xsd:string), incremental (xsd:boolean)\n","trigger","Common, UI Common, Single Item Binding (author-optional)\n","Common, UI Common, Single Item Binding (author-optional), submission (xsd:IDREF)\n","select","Common, UI Common, Single Item Binding, selection (\"open\" | \"closed\"), incremental (xsd:boolean)\n","label, (UI Common)*, (List UI Common)+, (UI Common)*\n","Unless bound to form controls, instance data nodes are not presented to the user; consequently, there is no need for a form control corresponding to HTML ","input type=\"hidden\"","The following table summarizes additional support elements for form controls.\n"," Support Element\n","Common, Single Item Binding (author-optional)\n","(PCDATA|(UI Content))*\n","filename (for upload)\n","Common, Single Item Binding\n","mediatype (for upload)\n","mediatype (for output)\n","Common, Single Item Binding, value (string Expression)\n","choices (for selection controls)","label?, (List UI Common)+\n","item (for selection controls)\n","label, value, (UI Common)*\n","value (for selection controls)","See also: The itemset Element (for selection controls) and The copy Element (for selection controls).\n","The following attributes are common to many user-interface related XForms elements, here called the ","UI Common"," attribute group.\n"," (various)\n","appearance (\"full\"|\"compact\"|\"minimal\" | QNameButNotNCName)\n"," appearance\n"," Author-optional attribute to define an appearance hint. If absent, the user agent may freely choose any suitable rendering.\n","A host language is expected to add attributes such as ","xml:lang"," as well as an attribute, named ","class",", that holds a list of strings that can be matched by CSS class selectors.\n","Further, a host language must provide a way to indicate overall navigation order among form controls and other elements included in the host language, as well as keyboard or direct access navigation to specific elements. One such proposal is to uses a pair of attributes named ","navindex","accesskey",", defined as follows:\n"," navindex\n"," This author-optional attribute is a non-negative integer in the range of 0-32767 used to define the navigation sequence. This gives the author control over the sequence in which form controls are traversed. The default navigation order is specified in the chapter Processing Model.\n"," accesskey\n"," This author-optional attribute defines a shortcut for moving the input focus directly to a particular form control. The value of this is a single character which when pressed together with a platform specific modifier key (e.g., the alt key) results in the focus being set to this form control.The user agent must provide a means of identifying the accesskeys that can be used in a presentation. This may be accomplished in different ways by different implementations, for example through direct interaction with the application or via the user's guide. The accesskey requested by the author might not be made available by the player (for example it may not exist on the device used, or it may be used by the player itself). Therefore the user agent should make the specified key available, but may map the accesskey to a different interaction behavior.\n","Additionally, this module defines the following content sets:\n"," Content Set\n","(help|hint|alert|Action)*\n","List UI Common"," (choices|item|itemset)+\n","Core Form Controls"," (input|secret|textarea|output|upload|range|trigger|submit|select|select1)*\n","UI Content"," (output)*\n","As shown above, the XML Events module adds the Actions content set into the UI Common content set. A host language may add markup to the UI Content set. When the XForms Extension module is present, it too should be included in the UI Common content set.\n","8.1.1 Implementation Requirements Common to All Form Controls","XForms user interface controls are bound to the underlying instance data using binding attributes as defined in the chapter Model Item Properties.\n","Form controls enable accessibility by taking a uniform approach to such features as labels, help text, navigation, and keyboard shortcuts. Internationalization issues are addressed by following the same design principles as in XHTML. All form controls are suitable for styling as aural or visual media.\n","Form controls encapsulate high-level semantics without sacrificing the ability to deliver real implementations. For instance, the form control "," enables the user to ","select items from a set",". These form controls distinguish the functional aspects of the underlying control from the presentational and behavioral aspects. This separation enables the expression of the intent underlying a particular form control — see [","AUI97","] for a definition of such high-level user interaction primitives.\n","Form controls when rendered display the underlying data values to which they are bound. While the data presented to the user through a form control must directly correspond to the bound instance data, the display representation is not required to match the lexical space value of the bound instance data. For example, user agents should apply appropriate conventions to the display of dates, times, durations and numeric values including separator characters.\n","All form controls must meet the following implementation requirements:\n"," All form controls, including ","container form controls",", should have an inline layout by default (e.g. for a host language that supports ","CSS",", the default styling should be ","display:inline","). By default, ","repeat items"," should have a block layout (e.g. a default styling of ","display:block"," for host languages that support CSS).\n"," If a form control violates its data binding restriction, an "," must occur.","Note: Form controls that read or write simpleContent produce this exception whenever and as soon as they are bound to an element node that has an element child node."," Form controls that write simpleContent to instance data must do so exactly as defined by the XForms Action ",").","Note: If a form control binds to an element node, then regardless of how many child nodes the element has, the result of the form control writing to the bound element node is that it has either a single non-empty text node child, or no children if the simpleContent written is the empty string (which is in accord with the data model of [XPath 1.0])."," All form controls that read simpleContent instance data must do so as follows:\n"," Element nodes: If element child nodes are present, then an "," occurs. Otherwise, return the string value of the node.\n"," Attribute nodes: returns the string-value of the node.\n"," Text nodes: returns the string-value of the node.\n"," Namespace, processing instruction, and comment nodes: behavior is undefined (implementation-dependent).\n"," the XPath root node: an "," occurs. ","Note: The simpleContent binding restriction is intended to allow controls to bind to attribute and element nodes. This specification does not prevent binding controls directly to text nodes, however doing so can yield undesirable behavior, such as a form control becoming non-relevant if a user enters empty data. This specification also does not prevent implementers supporting binding controls directly to comment or processing instruction nodes, however the resulting behavior is implementation-dependent and may also yield undesirable behavior."," Form controls are considered to be "," if none of the following apply and ","non-relevant"," if any of the following apply:\n"," the Single Item Binding is expressed and resolves to empty sequence,\n"," the Single Item Binding is expressed and resolves to a non-relevant instance node,\n"," the form control is contained by a non-relevant "," (which includes a non-relevant "," item), or\n"," the form control is contained by a non-selected ","case"," element of a ","When a form control becomes non-relevant, it must receive event ","xforms-disabled"," and then the XForms action handlers that are listening for events on the non-relevant form control must be disabled.","When a non-relevant form control changes to being relevant, the XForms action handlers that listen for events on the form control must become enabled and then the form control must be updated to represent the current value(s) and model item properties of the instance node(s) to which it is bound or to which it refers. The following events must be dispatched to the form control: ","xforms-enabled","xforms-value-changed",", one of ","xforms-valid","xforms-invalid","xforms-readonly","xforms-readwrite","xforms-required","xforms-optional",", and one of ","xforms-in-range","xforms-out-of-range"," Except as noted, relevant form controls must distinguish rendering between being bound to a required node versus a non-required node. Exceptions are form controls that do not directly render the string value of the bound node (including "," and the ","). Control of this behavior should be made available to stylesheets.\n"," Relevant form controls must distinguish rendering between valid and invalid states. Control of this behavior should be made available to stylesheets.\n"," Relevant form controls must indicate when the bound instance data contains a value or content that the form control is not capable of rendering. Control of this behavior should be made available to stylesheets.\n"," If a form control binds to a readonly node or an atomic value, then the form control must not allow the user to modify the node value. The relevant form control that is bound to a readonly node or an atomic value should render in a way which indicates that entering or changing the value is not allowed. Control of the render behavior should be made available to stylesheets.\n","Sections in this chapter define the various form controls by specifying the following:\n","\n\nDescription
Common Attributes
Special Attributes
Examples
Data Binding Restrictions
Implementation Requirements\n\n","8.1.2 The input Element","Description: This form control enables free-form data entry or a user interface component appropriate to the datatype of the bound node..\n","Common Attributes: Common, UI Common, Single Item Binding\n"," inputmode\n"," Author-optional. This form control accepts an input mode hint. Input Modes.\n"," incremental\n"," Author-optional. When ",", this form control will generate additional "," events. The default value for this attribute is ","Data Binding Restrictions: Binds to any simpleContent (except "," or any datatype derived from these) or an atomic value.\n","This control cannot bind to element nodes that have element children. See Implementation Requirements Common to All Form Controls for user interface processing rules common to all form controls.\n","Implementation Requirements: Must allow entry of a lexical value for the bound datatype. Implementations should provide a convenient means for entry of datatypes and take into account localization and internationalization issues such as representation of numbers. For example, an "," bound to an instance data node of type ","xsd:date"," might provide a calendar control to enter dates; similarly, an input control bound to of type "," might be rendered as a checkbox.\n","Simple Free-Form Data Entry","\n \n Please enter the number and street name\n\n","In the above, the "," attribute can be used by a style sheet to specify the display size of the form control. Note that the constraints on how much text can be input are obtained from the underlying XForms Model definition and not from these display properties.\n","A graphical browser might render the above example as follows:\n","Datatype-sensitive Data Entry","\n \n Please specify the ship date for this order.\n\n","The user can type a date into the text edit box, or press the button to open a calendar:\n","Data Entry with Activation Behavior","\n \n \n\n\n\n \n\n","This example shows the "," form controls working together to provide the common user experience of a simple search. The "," collects the search term(s) and then automatically initiates the "," identified by ","doSearch"," if the user activates the "," control. Alternatively, the user initiate the "," by activating the "," control.\n","A graphical browser on a desktop device might activate form controls such as "," in response to a special user action such as pressing the Enter key or either clicking or double-clicking with the mouse (depending on the type of form control).\n","8.1.3 The secret Element","Description: This form control is used to provide the user with the ability to supply information to the system in a manner that makes it difficult for someone, other than the user, who may be observing the process to discern the value that is being supplied. A common use is for password entry.\n","Implementation Requirements: Implementations, including accessibility aids, must obscure the value being entered into this form control. One possible approach would be to render a \"*\" or similar character instead of the actual characters entered. Note that this provides only a casual level of security; truly sensitive information will require additional security measures outside the scope of XForms.\n","Password Entry","\n \n The password you enter will not be displayed.\n\n","A graphical browser might render this form control as follows:\n","8.1.4 The textarea Element","Description: This form control enables free-form data entry and is intended for use in entering multiline content, e.g., the body of an email message.\n","Implementation Requirements: Must allow entry of a lexical value for the bound datatype, including multiple lines of text.\n","Email Message Body","\n","8.1.5 The output Element","Description: This form control renders content based in part on instance data, but it provides no means for entering or changing data.\n","Common Attributes: Common, Single Item Binding (author-optional)\n"," This form control does not use the UI Common attribute group, but nevertheless still contains an author-optional ","appearance"," attribute, as defined above.\n"," Author-optional. An expression to be evaluated. The string result of the evaluation is rendered by the form control. If binding attributes are present to select a node, this attribute has no effect. The evaluation context is the same as would be applied to the evaluation of the Single Item Binding. This expression is re-evaluated whenever there is a change in any node to which the expression refers. An empty string is used if the evaluation fails.\n"," Author-optional attribute used to indicate that data obtained from the Single Item Binding should be rendered (after decoding, if needed) according to a desired media type indicated by the attribute value string, such as ","image/*"," for image rendition. If the "," element appears as a child of the ",", then it overrides this attribute. If the media type is not specified by this attribute or by the "," element, then the the default is to present the indicated data as plain text (with no decoding according to datatype).\n","Data Binding Restrictions: Binds to any simpleContent or an atomic value.\n","Implementation Requirements: Must allow display of a value for the bound datatype. Implementations should provide a convenient means for display of datatypes and take into account localization and internationalization issues such as representation of numbers and dates.\n"," can be used to display the value of a particular instance node by using a Single Item Binding; it can also be used to display the result of evaluating an expression by specifying the expression to be evaluated via attribute ",". Note that the Single Item Binding attributes and "," are mutually exclusive.\n","By default, the "," element simply renders the plain text of the "," attribute or the item indicated by the Single Item Binding. However, if the Single Item Binding indicates a non-empty value, and the media type is specified based on the ","mediatype attribute","mediatype child element",", then the string value of the item "," be decoded or dereferenced according to its datatype, and the result ","should"," be rendered according to the indicated media type if it is possible to do so (e.g. a voice-only device cannot render a digital image).\n","When the media type is specified, implementations "," handle the output content as presentation-only or as interactive content, and interactive content "," be isolated from or capable of accessing the enclosing document that contains the ",". Further implementation experience and user feedback is required. For example, if the output content includes XForms user interface elements, it may be desirable for them to access a default XForms model in the output content or from the enclosing document.\n","If the Single Item Binding is absent or if it does not indicate a non-empty value, then the media type specification is ignored if given. Otherwise, if the Single Item Binding produces a non-empty value, and the media type is specified, then decoding or dereferencing of the item prior to rendition is performed by datatype as follows:\n"," If the item either is of type or is derived from type ",", then the data is base-64 decoded.\n",", then the data is hex-binary decoded.\n",", then the data is treated as a URI and dereferenced.\n"," If the item is of any other type, then the data is used without modification.\n"," rendition is based on the "," attribute, then the rendition is updated if the nodes referenced by the "," expression change or if the content of any of the referenced nodes changes. Otherwise, the rendition of an "," is updated if the item referenced by the Single Item Binding changes, if the content of the referenced item changes, or if the media type changes. The media type can change by a change to the "," element's referenced item or its content (a host language may also allow DOM mutation of the content of the "," attribute or element). A change to the label associated with the "," causes an update to the rendition of the label (which may affect the layout position of the main output content).\n","Failure to render the content indicated by the "," element "," result in an ","xforms-output-error",", a non-fatal error that does not halt XForms processing. Failures can occur on initial creation of the "," or during user interface refresh (see Section ","The xforms-refresh Event","). Failures can occur for many reasons, including\n"," Data to be decoded does not conform to the format of "," An error dereferencing the URI in a item of or derived from type "," A data format error (e.g. invalid or unsupported image format)\n"," An unrecognized media type identifier string\n","The content model for the "," element includes "," in order to allow action handlers for the "," as well as to allow more comprehensive behavior and information to be provided for the ",", e.g. via the ","Explanatory Message","I charged you -\n