© Copyright IBM Corp. 2011. All rights reserved. ix
Figures
1-1 XML: The foundation for web services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1-2 DOM tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1-3 DOM tree after XSL transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1-4 Hello world . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2-1 SQL/XML query with XMLEXISTS predicate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2-2 XMLTABLE function example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2-3 z/OS XML system services and zAAP processing flow . . . . . . . . . . . . . . . . . . . . . . . . 43
2-4 Splitting an XPath expression over multiple lines in 3270 SPUFI session . . . . . . . . . . 44
3-1 Application scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3-2 Four application code samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4-1 XML objects for segmented base table space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4-2 XML objects for partition-by-growth base table space . . . . . . . . . . . . . . . . . . . . . . . . . 55
4-3 XML objects for classic-partitioned base table space . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4-4 XML objects for range-partitioned base table space. . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4-5 XML basic storage scheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4-6 XML multiple version scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4-7 Multiple versions for XML data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4-8 XML locking scheme with multiversioning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4-9 -DISPLAY DATABASE command output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5-1 XML schemas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
5-2 XML Schemas in XML schema repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5-3 Schema determination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
6-1 SQL query: SELECT * FROM BK_TO_CSTMR_STMT . . . . . . . . . . . . . . . . . . . . . . . 102
6-2 Optim Development Studio XML document viewer: Design view . . . . . . . . . . . . . . . . 103
6-3 Optim Development Studio XML document viewer: Source view. . . . . . . . . . . . . . . . 104
6-4 Tabular result set of bank statement entries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
6-5 Relational result set spanning data elements from multiple XML documents. . . . . . . 106
6-6 Typical “Ntry” node within a Bk_To_Cstmr_Stmt document . . . . . . . . . . . . . . . . . . . . 107
6-7 SQL results using UDFs on XML documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
6-8 Scenario to receive XML CDC messages into DB2 pureXML through MQ . . . . . . . . 124
6-9 Initial CUST_HISTORY table contents for CUST1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
6-10 Updated CUST_HISTORY table contents for ‘CUST1. . . . . . . . . . . . . . . . . . . . . . . 128
6-11 DB2 pureXML as historical repository. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
7-1 Exchange data as textual or binary XML format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
7-2 Bank To Customer Statement example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
7-3 HTML output after XSLT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
7-4 Put a message into a queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
8-1 Data conversion in a three-layer structure using CLOBs or BLOBs . . . . . . . . . . . . . . 161
8-2 BankToCustomerStatement message as shown in a browser . . . . . . . . . . . . . . . . . . 164
8-3 Subset of the BankToCustomerStatement schema . . . . . . . . . . . . . . . . . . . . . . . . . . 165
8-4 Message recipient of a BankToCustomerStatement . . . . . . . . . . . . . . . . . . . . . . . . . 169
8-5 Schema definition for the GrpHdr element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
8-6 MsgRcpt element with namespace declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
8-7 Schema definition of GrpHdr element. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
8-8 Revised schema definition for GrpHdr with multiple MsgRcpt elements. . . . . . . . . . . 176
8-9 MsgRcpt element created with XML GENERATE . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
8-10 MsgRcpt element created with XML GENERATE WITH ATTRIBUTES. . . . . . . . . . 180
9-1 CHECK DATA syntax: New keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

Get Extremely pureXML in DB2 10 for z/OS now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.