Javatpoint Logo
Javatpoint Logo
XForms Interview Questions

XForms Interview Questions

1) How is XForms related to HTML Forms?

XForms is the new generation of HTML Forms.

2) What are the most important features of XForms?

A list of most important features of XForms:

  • XForms is used to generate forms that are much richer and flexible than HTML forms.
  • XForms will act as form standard in XHTML2.0.
  • XForms is platform and device independent.
  • XForms can be used to separate logic and device from presentation.
  • XForms can be used to define data of form.
  • XForms can be used to store and transport data into an XML document.
  • XForms can also be used to perform calculation and also to validate our forms.
  • XForms also help us to reduce or eleminate need of scripting.
  • XForms is a W3C Recommendation.

3) When XForms 1.0 become a W3C Recommendation?

XForms 1.0 has become W3C recommendation since October 2003.


4) How can you say that XForms is successor of HTML Forms?

HTML Forms are used to collect input from web application. HTML Forms is a part of HTML standard. After collecting the inputs the web user try to solve complex transactions but HTML standard does achieve that task.

To overcome from this limitation XForms is used. Because using XForms handle a richer, more secure and device independent web input.

XForms are supported by all future browsers.


5) How XForms is used to separate data from presentation?

XForms can be used to perform both tasks to define data and to display data.

To Define Data: XForms uses XML to define data.

To Display Data: XForms uses HTML or XHTML to display data.

Using XForms we can separate data logic of a form from its presentation.


6) How can you store and transport data using XForms?

We can perform task of store and transport data using XForms. Using XForms we can store data or to submit data from the form. We use XML to transfer data over the net.Keep in mind XForms Store and Transform data in the form of Unicode bytes.


7) How can you say that XForms is device independent?

XForms is device independent because it is used to separate data from presentation and makes you able to use data models for all devices.

It facilitates you to customize presentation for different user interface like mobile phones, handheld devices etc.


8) What is the benefit of device independent feature of XForms?

Device independent features of XForms makes you able to add XForms element into other XML application directly i.e. WML(Wireless Markup Language),VoiceXML etc.


9) How to define XForms Framework?

The main purpose of XForms is to collect data. Input data using XForms can be described into two different parts.

XForm model: XForms model is used to describe the data and the logic. Using XForms, we can define what the form is, what data it contains and what it should do.

XForm user interface: XForm user interface is used to perform input and output task on data. It defines the input fields and how they should be displayed.


10) How you define XForms processor?

XForms processor is used inside the browser to submit XForms data to the target. See how to submit data into XML:


11) What is the use of Actions in XForms?

Actions are used to handle responses to events in XForms. There are two types of actions in XForms:

  • Message Action
  • Setvalue Action

12) What is the use of message action?

The <message> element is used in XForms to define and display a message into XForms user interface.

For example:

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

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

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


13) What is the use of Setvalue action?

Setvalue Action: The <setvalue> element in XForms is used to set a value which you want to show with response of an event.

For Example:

Note: In the above example, the instance element <size> will store a value 100 when the form opens.


14) How can you define data types in XForms?

XML Schema Data Types: XForms model supports XML Schema data types. This feature facilitates XForms processor to check the data for correct input values.

To use XML Schema data types, you must have to use XML Schema namespaces into our namespace declaration.

For Example:

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

For Example:

There are some unsupported XML Schema datatype in XForms.

  • Duration
  • ENTITY
  • ENTITIES
  • NOTATION

15) How can you bind data types in XForms?

The <bind> element is used to bind the data types in XForms. It is used to bind data types with their instance data.

Example:


16) How can you perform Textarea control?

Textarea control is used to perform task to control multi-line user inputs.


17) How can you perform upload control?

The upload control is used to upload files into server.

For example:


18) How can you perform output control?

Output control is used to control how to display Xform data.

For example:

See an instance of XML document:

We can perform output control on above XML instance.

Output:

Firse Name: Ajeet
Middle Name: Kumar
Last Name: Goyal

19) How can you define controls in XForms?

XForms controls are used to control user interface of XForms. They are also known as user interface control elements.

I have given you some main common controls given below:

A ref attribute is attached with each controls element. That is use to point the XForms data model of each control element.


20) What is a <label> element in XForms?

The <label> element is a necessary child element for performing input controls. By using <label> element, we can make forms secure anduse in all different types of devices. i.e. Label will be spoken for voice software.


21) How can you perform secret control?

The secret controls are designed to perform some special task like input passwords or other hidden information.

For Example:



Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA