Home > Article > Backend Development > XML Schema - A detailed explanation of XForms and customer invoices
The XForms XML standard is very similar to the HTML and XHTML form markup familiar to web developers and will become part of the XHTML 2.0 standard.
XForms XML is based on simple models and views. The XForms XML standard is very similar to the HTML and XHTML form tags familiar to web developers and will become part of the XHTML 2.0 standard. XForms XML is based on simple model, view, controller formats. The model is the overall description of the form, including fields, input constraints, and data submission methods. A view defines the controls, groupings, and model fields they reference that appear in the form. The formatting and rendering of form controls is controlled by CSS.
The XForms standard extends traditional HTML form definitions by dividing form information into more detail. Dynamic elements can be used in the process of filling the form (currently generally only achieved through
JavaScript
or Ajax elements).
In Listing 11 you can see a simple text input box and pop-up selection box.
List 11. Simple text input box and pop-up selection box
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms"> <head> <title>XForms Sample</title> <xforms:model> <xforms:instance> <Name xmlns=""> <FName /> <LName /> <Title /> </Name> </xforms:instance> </xforms:model> </head> <body> <xforms:select1 ref="Title"> <xforms:label>Title:</xforms:label> <xforms:item> <xforms:label>Mr</xforms:label> <xforms:value>Mr</xforms:value> </xforms:item> <xforms:item> <xforms:label>Mrs</xforms:label> <xforms:value>Mrs</xforms:value> </xforms:item> </xforms:select1> <xforms:input ref="FName"> <xforms:label>First name: </xforms:label> </xforms:input> <xforms:input ref="LName"> <xforms:label>Last name: </xforms:label> </xforms:input> <hr /> <xforms:output value="concat('Hello ',Title,' ',FName,' ',LName)"> <xforms:label>Output: </xforms:label> </xforms:output> </body> </html>
In the past, the exchange of business information such as invoices had to establish very large structures and definitions. The international invoice information exchange standard included hundreds of fields. Sharing invoices, orders, and other data can be difficult without an efficient way to exchange data.
Because there is no unified standard, many organizations have developed various versions of the core invoicing standard. Of these, the standard developed by the OASIS group is probably the best-known and the one recognized by a large number of companies and organizations.
This structure is part of the larger framework Universal Business Logic (UBL) developed by OASIS and includes multiple modes and workflows, from ordering and printing invoices to payments. This system is too complex to discuss in this article, but if you need a flexible, interoperable system, UBL is a good place to start.
The above is the detailed content of XML Schema - A detailed explanation of XForms and customer invoices. For more information, please follow other related articles on the PHP Chinese website!