SlideShare a Scribd company logo
1 of 20
XML FOR DUMMIES Book author: Lucinda Dykes and Ed Tittel Slides Prepared by Cong Tan Part V : XML Application Development Chapter 16: XML and Forms.
Contents Collecting Information with Forms: The Basics. HMTL Forms XML Forms
1. Collecting Information with Forms: The Basics.  Most of us are used to filling in blanks and checking boxes to provide requested information on a printed form. Web users have also become very familiar with completing online HTML forms, including text in boxes, choosing radio buttons, checking boxes, and selecting options from scrolling lists. Most interaction on the Web takes place through the use of forms. But  form is involved.  Data collection and submission with forms, HTML form elements can create interactivity via scripting languages such as JavaScript.
2. HTML Forms. You can use HTML to create forms for display on Web pages. HTML includes elements for creating text boxes, text areas, radio buttons, check boxes, and menus.  These forms have a standard look and structure, which makes it easy for Web users to use them to enter data. Figure 16-1 shows a standard HTML form.
2. HTML Forms(cont…).  HTML form elements, can create only the structure of a form for display on a Web page. Collecting the data that’s entered on an HTML form requires the use of a scripting or programming language in addition HMTL.   Perl, PHP, and Java are programming languages commonly used for forms processing. Form data is submitted to a Web server and processed by a server-side script that conforms to the CGI specification. The form results can then be returned to a Web page, sent in a e-mail message, saved as a data file, or submitted to a database. You can use XML files to create XML forms and collect data with Xforms or InfoPath.
3. XML Forms.  XML and forms go together well — both XML and forms have to do with collecting and exchanging data. You can use XSLT to generate HTML forms code, two new options(Xforms and InfoPath) provide easier solutions for XML data exchange.
3.1 XForms. XForms is an XML application created by the W3C. Xforms allows the separation of presentation and content, expanded form capabilities, and a decreased reliance on scripting for forms validation and processing. Why use Xforms?Using Xformsfor your XML data has several advangtages over using HTML forms: Form data can be collected and submitted as XML. External XML documents can be loaded as initial form data. XPath expressions and XML Schema datatypes can be used with Xforms. Xforms can be integrated with Web services. Xforms is device independent . XForms properties.  XForms  markup is shown  in Listing 16-1.
•  XForms does not include a form element; the form markup is divided between the head section and the body section of the document. • The head element contains a model element with a submission element that includes the attributes that are usually contained in an HTML form element: action, method, and id.. • XFormsis the default namespace, and the XHTML namespace uses an h: prefix. • The input element include ref attribute.
3.1 XForms(cont…) . XForms   includes all the form control elements of HTML forms.  In the case of XForms, markup is used to control the action of form elements. For example: XForms includes a select and a select1  element. You use the selectelement when there are zero or more choices and a select1element when only one choice can be selected.  An appearance attribute specifies the appearance of select or select1 elements, as in. For radio-button markup <select1 appearance=”full” ref=”bk1”> <label>Content Type</label> <item><label>Fiction</label><value>F</value></item> <item><label>Nonfiction</label><value>NF</value></item> </select1> For check-box  markup <select appearance=”full” ref=”bk1”> <label>Shipping Options</label> <item><label>Gift Wrap</label><value>GW</value></item> <item><label>Gift Card</label><value>GC</value></item> </select>
3.1 XForms(cont…) . XForms includes the following built-in features that require scripting when used in HTML forms: Required values: A required value must be entered in the form before the form can be submitted. Value containts: A value must be within a certain range of values. Datatypes for values: An XML Schema datatype can be specified for a value. Values that are calculated form other values: An Xpath expression is used to calculate a new value from other values in the form… XForms also provides these additional features: The capability to specify an initial value for form data. P3ptypes for privacy-related values: P3P datatypes can be used for private monitoring. A switch element for creating wizard-like behavior for form completion(as shown in Figure 16-2). A repeat element that allows items to be added and deleted, as in a shopping cart.  Function galore — including arithmetic functions, string manipulation, date handling, and conditional statements using if.
3.1 XForms(cont…) . Submission options. XForms includes several options for the method of submitting form data. Three of these methods are similar to those available with HTML forms: method=“get” method=“urlencodedpost” method=“form-data-post” In addition, XForms offers: method=“post” (posts the results as an XML document) method=“put”(puts the result in an XML document)  For example: Figure 16-3, 16-4, and 16-5 show the use  of “put” method.
Show an XML document with content. Shows an XForms form to edit this content
   Shows the same XML document with new content.
3.2 InfoPath.  InfoPath is a WYSIWYG XML forms editor that can create an XML form from an XML document or XML Schema document.  InfoPath forms can be used online or downloaded and completed offline.
3.2.1 Why use InfoPath? You should consider using InfoPath for several reasons: InfoPath is easy to use and doesn’t require any knowledge of XML. Form data from InfoPath can be exported to other Microsoft applications, such as Excel 2003. InfoPath allows you to select multiple forms and combine the data into one form. You can use an existing  XML Schema document and automatically create a form based on the structure of the schema. InfoPath can be integrated with Web services. InfoPath includes data validation and conditional formatting fearures.
3.2.2 Automated form design from an XML Schema. You can easily  design a form an existing XML Schema in InfoPath: Open InfoPath, and select File➪Design a Form . From the Design a New Form list in the task pane on the right side of the page, select New from XML Document or Schema. Click the Browse button in the Data Source Wizard window, and browse to the location of the bookstore.xsd file. Select the bookstore.xsd file, click Open, and then click Next in the Data Source Wizard window.  Choose No in response to the question and then click the Finish button.   Select the Layout task pane from the list at the top of the task pane and then select Two Column Table from the Insert Layout Tables menu in the task pane.  Select the Data Source task pane, highlight the book element in the task pane, and then drag the book element into the left column of the table.  Choose Section with Controls from the contextual menu.  Select and drag the totalCost element into the bottom of the left column, below the repeating section. Then select and drag the cus-tomerelement into the lower-right cell.   Choose Section with Controls from the contextual menu. The bottom of your form should now resemble Figure 16-6.
11. Choose File➪SaveAs➪Save➪ to open the Save As dialog box. Enter bookstore.xsn for the file name and then click the Save button. 12. Choose File➪Preview Form. Then choose With Data File from the  submenu. 13. Browse to the location of bookstore_schema.xml from Chapter 9, select it, and    then click Preview (Figure 16-7 shows the InfoPath Preview file). 14. Publish your file to a folder, and put your form to work.
• Now you can see why we included InfoPath in this chapter — it’s fast, and it’s easy to  • Create a working XML form document that can be opulated 	with data from any XML document that corresponds to the 	XML Schema the form is based on. 	 • Fill out new data in a blank form based on a form template 	document.
THE END

More Related Content

What's hot

5 saving data to the database
5 saving data to the database5 saving data to the database
5 saving data to the databasepvenky1578
 
Basic introduction to ms access
Basic introduction to ms accessBasic introduction to ms access
Basic introduction to ms accessjigeno
 
Access lesson 06 Integrating Access
Access lesson 06  Integrating AccessAccess lesson 06  Integrating Access
Access lesson 06 Integrating AccessAram SE
 
Acccesss notes
Acccesss notesAcccesss notes
Acccesss notesart02
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAram SE
 
Microsoft Access Notes 2007 Ecdl
Microsoft Access Notes 2007 EcdlMicrosoft Access Notes 2007 Ecdl
Microsoft Access Notes 2007 EcdlRichard Butler
 
Ms access notes
Ms access notesMs access notes
Ms access notesIKIARA
 
0214 wg3 workingwithfields
0214 wg3 workingwithfields0214 wg3 workingwithfields
0214 wg3 workingwithfieldsHusna Mubarok
 
Using List Views
Using List ViewsUsing List Views
Using List ViewsEMAINT
 
Microsoft Access 2010 - a jargon free guide
Microsoft Access 2010 - a jargon free guideMicrosoft Access 2010 - a jargon free guide
Microsoft Access 2010 - a jargon free guidePaul Barnett
 
PPT On MS-Access 2007 | Full Concepts |
PPT On MS-Access 2007 | Full Concepts |PPT On MS-Access 2007 | Full Concepts |
PPT On MS-Access 2007 | Full Concepts |Umesh Kumar
 
Ms Access ppt
Ms Access pptMs Access ppt
Ms Access pptanuj
 
Tutorial for using SQL in Microsoft Access
Tutorial for using SQL in Microsoft AccessTutorial for using SQL in Microsoft Access
Tutorial for using SQL in Microsoft Accessmcclellm
 
Microsoft Access 2007
Microsoft Access 2007Microsoft Access 2007
Microsoft Access 2007Reshma Arun
 

What's hot (19)

5 saving data to the database
5 saving data to the database5 saving data to the database
5 saving data to the database
 
Basic introduction to ms access
Basic introduction to ms accessBasic introduction to ms access
Basic introduction to ms access
 
Access lesson 06 Integrating Access
Access lesson 06  Integrating AccessAccess lesson 06  Integrating Access
Access lesson 06 Integrating Access
 
MS Access 2007 in ITT
MS Access 2007 in ITTMS Access 2007 in ITT
MS Access 2007 in ITT
 
Acccesss notes
Acccesss notesAcccesss notes
Acccesss notes
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a Database
 
Access 2007 lecture notes students
Access 2007 lecture notes studentsAccess 2007 lecture notes students
Access 2007 lecture notes students
 
Microsoft Access Notes 2007 Ecdl
Microsoft Access Notes 2007 EcdlMicrosoft Access Notes 2007 Ecdl
Microsoft Access Notes 2007 Ecdl
 
Ms access notes
Ms access notesMs access notes
Ms access notes
 
0214 wg3 workingwithfields
0214 wg3 workingwithfields0214 wg3 workingwithfields
0214 wg3 workingwithfields
 
MS Access 2010 tutorial 4
MS Access 2010 tutorial 4MS Access 2010 tutorial 4
MS Access 2010 tutorial 4
 
Using List Views
Using List ViewsUsing List Views
Using List Views
 
Access 2007
Access 2007Access 2007
Access 2007
 
Microsoft Access 2010 - a jargon free guide
Microsoft Access 2010 - a jargon free guideMicrosoft Access 2010 - a jargon free guide
Microsoft Access 2010 - a jargon free guide
 
PPT On MS-Access 2007 | Full Concepts |
PPT On MS-Access 2007 | Full Concepts |PPT On MS-Access 2007 | Full Concepts |
PPT On MS-Access 2007 | Full Concepts |
 
Ms Access ppt
Ms Access pptMs Access ppt
Ms Access ppt
 
MS Access 2010 tutorial 3
MS Access 2010 tutorial 3MS Access 2010 tutorial 3
MS Access 2010 tutorial 3
 
Tutorial for using SQL in Microsoft Access
Tutorial for using SQL in Microsoft AccessTutorial for using SQL in Microsoft Access
Tutorial for using SQL in Microsoft Access
 
Microsoft Access 2007
Microsoft Access 2007Microsoft Access 2007
Microsoft Access 2007
 

Similar to Xml For Dummies Chapter 16 Xml And Forms it-slideshares.blogspot.com

Lecture 2 - Using XML for Many Purposes
Lecture 2 - Using XML for Many PurposesLecture 2 - Using XML for Many Purposes
Lecture 2 - Using XML for Many Purposesphanleson
 
Editing XML data with XForms
Editing XML data with XFormsEditing XML data with XForms
Editing XML data with XFormsstsire
 
Web engineering UNIT IV as per RGPV syllabus
Web engineering UNIT IV as per RGPV syllabusWeb engineering UNIT IV as per RGPV syllabus
Web engineering UNIT IV as per RGPV syllabusNANDINI SHARMA
 
XMLPublisher
XMLPublisherXMLPublisher
XMLPublisherJAYAARC
 
Web engineering notes unit 4
Web engineering notes unit 4Web engineering notes unit 4
Web engineering notes unit 4inshu1890
 
Xml 150323102007-conversion-gate01
Xml 150323102007-conversion-gate01Xml 150323102007-conversion-gate01
Xml 150323102007-conversion-gate01Niraj Bharambe
 
Html advanced-reference-guide for creating web forms
Html advanced-reference-guide for creating web formsHtml advanced-reference-guide for creating web forms
Html advanced-reference-guide for creating web formssatish 486
 
Office excel tips and tricks 201101
Office excel tips and tricks 201101Office excel tips and tricks 201101
Office excel tips and tricks 201101Vishwanath Ramdas
 
SessionTen_CaseStudies
SessionTen_CaseStudiesSessionTen_CaseStudies
SessionTen_CaseStudiesHellen Gakuruh
 
MS Access - Create Form.pdf
MS Access - Create Form.pdfMS Access - Create Form.pdf
MS Access - Create Form.pdfSRReliability
 

Similar to Xml For Dummies Chapter 16 Xml And Forms it-slideshares.blogspot.com (20)

Lecture 2 - Using XML for Many Purposes
Lecture 2 - Using XML for Many PurposesLecture 2 - Using XML for Many Purposes
Lecture 2 - Using XML for Many Purposes
 
Template builder for word tutorial
Template builder for word tutorialTemplate builder for word tutorial
Template builder for word tutorial
 
Editing XML data with XForms
Editing XML data with XFormsEditing XML data with XForms
Editing XML data with XForms
 
Web engineering UNIT IV as per RGPV syllabus
Web engineering UNIT IV as per RGPV syllabusWeb engineering UNIT IV as per RGPV syllabus
Web engineering UNIT IV as per RGPV syllabus
 
XMLPublisher
XMLPublisherXMLPublisher
XMLPublisher
 
Web engineering notes unit 4
Web engineering notes unit 4Web engineering notes unit 4
Web engineering notes unit 4
 
XML DTD Validate
XML DTD ValidateXML DTD Validate
XML DTD Validate
 
Xml 150323102007-conversion-gate01
Xml 150323102007-conversion-gate01Xml 150323102007-conversion-gate01
Xml 150323102007-conversion-gate01
 
Xml material
Xml materialXml material
Xml material
 
Xml material
Xml materialXml material
Xml material
 
Xml material
Xml materialXml material
Xml material
 
Full xml
Full xmlFull xml
Full xml
 
XML
XMLXML
XML
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
XML - The Extensible Markup Language
XML - The Extensible Markup LanguageXML - The Extensible Markup Language
XML - The Extensible Markup Language
 
Html advanced-reference-guide for creating web forms
Html advanced-reference-guide for creating web formsHtml advanced-reference-guide for creating web forms
Html advanced-reference-guide for creating web forms
 
Office excel tips and tricks 201101
Office excel tips and tricks 201101Office excel tips and tricks 201101
Office excel tips and tricks 201101
 
SessionTen_CaseStudies
SessionTen_CaseStudiesSessionTen_CaseStudies
SessionTen_CaseStudies
 
MS Access - Create Form.pdf
MS Access - Create Form.pdfMS Access - Create Form.pdf
MS Access - Create Form.pdf
 
Xml description
Xml descriptionXml description
Xml description
 

More from phanleson

Learning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with SparkLearning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with Sparkphanleson
 
Firewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth FirewallsFirewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth Firewallsphanleson
 
Mobile Security - Wireless hacking
Mobile Security - Wireless hackingMobile Security - Wireless hacking
Mobile Security - Wireless hackingphanleson
 
Authentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless ProtocolsAuthentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless Protocolsphanleson
 
E-Commerce Security - Application attacks - Server Attacks
E-Commerce Security - Application attacks - Server AttacksE-Commerce Security - Application attacks - Server Attacks
E-Commerce Security - Application attacks - Server Attacksphanleson
 
Hacking web applications
Hacking web applicationsHacking web applications
Hacking web applicationsphanleson
 
HBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 04: HBase table designHBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 04: HBase table designphanleson
 
HBase In Action - Chapter 10 - Operations
HBase In Action - Chapter 10 - OperationsHBase In Action - Chapter 10 - Operations
HBase In Action - Chapter 10 - Operationsphanleson
 
Hbase in action - Chapter 09: Deploying HBase
Hbase in action - Chapter 09: Deploying HBaseHbase in action - Chapter 09: Deploying HBase
Hbase in action - Chapter 09: Deploying HBasephanleson
 
Learning spark ch11 - Machine Learning with MLlib
Learning spark ch11 - Machine Learning with MLlibLearning spark ch11 - Machine Learning with MLlib
Learning spark ch11 - Machine Learning with MLlibphanleson
 
Learning spark ch10 - Spark Streaming
Learning spark ch10 - Spark StreamingLearning spark ch10 - Spark Streaming
Learning spark ch10 - Spark Streamingphanleson
 
Learning spark ch09 - Spark SQL
Learning spark ch09 - Spark SQLLearning spark ch09 - Spark SQL
Learning spark ch09 - Spark SQLphanleson
 
Learning spark ch07 - Running on a Cluster
Learning spark ch07 - Running on a ClusterLearning spark ch07 - Running on a Cluster
Learning spark ch07 - Running on a Clusterphanleson
 
Learning spark ch06 - Advanced Spark Programming
Learning spark ch06 - Advanced Spark ProgrammingLearning spark ch06 - Advanced Spark Programming
Learning spark ch06 - Advanced Spark Programmingphanleson
 
Learning spark ch05 - Loading and Saving Your Data
Learning spark ch05 - Loading and Saving Your DataLearning spark ch05 - Loading and Saving Your Data
Learning spark ch05 - Loading and Saving Your Dataphanleson
 
Learning spark ch04 - Working with Key/Value Pairs
Learning spark ch04 - Working with Key/Value PairsLearning spark ch04 - Working with Key/Value Pairs
Learning spark ch04 - Working with Key/Value Pairsphanleson
 
Learning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with SparkLearning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with Sparkphanleson
 
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about LibertagiaHướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagiaphanleson
 
Lecture 1 - Getting to know XML
Lecture 1 - Getting to know XMLLecture 1 - Getting to know XML
Lecture 1 - Getting to know XMLphanleson
 
Lecture 4 - Adding XTHML for the Web
Lecture  4 - Adding XTHML for the WebLecture  4 - Adding XTHML for the Web
Lecture 4 - Adding XTHML for the Webphanleson
 

More from phanleson (20)

Learning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with SparkLearning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with Spark
 
Firewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth FirewallsFirewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth Firewalls
 
Mobile Security - Wireless hacking
Mobile Security - Wireless hackingMobile Security - Wireless hacking
Mobile Security - Wireless hacking
 
Authentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless ProtocolsAuthentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless Protocols
 
E-Commerce Security - Application attacks - Server Attacks
E-Commerce Security - Application attacks - Server AttacksE-Commerce Security - Application attacks - Server Attacks
E-Commerce Security - Application attacks - Server Attacks
 
Hacking web applications
Hacking web applicationsHacking web applications
Hacking web applications
 
HBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 04: HBase table designHBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 04: HBase table design
 
HBase In Action - Chapter 10 - Operations
HBase In Action - Chapter 10 - OperationsHBase In Action - Chapter 10 - Operations
HBase In Action - Chapter 10 - Operations
 
Hbase in action - Chapter 09: Deploying HBase
Hbase in action - Chapter 09: Deploying HBaseHbase in action - Chapter 09: Deploying HBase
Hbase in action - Chapter 09: Deploying HBase
 
Learning spark ch11 - Machine Learning with MLlib
Learning spark ch11 - Machine Learning with MLlibLearning spark ch11 - Machine Learning with MLlib
Learning spark ch11 - Machine Learning with MLlib
 
Learning spark ch10 - Spark Streaming
Learning spark ch10 - Spark StreamingLearning spark ch10 - Spark Streaming
Learning spark ch10 - Spark Streaming
 
Learning spark ch09 - Spark SQL
Learning spark ch09 - Spark SQLLearning spark ch09 - Spark SQL
Learning spark ch09 - Spark SQL
 
Learning spark ch07 - Running on a Cluster
Learning spark ch07 - Running on a ClusterLearning spark ch07 - Running on a Cluster
Learning spark ch07 - Running on a Cluster
 
Learning spark ch06 - Advanced Spark Programming
Learning spark ch06 - Advanced Spark ProgrammingLearning spark ch06 - Advanced Spark Programming
Learning spark ch06 - Advanced Spark Programming
 
Learning spark ch05 - Loading and Saving Your Data
Learning spark ch05 - Loading and Saving Your DataLearning spark ch05 - Loading and Saving Your Data
Learning spark ch05 - Loading and Saving Your Data
 
Learning spark ch04 - Working with Key/Value Pairs
Learning spark ch04 - Working with Key/Value PairsLearning spark ch04 - Working with Key/Value Pairs
Learning spark ch04 - Working with Key/Value Pairs
 
Learning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with SparkLearning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with Spark
 
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about LibertagiaHướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
 
Lecture 1 - Getting to know XML
Lecture 1 - Getting to know XMLLecture 1 - Getting to know XML
Lecture 1 - Getting to know XML
 
Lecture 4 - Adding XTHML for the Web
Lecture  4 - Adding XTHML for the WebLecture  4 - Adding XTHML for the Web
Lecture 4 - Adding XTHML for the Web
 

Recently uploaded

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 

Recently uploaded (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 

Xml For Dummies Chapter 16 Xml And Forms it-slideshares.blogspot.com

  • 1. XML FOR DUMMIES Book author: Lucinda Dykes and Ed Tittel Slides Prepared by Cong Tan Part V : XML Application Development Chapter 16: XML and Forms.
  • 2. Contents Collecting Information with Forms: The Basics. HMTL Forms XML Forms
  • 3. 1. Collecting Information with Forms: The Basics. Most of us are used to filling in blanks and checking boxes to provide requested information on a printed form. Web users have also become very familiar with completing online HTML forms, including text in boxes, choosing radio buttons, checking boxes, and selecting options from scrolling lists. Most interaction on the Web takes place through the use of forms. But form is involved. Data collection and submission with forms, HTML form elements can create interactivity via scripting languages such as JavaScript.
  • 4. 2. HTML Forms. You can use HTML to create forms for display on Web pages. HTML includes elements for creating text boxes, text areas, radio buttons, check boxes, and menus. These forms have a standard look and structure, which makes it easy for Web users to use them to enter data. Figure 16-1 shows a standard HTML form.
  • 5. 2. HTML Forms(cont…). HTML form elements, can create only the structure of a form for display on a Web page. Collecting the data that’s entered on an HTML form requires the use of a scripting or programming language in addition HMTL. Perl, PHP, and Java are programming languages commonly used for forms processing. Form data is submitted to a Web server and processed by a server-side script that conforms to the CGI specification. The form results can then be returned to a Web page, sent in a e-mail message, saved as a data file, or submitted to a database. You can use XML files to create XML forms and collect data with Xforms or InfoPath.
  • 6. 3. XML Forms. XML and forms go together well — both XML and forms have to do with collecting and exchanging data. You can use XSLT to generate HTML forms code, two new options(Xforms and InfoPath) provide easier solutions for XML data exchange.
  • 7. 3.1 XForms. XForms is an XML application created by the W3C. Xforms allows the separation of presentation and content, expanded form capabilities, and a decreased reliance on scripting for forms validation and processing. Why use Xforms?Using Xformsfor your XML data has several advangtages over using HTML forms: Form data can be collected and submitted as XML. External XML documents can be loaded as initial form data. XPath expressions and XML Schema datatypes can be used with Xforms. Xforms can be integrated with Web services. Xforms is device independent . XForms properties. XForms markup is shown in Listing 16-1.
  • 8. • XForms does not include a form element; the form markup is divided between the head section and the body section of the document. • The head element contains a model element with a submission element that includes the attributes that are usually contained in an HTML form element: action, method, and id.. • XFormsis the default namespace, and the XHTML namespace uses an h: prefix. • The input element include ref attribute.
  • 9. 3.1 XForms(cont…) . XForms includes all the form control elements of HTML forms. In the case of XForms, markup is used to control the action of form elements. For example: XForms includes a select and a select1 element. You use the selectelement when there are zero or more choices and a select1element when only one choice can be selected. An appearance attribute specifies the appearance of select or select1 elements, as in. For radio-button markup <select1 appearance=”full” ref=”bk1”> <label>Content Type</label> <item><label>Fiction</label><value>F</value></item> <item><label>Nonfiction</label><value>NF</value></item> </select1> For check-box markup <select appearance=”full” ref=”bk1”> <label>Shipping Options</label> <item><label>Gift Wrap</label><value>GW</value></item> <item><label>Gift Card</label><value>GC</value></item> </select>
  • 10. 3.1 XForms(cont…) . XForms includes the following built-in features that require scripting when used in HTML forms: Required values: A required value must be entered in the form before the form can be submitted. Value containts: A value must be within a certain range of values. Datatypes for values: An XML Schema datatype can be specified for a value. Values that are calculated form other values: An Xpath expression is used to calculate a new value from other values in the form… XForms also provides these additional features: The capability to specify an initial value for form data. P3ptypes for privacy-related values: P3P datatypes can be used for private monitoring. A switch element for creating wizard-like behavior for form completion(as shown in Figure 16-2). A repeat element that allows items to be added and deleted, as in a shopping cart. Function galore — including arithmetic functions, string manipulation, date handling, and conditional statements using if.
  • 11.
  • 12. 3.1 XForms(cont…) . Submission options. XForms includes several options for the method of submitting form data. Three of these methods are similar to those available with HTML forms: method=“get” method=“urlencodedpost” method=“form-data-post” In addition, XForms offers: method=“post” (posts the results as an XML document) method=“put”(puts the result in an XML document) For example: Figure 16-3, 16-4, and 16-5 show the use of “put” method.
  • 13. Show an XML document with content. Shows an XForms form to edit this content
  • 14. Shows the same XML document with new content.
  • 15. 3.2 InfoPath. InfoPath is a WYSIWYG XML forms editor that can create an XML form from an XML document or XML Schema document. InfoPath forms can be used online or downloaded and completed offline.
  • 16. 3.2.1 Why use InfoPath? You should consider using InfoPath for several reasons: InfoPath is easy to use and doesn’t require any knowledge of XML. Form data from InfoPath can be exported to other Microsoft applications, such as Excel 2003. InfoPath allows you to select multiple forms and combine the data into one form. You can use an existing XML Schema document and automatically create a form based on the structure of the schema. InfoPath can be integrated with Web services. InfoPath includes data validation and conditional formatting fearures.
  • 17. 3.2.2 Automated form design from an XML Schema. You can easily design a form an existing XML Schema in InfoPath: Open InfoPath, and select File➪Design a Form . From the Design a New Form list in the task pane on the right side of the page, select New from XML Document or Schema. Click the Browse button in the Data Source Wizard window, and browse to the location of the bookstore.xsd file. Select the bookstore.xsd file, click Open, and then click Next in the Data Source Wizard window. Choose No in response to the question and then click the Finish button. Select the Layout task pane from the list at the top of the task pane and then select Two Column Table from the Insert Layout Tables menu in the task pane. Select the Data Source task pane, highlight the book element in the task pane, and then drag the book element into the left column of the table. Choose Section with Controls from the contextual menu. Select and drag the totalCost element into the bottom of the left column, below the repeating section. Then select and drag the cus-tomerelement into the lower-right cell. Choose Section with Controls from the contextual menu. The bottom of your form should now resemble Figure 16-6.
  • 18. 11. Choose File➪SaveAs➪Save➪ to open the Save As dialog box. Enter bookstore.xsn for the file name and then click the Save button. 12. Choose File➪Preview Form. Then choose With Data File from the submenu. 13. Browse to the location of bookstore_schema.xml from Chapter 9, select it, and then click Preview (Figure 16-7 shows the InfoPath Preview file). 14. Publish your file to a folder, and put your form to work.
  • 19. • Now you can see why we included InfoPath in this chapter — it’s fast, and it’s easy to • Create a working XML form document that can be opulated with data from any XML document that corresponds to the XML Schema the form is based on. • Fill out new data in a blank form based on a form template document.