XML Files
Page
 International Technical Support Organization
 First Edition December
 Contents
 XML Collection
 Contents
 Part 4. Appendixes
 Abbreviations and acronyms
Page
 Copyright License
 Trademarks
Cics
 Preface
Team that wrote this redbook
Page
 Become a published author
Comments welcome
Page
 Part
Page
 XML overview
 XML concepts
Background
 XML business benefits
Information sharing
 XML within an organization
 Voice XML
Technical benefits of XML
XML in new innovations
Scalable Vector Graphics
 Simplicity and openness
Acceptability of use for data transfer
Uniformity and conformity
Separation of data and display
 Industry acceptance
XML history
Extensibility
 XML1.0
 Xslt and Web applications
 Web Tier
 Web services and XML
 Interaction of Web services
XML, W3C, and IBM
 Recommendations
Working drafts in development
Page
 Technologies in XML
 XML Processor parser
Tree-based parsing
 DTD and XML Schema
Event-based parsing
Page
 Schema and style using CSS, XSLT, and XSL
 Cascading Style Sheet CSS
 XML namespaces
Example 2-1 a namespace example
 Example 2-2 a namespace example using namespace prefix
 Link and jump using XLink, XPointer, and XML Base
 Example 2-3 a simple link
 Example 2-4 An extended link
 Example 2-5 An example of extended links using xbase
XML Base
 XML Pointer
 XPointer paths and steps
 XPointer range functions
 XPointer string functions
 XPath
Example 2-6 An XPath example
 XML digital
Book Library
 Technologies in XML
 Example 2-8 Encrypted Information on passenger John Smith
Examples of XML encryption
Example 2-7 Information on passenger John Smith
 Example 2-10 Encryption of the whole document
Example of a XML digital signature
Example 2-9 Encrypting only the credit card number
 Example 2-12 Part encryption of an XML document
Transforms
Example 2-11 An XML digital signature
 Example 2-13 The final XML document after encryption
 Other security specifications
XML query language
 Path expressions
 Element constructors
 FLWRFOR, LET, Where and Return clauses expression
Conditional expressions if then Else
 Quantifiers
Filtering
 Example schema for relational database and Xquery comparison
Querying relational data
 Grouping in XQuery
Joins
 Xslt compilers Xsltc
Xslt interpreters
 For more details, visit Using XSLTCThe Apache XML Project at
 Java Architecture for XML Binding Jaxb
Cocoon
 Serializer pipeline outputs
Generators and reader pipeline inputs
Transformers and actions processing steps
 Example 2-14 Sample sitemap for Cocoon
Matchers and selectors conditional processing
Sitemap
 Example 2-15 Components of a sitemap XML file
 Part 2 XML technology in IBM WebSphere
Page
 Processing XML
 XML applications
 Xalan
Xalan model of operation
 SAX2
Javax.xml.transforms interfaces operation
 Example 3-1 Sample XML document
Example 3-2 Sample event breakdown
 SAX2 classes and interfaces
 Example 3-4 Sample namespace
XML namespace support
Example 3-3 SAX2 callback methods
 DOM level2
DOM hierarchy
 Example 3-5 Sample XML document
 Sample generated DOM tree
 Jaxp
 Using Jaxp
Example 3-6 Sample XML to Html transformation code
 Xslt support packages in Jaxp
 Stylesheet compilation
 Introduction to IBM WebSphere Application Developer
 WebSphere Studio product family
WebSphere Studio family
 WebSphere Studio Site Developer Advanced
WebSphere Studio Application Developer
 WebSphere Studio Application Developer Integration Edition
WebSphere Enterprise Developer
 Tools
Web development tools
 Relational database tools
XML tools
 Web services development tools
Java development tools
 Debugging tools
EJB development tools
Team collaboration
 Server tools for testing and deployment
Performance profiling tools
 Fragment project
Plug-in development tools
Plug-in project
Plug-in component
 Application Developer XML Tools
 XML perspective
Window-Open Perspective-XML
 Creating an XML file from scratch
XML perspective editors
XML editor
Select the option Create XML file from scratch
 Editing an XML file
XML editor
 Creating a DTD from scratch
DTD editor
Validating the XML file
 Using the Outline view to add DTD components
DTD Editor
 Validating DTD
Creating a schema from scratch
XSD editor
 Using the Outline view to add schema components
XML Schema Editor
 Pop-up on schema file in the Outline view
Making changes and referential integrity
 Validating schema
Namespace
 XSL editor
Creating an XSL file from scratch
 Validating the XSL file
Namespace support
Editing an XSL file
 Indicate all local elements to be qualified
 XPath support
XPath Builder
 10 XPath definition
 11 XPath Operators
 12 XPath functions
 XSL debugger
13 XPath Query Result screen
 14 XSL Debugger
 Web service wizard
Web services support
Web Service Dadx group configuration wizard
 Application Developer XML Tools
Page
 RDB and XML integration
101
 SQL to XML wizards
Passenger List Select statement
 SQL to XML wizard panel
 Example 6-1 XSL file for Show table columns as ‘Elements’
Show table column as option
XML and XSL files
 Html
 XML file generated with the Elements option
 Html file
 Html with the ‘Recurse through foreign keys’ unchecked
 Html generated for Foreign key as links option
 XML Schema file
Aircraft Html generated for ‘Foreign key as links’ option
 RDB and XML integration
 076/schema
 Sequence
 Example 6-4 XML Schema for Aircraft table
 DTD file
Page
 Query template file
Flight Cdata #REQUIRED
 Statement Options
 XML to SQL wizard
Example 6-9 Customer.xml
 XML to SQL wizard Selecting the connection
 10 XML to SQL wizard Selecting Schema and Action
 DDL to XML Schema wizard
11 XML to SQL wizard Selecting the column
 12 Generate XML Schema
Example 6-10 XML Generated through the DDL to XML Schema
 Restriction base=string length value=30 SimpleType Element
 Example 6-11 XML Schema for a single table using a Select
 DB2 XML Extender
 XML Extender
13 shows an overview of the XML Extender
 UDTs created
Administrative support tables, UDTs, and UDFs
Administrative support tables created
 Stored Procedures created
UDFs created
 DTD Repository
 Document Access Definitions DAD
Example 6-12 DTD representation of a book
Page
 When to use XML Column method
XML Column method
 XML Collection
Elements/attributes
As is xml document
 When to use XML Collection method
15 XML Collection Method overview
 Mapping schemes for XML collections
Example 6-14 Sample DTD
 SQL mapping
 Employee table in Sample database
Column name Data type
 Empact Table in Sample database
 RDBnode for the top elementnode
Example 6-16 The RDBnode
 Example 6-17 RDBnode mapping
XML Extender administration tools
RDBnode for each attribute and textnode
 XML MQSeries enablement
 RDB and XML integration
Page
 145
 Click Finish
Select passengerList.dtd Right-clickGenerate-XML Schema
DTD XSD
 XML DTD/XSD
Create an XML file from a DTD file
 Create an XML file from an XSD file
 Select passengerList.xsd Right-clickGenerate-XML File
Create DTD/XSD files from XML
Select Select file from Workspace option
Example 7-1 Customer.xml
 Example 7-2 Customer DTD
Select Customer.xml Right-clickGenerate-XML Schema
Select customer.xml Right-clickGenerate-DTD
 Example 7-3 Customer.xsd
Generate a Html from an XSD
Select passengerList.xsd file Right-clickGenerate-HTML Doc
 Select J2EE Web Application Project. Click Next
JavaBeans from DTD/XSD
Click File-New-Project
 Select Generate sample test program. Click Finish
Generate XML/XSL from JavaBeans
Select passengerList.xsd Right-clickGenerate-JavaBeans
Example 7-4 passenger.java
Page
 Click File-New-Java Bean XML Client
Input XML Form screen
 Generate XML/XSL from Html
Click File-New-Other
 Preparing the Html file for generation
Adding annotation tags
 Example 7-5 cus-template.xhtml
 Example 7-6 Customer.xml
Select cus-template.xhtml Right-clickGenerate-XSL File
Select Customer.xhtml. Click Next
Page
 Part 3 XML application development
161
Page
 WebSphere and XML approaches
163
 XML in Application development
 Web services
 Passenger List application
 Solution Outline
 XML in this application
Web Services
Servlet
Client Web Tier
 Technical implementation overview
Development and running of the Passenger List application
Page
 Advantages of using the database
Discussion
 Enterprise JavaBeans
 Interprise Application Server
 Customer Registration application
 Technical overview
Page
 Developing XML Web services
177
 Creating the Web tier
Servlet
 Create the Airline simple project
Name Type
 Create the Travel Web project
Design the XML Schema
Select File-New-XML Schema
 Select root node
PassengerList DOM Tree
 Creating XML Schema
 XML Schema Example 9-1 PassengerList.xsd
 Html and mapping approach
Generate XML file
Design an output
Example 9-2 Static XML file
 Example 9-4 html.xml source
Select required and optional content, click Finish
Example 9-3 html.dtd
 Generate an XSL file
XML to Html mapping
 Mapping XML to Html
Source Target
 Create an XSL from scratch
Generating XSL from Xhtml
 Testing the XSL
Developing the servlet
 Javax.xml.transform.Source
Example 9-5 GetPassengerList Server doGet method
 Javax.xml.transform.TranfrormerFactory
Test the passenger list application
Compiling XSL
Javax.xml.transform.Transformer
 Creating a Web service
11 XML Web service
 Right-clickNew Connection
Create the database tier
Click Window-Open Perspective-Data
Right-clickImport to folder
 Generate DTD file
PassengerList.xsd-Generate-DTD Figure
 Loading DTD into XML Extender
13 Generated DTD File
 Select RDB Table to XML Mapping, click Next
Creating DAD file using RDB to XML mapping
Membership
 Click Mapping-Edit Join Conditions
15 Edit Join Conditions
 Select passengerList.rmx
16 RDB to XML mapping
 Create the Web Service from Dadx file
DAD Extension
 Web services and DB2 XML Extender
Dadx Group
 Group.properties File
 Generating the Dadx
Next
 Dadx operations
18 Dadx Generation
 RetrieveXML
 StoreXML
Deploying the Web service
Example 9-6 Updated Dadx file
 19 Web Service settings
Example 9-7 namspacetable mapping entry
 Test the Web Service
20 Testing Web Service
 Modify passenger list application to use the Web Service
Mapping DTDIDs to XSD namespaces and locations
 Example 9-9 Changing root element
Modifying the XSL file
Example 9-8 Namespaces
Example 9-10 passengerList.xsl
Page
 Creating Html input form
Center
 Using Java proxy
22 Input form GetPassengerList.html
 Conclusion
23 passengerList result
Page
 Development of XML-based Enterprise applications
215
 Multi-tier solution architecture
XML based Enterprise application architecture
 Solution outline for customer registration sample
Customer registration
 Retrieving customer information
Customer registration scenario outline
 Developing the customer registration sample
Retrieving customer data scenario outline
 Preparing to create the Web tier
JavaBean to XML client wizard
 Customer JavaBean class specification
Creating the Web tier
 JavaBean XML/XSL client wizard
 JavaBean XML/XSL client JavaBean selection
 JavaBean XML/XSL client methods and properties selection
 JavaBean XML/XSL client input form design
 10 JavaBean XML/XSL client results form design
 11 JavaBean XML/XSL client prefix specification
Investigating the Web-tier generated files
Page
 Java Bean
ProduceDOM Document
Org.w3c.dom.Document
XML Data
 Example 10-2 Source code for CustomerXSLServlet init method
 Development of XML-based Enterprise applications
 Xslt Processor Stylesheet Transformer
ProduceDOMDocument
XML Document
 Example 10-4 Source code for the servlet doPost method
 Form action=/Registration/CustomerXSLServlet method=post
 Membership
 Example 10-10 Sample of CustomerResult stylesheet form
 Example 10-12 Schema file for the XML data
Validating the Web tier
 Building the entity EJB and the database schema
15 Customer registration form
 Preparing to create the entity EJB
Project configuration
EJB mapping approaches review
Creating the entity EJB
 17 Create an Enterprise Bean wizard
 Creating the database mapping and tables
18 Enterprise bean details
 19 EJB to RBD Mapping wizard for CustomerInfo module
 20 Target database specification
 21 EJB to RDB mapping editor
 Access beans
22 Database connection definition
 Creating an access bean for the entity bean
 23 Access Bean creation wizard
Creating a Jdbc data source
 24 Data source definition for a server configuration
 Binding the EJB to a Jdbc data source
25 Jdbc data source definition
 Integrating the entity EJB with the Web tier
Modifying CustomerXML
 27 CustomerInfoWeb project properties
Example 10-13 create source code
 Modifying CustomerXSLServlet
Example 10-14 CustomerXSLServlet doPost source code
 Example 10-15 Retrieval function
Application deployment and testing
Retrieval function
Example 10-16 Confirming the creation
 Testing the registration application
28 Generating the deployed code for the EJB
 29 Customer Registration form
Page
 Light weight XML-based Enterprise Application
257
 SQL-XML solution architecture
SQL to/from XML libraries
 Light weight XML-based Enterprise Application
Customer registration
 Retrieving customer information
 XSL Servlet
 Adding the libraries to the project
XML Document format
 XMLToSQL architecture
Converting an XML Document
 XMLToSQL
Modifying CustomerXSLServlet
Initializing the XMLToSQL class
 Example 11-1 initSQLProperties method
Creating an XML Document
Modifying the produceDOMDocument method
 We need to change to
Example 11-2 ProduceDOMDocumentforTools
 Executing the XMLToSQL class
Example 11-3 CustomerXSLServlet doRegister method
 Example 11-5 The xslif tag
Modifying the doPost method
Example 11-4 CustomerXSLServlet doPost method
 Adding the error case
Example 11-6 Customer.XSL firstname template
 Statement
Retrieving a customer
JdbcDriver
Format
 Example 11-7 initQueryProperties method
Initializing the SQLToXML class
SQLToXML
 Executing the SQLToXML class
Example 11-8 CustomerXSLServlet doQuery method
 Example 11-10 showPage method
Modifying the showPage method
Example 11-9 CustomerXSLServlet doPost method for query
 Example 11-12 Customer.XSL membership template
Modifying the doGet method
Example 11-11 showPage method
 Example 11-13 Result XSL
Page
 Using datasource with SQLToXML and XMLToSQL class
Customer Registration form
 Class definition
Getting the datasource
 Example 11-15 setDatasourceMethods
Constructors
Example 11-14 setDatasourceMethods
 Execute methods
 Conclusion
11 Core data is an XML
Page
 Deploying your Web application
283
 Manual deployment
Exporting your project from Application Developer
 Installing the EAR file on WebSphere AEs
Starting the WebSphere AEs Admin Console
 Installing the EAR
Select Enterprise Applications
 Testing the application
 Publishing to a remote server AEs
Creating a remote server instance
 Creating a remote server instance
 WebSphere Studio Application Developer Programming Guide
 Remote server instance settings
 Remote file transfer option
 Remote copy options
 WebSphere Studio Application Developer Programming Guide
 Publishing to remote server
 WebSphere Studio Application Developer Programming Guide
 Part 4 Appendixes
297
Page
 299
 Things to do before installation
Installing Application Developer
 WebSphere Studio Application Developer installation
 Selecting your workspace
Select options
 Verifying the installation
Programs-IBM WebSphere Studio Application Developer-IBM
 WebSphere Studio Application Developer Programming Guide
 305
 Hardware and software prerequisites
Create groups and users
 Stop the Web server processes
Install WebSphere Application Server
Check that IP ports are unused
 10 Installation options
 11 Security options
 12 Snoop servlet accessed through embedded Web server
 311
Using the Web material
Locating the Web material
 How to use the Web material
System requirements for downloading the Web material
 Abbreviations and acronyms
313
 OTS
 Other resources
IBM Redbooks
Referenced Web sites
315
 How to get IBM Redbooks
IBM Redbooks collections
 Index
317
 Jaxp
 Wsaa Xacml
 Xsltc 48
 Spine 475-0.875 250 459 pages
Page
Page
 XML Files