XForms Projects

XForms Project 1

XForms Examples


Totel:29 Click: 1 2 3 4 5 6
XFORMS Interview Questions And Answers

Page 1

 Properties helps to define data restrictions, types and its behaviour in XForms.

I have given you some properties.

1. required="true()" property : This property it doesn't allow to submit an empty value to specified instance data.

2. type="decimal" property : Using this property we can submit only decimal value.

3. calculate property : Using this property we can calculate a value of instance data.

 Using <bind> element we can also bind XForms property with XForms data.To understand this i have given you a example.









<bind nodeset="person/mname" required="true()"/>


 This example shows that the attribute nodeset="person/mname" binds the property required="false()" with instance data element <mname>.means don't write middle name here.

 I cleared you XForms already have some functions and we can also call the function those are in Script.

I have you some list of functions that we used in XForms. 

boolean-from-string(string) : This functon return true and false when its string parameters are "true" or "1" and "false" or "0" respectively. 

if(booleantest, string1, string2) : First it perform the booleantest and return sting1 if test is true or return string2 when test is false. 

avg(node-set) : It returns the average of all nodes that are in specified node-set.It returns NaN when node-set is empty.







 It will returns: 15

min(node-set) :It returns the minimum value of all nodes of a specified node-set.It returns NaN

when node-set is empty.







 It will returns: 0

max(node-set) :It returns the maximum value of all nodes of a specified node-set.It returns NaN

when node-set is empty.







 It will returns: 25

count-non-empty(node-set) : It returns the number of non-empty nodes of a specified node-set





<value />



 It will returns: 3

index(string) :It returns the current index of a given repeat set.

property(string) : It returns property that named by string parameter.

property("version")-It is use to return the XForms version number.

property("conformance-level")- It is use to returns conformance level ("basic" or "full") of XForms.

now() :It returns current system date and time in xs:dateTime format.

instance(string) : XForms Model may have more  than one instance. It returns the root node of the specified instance data

<xforms:instance id="orderform">






 It returns a node-set that consists of the firstName element node from the instance named "orderform"

 Using Actions we handle response to events in XForms.

 Actions that we use in XForms are given below:

1. Meassage Action 

2. Setvalue Action

1. Messsage Action: We use <message> element in XForms to defines a message.And to display that message into XForms user interface.


<input ref="fname">

<label>First Name</label>

<message level="ephemeral" event="DOMFocusIn">

Enter Your First Name



 In this example the message "Enter Your First Name" will displayed as a tool tip when user will focus on the input field.

 And the event="DomFocusIn" is use to define the event to trigger that action.

 And the level="ephemeral" is use to define the message that will display as a tool tip.

2. Setvalue Action: We use <setvalue> element in XForms to set a value that will show with response of an event.


<input ref="size">


<setvalue value="100" event="xforms-ready"/>


 In this example instance element <size> will stores a value 100 when the form opens.

 If you want bind data types in XForms than you have to use <bind> element. which is use to bind datatype with their instance data.


<xf:bind nodeset="/person/size" type="xsd:integer"/>

XML Schema data type supported by XForms model.

XML Schema Data Types: Because XFormes model supports XML Schema data types. Using this feature XForms processor check the data for correct input values.

If we want to use XML Schema data types, we must have to use XML Schema namespaces into our namespace declaration,






 After using the XML Schema namespaces, we can add type attributes into our XForms instance elements like this:



<person xmlns="">

  <fname xsi:type="xsd:string"/>

  <lname xsi:type="xsd:string"/>

  <born  xsi:type="xsd:date"/>

  <size  xsi:type="xsd:integer"/>



 I haven given you a list of XML Schema data types except that XForms uses all XML schema data type.

  List of unsupported XML Schema datatype in XForms.





Goto Page:

1 2 3 4 5 6
XFORMS Objective Questions And Answers

XFORMS Objective Questions And Answers

XFORMS Interview Questions And Answers

XFORMS Subjective Questions And Answers

R4R,XFORMS Objective fresher and experienced, XFORMS Subjective fresher and experienced ,XFORMS Interview Questions And Answers,XFORMS fresher and experienced,XFORMS Interview fresher and experienced ,XFORMS Questions fresher and experienced,XFORMS Answers fresher and experienced