<<

APPENDIX A ■■■ Linux Installations

This appendix provides comprehensive instructions for installing on Linux- and Unix-like oper- ating systems all the software that is required for running applications discussed in the book. The JDK installation is common and is required by all the examples in this book. Thus, it is listed first. Following that section, the installation procedures are listed by chapter for your conven- ience. Also, any installation instructions presented in earlier chapters are not repeated here.

JDK 1.5.0 You can download the jdk-1_5_0_06-linux-i586.rpm archive from the following URL: http://java.sun.com/j2se

Double-clicking on this installer guides you through the various steps of installation. These steps are not exhaustive; they simply ask you to accept the license agreement and specify the folder where you would like to install the software. After installing the software, you need to set the JAVA_HOME environment variable, which you do by using the following command: export JAVA_HOME=/usr//jdk1.5.0

Add the bin folder to your PATH environment variable as follows: export PATH=$PATH:$JAVA_HOME/bin

■Note The environment variables can be set permanently by adding the given commands to the \etc\profile file. To make the changes visible, use the source command.

449 450 APPENDIX A ■ LINUX INSTALLATIONS

Chapter 2 You need to install , XMLBeans, and Ant to run the applications found in Chapter 2.

Apache Xerces You can download Apache Xerces project code from one of the following URLs:

http://xml.apache.org/xerces2-j/

or

http://archive.apache.org/dist/xml/xerces-j/

The Apache Xerces project is available in binary and source distribution. You can down- load the Xerces-J-bin.2.7.1.tar archive and unzip it to the desired folder. After installing software, add the xml-.jar file to your classpath as follows:

export CLASSPATH=$CLASSPATH:/usr/xerces/xml-apis.jar

Apache XMLBeans You can download Apache XMLBeans project code from the following URL:

http://xmlbeans.apache.org/

Download the xmlbeans-current.tgz archive and unzip it to the desired folder. Update your environment by using the following commands:

export XMLBEANS_HOME=/usr/xmlbeans export PATH=$PATH:$XMLBEANS_HOME/bin

Apache Ant The project is available in binary and source distribution. You can download the binary distribution from the following URL:

http://ant.apache.org/bindownload.cgi

Unzip the archive to the desired folder and update your environment as follows:

export ANT_HOME=/usr/ant export PATH=$PATH:$ANT_HOME/bin APPENDIX A ■ LINUX INSTALLATIONS 451

Chapter 4 Running applications from Chapter 4 requires you to install the Tomcat web server and Apache SOAP toolkit.

Apache Tomcat You have to download apache-tomcat-5.5.9.tar.gz from the following URL: http://archive.apache.org/dist/jakarta/tomcat-5/

Unzip the archive to the desired folder. Set the environment by using the following commands: export CATALINA_HOME=/usr/tomcat export PATH=$PATH:/$CATALINA_HOME/bin

You can run the Tomcat server by using the following command:

./startup.sh

The command to shut down the server is as follows:

./shutdown.sh

You can test the Tomcat installation by opening the following URL in the browser: http://localhost:8080

Apache SOAP You can download the Apache SOAP toolkit from the following URL: http://mirrors.isc.org/pub/apache/ws/soap/version-2.3.1/

Apache SOAP is available in binary and source distribution. If you are using the binary distribution, simply unzip the downloaded archive. Copy the soap.war file to the webapps folder of the Tomcat installation and restart the Tomcat server if you are running it. Make sure that you have the mail.jar and activation.jar files in the shared\lib folder of the Tomcat installation. Now you can test the installation by opening the following URL in the browser: http://localhost:8080/soap 452 APPENDIX A ■ LINUX INSTALLATIONS

Chapter 5 Running applications from Chapter 5 requires you to install code for the project.

Apache Xalan The Apache Xalan project code is available in binary and source distribution. You can down- load it from the following URL:

http://xalan.apache.org/

Unzip the downloaded binary archive to the desired folder. Add the required JAR files to your classpath as follows:

export CLASSPATH=$CLASSPATH:/usr/xalan/xalan.jar:/usr/xalan/xsltc.jar

Chapter 6 Running examples from this chapter requires you to install the Apache FOP project code.

Apache FOP The Apache FOP project code is available in binary and source distribution. You can download it from the following URL:

http://xmlgraphics.apache.org/fop/download.html

Download the fop-current-bin.tar.gz archive and unzip it to the desired folder. Add the required JAR file to your classpath as follows:

export CLASSPATH=$CLASSPATH:/usr/fop/xml-apis.jar

Chapter 7 This chapter requires you to install Cocoon on your machine.

Apache Cocoon Download the cocoon-2.1.8-src.tar archive from the following URL:

http://cocoon.apache.org/

Unzip the downloaded archive file to the desired folder. You have to build Cocoon to create a WAR file. You can do this by running the build.sh file as follows:

./build.sh war

This will create a cocoon.war file in the \build\cocoon directory of the Cocoon installation folder. Copy this WAR file to the webapps folder of your Tomcat installation and restart Tomcat if it is already running. Test your installation by opening the following URL in the browser:

http://localhost:8080/cocoon APPENDIX A ■ LINUX INSTALLATIONS 453

Chapter 8 Running applications from this chapter requires you to install XML-Security project code on your machine.

Apache XML-Security Download the distribution archive from the following URL: http://xml.apache.org/security/dist/java-library/

Unzip the archive to the desired folder. Modify the classpath by using the following command: export CLASSPATH=$CLASSPATH:/usr/xml-security/libs/xmlsec-1.3.0.jar

Chapter 9 Running applications from this chapter requires you to install Apache Xindice project code on your machine.

Apache Xindice Download the xml-xindice-1.0.tar.gz archive from the following URL: http://xml.apache.org/xindice/download.cgi

Unzip the archive to the desired folder. You have to set the XINDICE_HOME environment variable to the Xindice installation folder. You have to add $XINDICE_HOME\bin to your path so that you can use xindice and xindiceadmin commands from anywhere. Modify the environ- ment by using the following commands: export XINDICE_HOME=/usr/xindice export PATH=$PATH:$XINDICE_HOME/bin

You should have the JAVA_HOME variable set to the Java installation folder to run the Xindice server. The classpath has to be modified to include the xindice.jar file: export CLASSPATH=$CLASSPATH:/$XINDICE_HOME/java/lib/xindice.jar

You can run the Xindice server by using the following command: cd $XINDICE_HOME ./start 454 APPENDIX A ■ LINUX INSTALLATIONS

Chapter 10 Running applications from this chapter requires you to install project code on your machine.

Apache Forrest You can download Apache Forrest code from the following URL:

http://www.apache.org

Unzip the downloaded apache-forrest-0.7.tar.gz file to the desired folder. Create a new environment variable called FORREST_HOME and set its value to your installation folder of Forrest. Also add FORREST_HOME to your path. This can be done as follows:

export FORREST_HOME=/usr/forrest export PATH=$PATH:$FORREST_HOME/bin Index

■Symbols ■A != XPath operator, description of, 207 About menu, creating with Forrest, 432 “ (double quotes) ac command in Xindice, adding collection replacement for, 4 with, 379 using in Xindice, 383 actions element of sitemap document, & (ampersand), replacement for, 4 overview of, 294–295 ‘ (single quote), replacement for, 4 actor attribute of SOAP message, overview * (asterisk) of, 116 appearance next to Forrest commands, AddDocument.java application, running, 419 392, 395, 398 quantity specifier used with DTDs, 16 addFiles method, using with Xindice using with digital signatures, 333–334 collections, 395–396 wildcard used in XPath queries, 204 addmultiple command in Xindice, using, 380 XPath operator, 207 addNewCustomer method, calling in + (plus) XMLBeans, 101 quantity specifier used with DTDs, 15 Admin tool, deploying RPC-style web service XPath operator, 207 with, 159 - (dash) XPath operator, description of, 207 administrator utilities, running for Tomcat, . and .. expressions in XPath, descriptions of, 154 201 AES (Advanced Encryption Standard) ... (ellipsis), using in generate element, 294 algorithm, using with / expression EncryptPO.java application, 363 description of, 201 algorithms, examples of, 343 using with XSLT documents, 212 all tags, using in XML document, 30–31 // expression in XPath, description of, 201 ampersand (&), replacement for, 4 < (left angle bracket) ancestors of nodes, specifying with XPath as less than XPath operator, 207 axes, 205, 207 replacement for, 4 and XPath operator, description of, 207 using with markup, 5 annotation tag, using with XML schemas, 24 = XPath operator, description of, 207 anonymous types > (right angle bracket) creating, 35 as greater than XPath operator, 207 using with XML schemas, 27–28 replacement for, 4 Ant build file, running modified trade order using with markup, 5 application with, 93 ? quantity specifier, using with DTDs, 16 Ant tool @ expression in XPath, description of, 201 downloading for Linux installation, 450 @* wildcard, using in XPath queries, 204 running application for counting | (pipe character) customers with, 89 combining XPath paths with, 205 using with XMLBeans, 83–84 description of, 207 ANY keyword, using with DTD elements, 14 using with DTD elements and Apache Ant. See Ant tool subelements, 15 framework website, 322 . See Cocoon ■Number Apache FOP. See FOP (Formatting Objects 128-bit symmetric key, generating with AES, Processor) 363 Apache Forrest. See Forrest

455 456 ■INDEX

Apache SOAP. See SOAP (Simple Object block element Access Protocol) creating in XSL-FO document, 262 . See Tomcat creating in XSL-FO table cell, 257 Apache website, downloading Cocoon example of, 247 source from, 282 Body element in SOAP message Apache Xalan. See Xalan document fragment embedded in, 127 Apache Xerces explanation of, 114 downloading code for, 46 overview of, 120–121 downloading for Linux installation, 450 border, defining for table in XSL-FO, 256 obtaining ready-to-use-parser from, 41 boxes.svg code sample, 250 Apache Xindice. See Xindice Broker. document, 225 Apache XML-Security. See also security Brokerage collection, removing, 392 terminology brokerage site, creating with Forrest, 419, downloading Java libraries for, 339 423 downloading for Linux installation, 453 Brokerage.xslt document, 226 Apache XMLBeans. See XMLBeans BrokerAppEx application asterisk (*) deploying, 179 appearance next to Forrest commands, running, 179, 181 419 BrokerDatabase.java code sample, 387–91 quantity specifier used with DTDs, 16 BrokerFaultHandler class, implementing using with digital signatures, 333–334 fault method with, 177 wildcard used in XPath queries, 204 BSF script deployment descriptors, using, XPath operator, 207 192 asymmetric cryptography, overview of, 332 build file, compiling XSL-FO servlet code ATTLIST keyword, using with DTDs, 16 with, 272 attributes build script, using with Cocoon source, 282 defining in XML schema, 21 BuildTree method of Header element in SOAP message, building DOM in-memory tree structure 116 with, 71 selecting in XPath, 201 parsing documents with, 76 specifying minimum and maximum businessEntity structure in UDDI occurrences of, 23 description of, 142 using specifiers with, 21, 23 example of, 143 writing for DTDs, 16–17 businessService structure in UDDI authentication, overview of, 328 description of, 142 authorization, overview of, 328 example of, 144 Avalon framework website, 322 axes, overview of, 205–206 ■C CachedXPathAPI, instantiating for partial ■B processing of XML document, 221 background color, setting in XSL-FO, 257 canonical XML backing up data with xindiceadmin utility, transforming input document to, 343 412 using for signature processing, 338 binding element of WSDL document, canonicalization, performing in example of, 135–136 CertifiedPO.java application, 356 bindingTemplate data structure in UDDI, CAs (certificate authorities) example of, 142, 144 requesting digital certificates from, 352 birds. file, examining XSL commands in, sending key pairs to, 351 198 sending public keys to, 335 block catalog elements, specifying for i18n declaring in region body, 256 transformation, 304 setting properties for, 248 CCITT X.509, relationship to digital block area of XSL-FO documents, overview certificates, 336 of, 245 CDATA element enclosing data with, 7 using with DTDs, 17 ■INDEX 457 certificates. See digital certificates downloading for Linux installation, 452 CertifiedPO.java application, running, 353, history of, 281 355–358 mapping roles to classes in, 322 character data, including in slide element, 15 overview of, 279 character restrictions, examples of, 4 relationship to Forrest, 416–417 Characters event, generating relative to SAX serializers in, 308 parser, 48 UML sequence diagram for HttpRequest characters event handler, calling for SAX handling, 323 document, 62 Cocoon application characters method creating input source document for, 287 overriding, 61–62 creating sitemap for, 289–290 using with DefaultHandler class in SAX defining serializer for, 289 API, 65 defining transformation for, 287–288 charts.xml code sample, 430 defining transformer for, 290 checkSignatureValue method, verifying deploying and running, 290 documents with, 359 Cocoon configuration parameters checksum for data sources, 324 using in cryptography, 329 for mail servers, 324

using with digital signatures, 333 for parsers and processors, 323 at faster it Find child collections for performance, 323 listing for RemoveAllDocuments.java Cocoon Hello World example, converting application, 403 input source documents with, 301 listing in ListDocs.java application, 401 Cocoon installation, testing, 283 child elements, using with DTDs, 13 Cocoon library, text serializer in, 296–297 child nodes, selecting in XPath, 201 Cocoon architecture http://superindex.apress.com/ children, obtaining in document-style web generator in, 285 service, 171 matchers in, 286 choice attribute types, using with DTDs, 17 overview of, 284–285 choice tags, using in XML documents, 31 serializer in, 286 cipher transformer in, 285 adding keyInfo object to, 365 Cocoon software, building and installing, initializing for decrypt mode, 371 282–283 initializing for wrapping KEK, 364 Cocoon source, downloading, 282 ciphertext Cocoon start-up, UML sequence diagram for, definition of, 329 322 using in EncryptPO.java application, 364 Cocoon transformer classes. See also class libraries, importing for JSP server-side transformers transformations, 218 examples of, 302 classes, mapping roles to in Cocoon, 322 i18n transformer, 303 client code Cocoon XML Server Pages. See XSP (XML writing for document-style web services, Server Pages) 173, 175 Cocoon XSP processing model versus JSP, writing for RPC-style web services, 161, 317 163 cocoon.jar file, generating, 282 Client faultcode element in SOAP message, cocoon.war file overview of, 122 creating, 282 clients URL used with, 284 developing for RPC-style web services, 161 cocoon.xconf configuration file, loading, 322 running for document-style web service, collections 176 adding documents to in XML:DB API, 392, running for RPC-style web services, 164 398 writing for StockInfoService, 184, 188 creating for XML databases, 379 Cocoon creating subcollections for XML creating Tomcat installation of, 282 databases, 379 deployment of, 321 creating with XML:DB API, 387, 391 development of, 280–281 deleting in Xindice to avoid exception, 391 458 ■INDEX

colors, setting in Forrest, 437 custom exception handlers. See also column width, setting in XSL-FO, 257 exception handling columnar text, creating in XSL-FO registering, 178–179 documents, 258, 264 writing, 177 command interface, deploying RPC-style custom exception, throwing, 177–178 web service with, 160–161 customer array, obtaining in XMLBeans, 92 command line, deploying server for Customer elements document-style web service from, counting for order document, 55 173 including in Orders element, 85 command prompt, creating translets at, 232 customer ID parameter, changing in command-line transformation tool, using XMLBeans, 93 with Xalan, 214 Customer inner interface, creating, 86 comments, including user-written CustomerID class variable, creating for comments in XML documents, 6 Orders.xml application, 75 company logo, setting in Forrest, 437 CustomerOrders.xml file complex types. See also elements-only applying XSLT template to, 214 complex types applying transformations to, 224, 232 creating anonymous complex types, 35 transforming with translet, 233 creating named complex types, 34–35 accessing complete code for, 208 defining with mixed attribute, 33 customers empty complex types, 28 counting in Orders.xml document, 69–70 nonempty complex types, 28 counting in purchase orders, 87, 90 components customers template, defining in XSLT declaring in Cocoon, 309 document, 213 defining for i18n transformer, 304 overview of, 291 ■ subelements of, 309 DailyOrders collection console application, creating to count adding orders to, 380 customers in purchase orders, 87, 90 listing indexes in, 412 content handlers, setting in push filtering data model, 231 backing up with xindiceadmin utility, 412 ContentHandler interface, using with exporting with xindiceadmin utility, 412 DefaultHandler class in SAX API, 65 extracting with parsers, 40–41 copyright information, setting in Forrest, 438 importing with xindiceadmin utility, 413 count value, printing on user console, 56 data sources, setting up in Cocoon, 324 countCustomers method, calling, 89 data type mappings, using in Apache SOAP, countQuantity Boolean variable, setting to 181, 189 true, 61 data types Cover.fo cover page, creating, 239 mapping, 186 Cover.fo file sample, 273 using derived types with XML schemas, 25 Cover. file, creating, 242, 273 using simple data types in XML schemas, coverpage.pdf match pattern, defining, 298 24, 28 coverpage.xml document, using as source database driver document for pipelines element, loading for AddDocuments.java 287, 296 application, 395–396 createDocument method, using with loading for BrokerDatabase.java SignedPO.java application, 343 application, 389 createOrderDocument method, calling in loading for DeleteNode.java application, XMLBeans, 100 406 cryptography loading for ListDocs.java application, 400 asymmetric cryptography, 332–334 loading for Xindice database, 389 digital certificates, 335–336 dc (delete_collection) command in xindice digital signatures, 333, 335 utility, using, 391 overview of, 329, 331 decryption, definition of, 329. See also XML symmetric cryptography, 331–334 decryption CSS (Cascading Style Sheets) versus XSL, 198 ■INDEX 459

DecryptPO.java application, running, 368, directory generator in Cocoon, description 370–371 of, 308 default namespaces, using, 10–11 disable-pdf-link element, using with Forest default specifier, using with attributes in content, 444 XML schema, 22–23 disable-xml-link element, setting in Forrest, DefaultHandler class 445 description of, 55 discard_authToken security message, using with SAX API, 65 description of, 148 definitions element of WSDL document div XPath operator, description of, 207 example of, 132 DOCTYPE keyword, specifying root element nested elements in, 132 of XML document with, 14 delete messages in publishing API, document data, processing in SAX, 56 descriptions of, 147–148 document generator, specifying source DeleteNode.java application, running, document to, 289 405–409 document instance, saving with XMLBeans, deployment descriptors 98 BSF script deployment descriptor, 192 Document interface in DOM API, description for custom exception handler, 178–179 of, 80

EJB deployment descriptor, 191 Document object, returning with parse at faster it Find modifying to map Java objects, 183 method, 69 standard Java class deployment document processing descriptors, 190–191 performing with DOM, 68–69 structure of, 190, 192 performing with SAX, 51, 63 using with Apache SOAP, 189, 193 document signing, using digital certificates

writing for QuoteService, 160 for, 357 http://superindex.apress.com/ derived types, using with XML schemas, 25 Document-style messages, defining, 134 DES key specs, constructing for document-style web services. See also web DecryptPO.java application, 370 services descendants of nodes, specifying with XPath deploying, 172–173 axes, 205, 207 overview of, 167 detached XML signature, description of, 338 running clients for, 176 detail element of SOAP message, example of, writing client code for, 173, 175 125 writing server code for, 168, 172 Diffie-Hellman algorithm website, 342 Document/Literal SOAP messaging mode, digest algorithm, specifying for overview of, 127 SignedPO.java application, 343 documentation tag, using with XML digital certificates schemas, 24 creating key pairs for, 350–351 DocumentBuilder class exporting, 351–352 instance of, 68 importing, 352–353 methods of, 80 listing keys in keystores, 351 DocumentBuilderFactory class obtaining test certificates, 352 instance of, 68 overview of, 333–336 methods of, 79 requesting from CAs (certificate documents. See also XML documents authorities), 352 adding multiple documents to XML retrieving in CertifiedPO.java application, databases, 380–381 356 adding to collections in XML:DB API, 392, running CertifiedPO.java application, 398 357–358 adding to XML databases, 380 running VerifyCertifiedPO.java deleting in XML:DB API, 402, 404 application, 360 with digital certificates, 359 using for document signing, 353, 357 inserting records in with XUpdate verifying documents containing digital language, 409 certificates, 359 listing in XML databases, 381 versus XML signatures, 336–337 parsing, 56 parsing with BuildTree method, 76 460 ■INDEX

parsing with DOM, 69 Element interface in DOM API, description processing with XMLBeans, 83 of, 80 retrieving in XML databases, 382 elements updating with DOM, 73, 78 defining in XML schema, 21 DOM () including more than one child element in, building in memory, 71 13 description of, 41 naming in XML documents, 7 pros and cons of, 66–67 nesting in XML documents, 6 versus SAX and XMLBeans, 102 specifying empty elements, 6 DOM API using start and end tags with, 5 DocumentBuilder class in, 79–80 elements-only complex types. See also DocumentBuilderFactory class in, 79 complex types interfaces in, 80 sequence tags used with, 29–30 DOM parsing technique, example of, 69–70 xsd:all tags used with, 30–31 DOM processing xsd:choice tags used with, 31 classes required for, 70 xsd:group tags used with, 32–33 overview of, 66 ellipsis (...), using in generate element, 294 DOM tree, building for partial processing of EmbeddingSVG.fo example, 252 XML document, 221 empty complex types, using in XML DOMExample2, application class file in, 75 schemas, 28 double quotes (“) empty elements, specifying, 6 replacement for, 4 EMPTY keyword, using with DTDs, 13 using in Xindice, 383 encodingStyle attribute downloads. See websites overview of, 117 Driver class, performing FO to PDF using with Envelope element of SOAP transformation with, 265 message, 116 driver object, calling render method on, 275 encryptedPO.xml file, examining, 366–367 driver. See database driver encryption. See also XML encryption DSA (Digital Signature Algorithm), using with definition of, 329 CertifiedPO.java application, 356 process of, 331 DTD elements encryptKey method, using on cipher for including choice-list subelements in, 15 EncryptPO.java application, 365 including subelements in, 14 EncryptPO.java application, running, 361, restricting subelements in, 15 363, 366 single child elements in, 13 end tags, using with elements, 5 writing, 12 endDocument method, overriding, 55 DTDHandler interface, using with endElement method, overriding for SAX DefaultHandler class in SAX API, 65 document, 62 DTDs (Document Type Definitions) entities, writing for DTDs, 17 drawbacks of, 20 EntityResolver interface, using with including in XML documents, 18–19 DefaultHandler class in SAX API, 65 overview of, 12 Envelope element of SOAP message referencing local and remote DTDs, 19 adding in document-style web service, specifying instance quantities for, 15 172 writing, 12, 18 explanation of, 114 writing attributes for, 16 overview of, 116 writing entities for, 17 enveloped XML signature, description of, 338 enveloping XML signature, description of, ■E 338 EBNF (Extended Backus-Naur Form) error handling notation, using with DTDs, 20 providing in Orders.xml document, 72 ECDH (Elliptic Curve Diffie-Hellman) providing in SAX, 57 algorithm website, 342 ErrorHandler interface, using with EJB (Enterprise JavaBeans) container, DefaultHandler class in SAX API, 65 configuration information for, 44 errors array list, setting error listener to, 89 EJB deployment descriptors, using, 191–192 ■INDEX 461 event handler, extending in SAX processing decryption based on symmetric and model, 55–56 asymmetric cryptography, 368 events, generating for document processed decryption transforms ciphertext to by SAX parser, 47 plaintext, 330 exception handling. See also custom Deployment wizard for RPC-style web exception handlers service, 159 in Apache SOAP, 176, 180 digital certificate, 335 modifying StockOrderProcessor class for, digital signature, 334 177–178 DOM representation in memory, 66 exceptions embedded SVG image, 252 catching in SOAPException catch block, encryption algorithm using key, 331 187 encryption transforms plaintext to describing in Body element of SOAP ciphertext, 329 messages, 121 encryption with symmetric and Expat XML parser, obtaining, 41 asymmetric cryptography, 361 ExtensionFilter class, using with Fop2PDFServlet response output, 273 AddDocuments.java application, 397 formatted block, 248 external DTD, including in XML documents, Forrest project home page, 422

19 home page modified for StockBrokerage at faster it Find external-graphic element, specifying image site, 425 files with, 249 i18n page output, 307 images incorporated into Forrest ■F document, 431 Factory class, defining in StockSymbol market survey system architecture, 44

interface, 86 matchers in Cocoon pipeline architecture, http://superindex.apress.com/ factory instance 286 creating for Java XSLT-filtering message digest, 330 application, 227 message verification with public key, 334 creating for transformation program, 215 MultiColumn.pdf, 263 Fault element in SOAP message, overview of, network traffic sniffer for RPC 121 implementation, 164 fault listeners, specifying in Apache SOAP, note element used on Forrest page, 443 193 one-way messaging model, 107 fault method, implementing with order processing by intermediaries, 118 BrokerFaultHandler class, 177 PDF document opened in Forrest site, 442 faultcode element in SOAP message, PDF output of index page, 444 overview of, 121 PDF transformation output, 301 faultstring element of SOAP message, request/response messaging model, 107 example of, 124–125 RSS content integrated in Forrest, 447 Figures SAX processing model architecture, 50 Apache Hello World sample application, schema compilation for XMLBeans 302 processing model, 81 Apache SOAP server implementation, 156 service invocation, 113 Apache SOAP welcome screen, 155 skin changed in StockBrokerage site, 435 asymmetric cryptography, 333 SOAP message path, 118 block areas in XSL-FO, 247 SOAP message structure, 114 charting for Infosys in Forrest, 431 SOAP riding on TCP/IP,SMTP, and HTTP, Cocoon application, 290 114 Cocoon pipeline architecture, 284 stock brokerage order application Cocoon welcome screen, 283 architecture, 42 company logo set in Forrest, 437 SVG image output, 251 Cover.pdf file in Adobe Reader, 242 symmetric cryptography, 332 CoverImage.pdf in XSL-FO document, 249 tabs set for StorkBrokerage site, 427 CustomerOrders.xml, 211 tabular output of today’s trade orders in customized menus added to Forrest Forrest, 429 brokerage site, 433 tabular report in XSL-FO, 258 462 ■INDEX

testskin applied to Forrest brokerage site, running, 241 436 testing installation of, 238 text document in Forrest sites, 441 FOP API, generating PDF files with, 264, 269 text output generated by pipeline, 297 FOP command-line utility, running, 238 Tomcat server welcome screen, 153 FOP engine transformation of SortedOrders., 216 creating PDF document with, 241 UDDI data structures, 142 invoking, 264 web page development and management, FOP schema, properties defined in, 247 280 FOP utility, viewing output in, 242 web services architecture, 109 Fop2PDFServlet response output, 273 Xindice database structure, 376 Fop2PDFServlet.java code sample, 270–271 Xindice server home page, 378 Forrest. See also StockBrokerage site XML processing system architecture, 46 adding external RSS content, 446, 448 XML2PDF servlet output, 276 adding menus in, 431 XPath axes, 206 benefits of, 416 XSL transformation with JSP, 219 creating brokerage site with, 419, 423 XSL-FO document page structure, 244 creating short names for URIs in, 447 XSLT filtering, 224 creating tabs in, 426, 430 XSLT processing model, 208 data type mappings in, 181, 189 XSP processing model, 318 downloading, 417 file generator in Cocoon, description of, 308 downloading for Linux installation, 454 file separator, using with JSP server-side exception handling in, 176, 181 transformations, 218 history of, 415–416 FileGenerator, role in Cocoon pipeline incorporating images in, 430 architecture, 285 modifying home page content in, 424, 426 FileInputStream object, constructing in relationship to Cocoon, 416–417 XSL-FO, 271 specifying fault listeners in, 193 FilenameFilter interface, implementing in specifying type mappings in, 193 AddDocuments.java application, testing installation of, 418 397 using deployment descriptors with, 189, FileSVG.fo output, 251 193 filtering application. See Java XSLT-filtering Forrest commands application forrest run, 421–422 filters forrest seed, 419 creating for Java XSLT-filtering Forrest content application, 228 adding support for other output formats, using with Xalan, 224, 232 444, 446 find messages in inquiry API, descriptions of, rendering to PDF, 444 148 Forrest files, organization in tree structure, fixed specifier, using with attributes in XML 423 schema, 23 forrest installation flow, defining for region-body area, 262 folder>\main\webapp\skins folder, flow element, closing in XSL-FO, 257 contents of, 433, 435 flow-name attribute, values for, 246 Forrest pages, enhancing appearance of, FO, transforming XML to, 298, 300. See also 442–443 XSL-FO (XSL-Formatting Objects) Forrest properties FO document, writing, 239, 241 changing folder hierarchy, 439–440 FO to PDF transformation, implementing, configuring proxy settings, 440 270, 273 Forrest sites fo table-cell element, defining table cells deploying on other web servers, 448 with, 257 including PDF documents in, 441 folder hierarchy, changing in Forrest, including text documents in, 440 439–440 FOTransformation.java code sample, FOP (Formatting Objects Processor) 264–265 downloading and installing, 238 downloading for Linux installation, 452 ■INDEX 463

■G group tags, using with XML documents, generate component, using with resource 32–33 element, 294 GUI tool, deploying RPC-style web service generate element, using with pipelines with, 159–160 element, 295 ■ generatedFault method, calling, 187 H generator element, using with i18n header blocks, applying in SOAP messages, transformer, 304 117, 120 generators Header element of SOAP message declaring in sitemaps, 308 explanation of, 114 document generator for Cocoon overview of, 116 application, 289 home page content, modifying in Forrest, examples of, 308 424, 426 role in Cocoon pipeline architecture, 285 HTML (HyperText Markup Language), in sitemap component, 310 relationship to XML, 1 get messages in inquiry API, descriptions of, HTML serializer in Cocoon, description of, 149 308 get/setProperty method, using with HTTP (Hypertext Transfer Protocol) SAXParser class, 64 SOAP reply over, 130 at faster it Find getBodyEntries method, calling in SOAP request over, 129–130 document-style web service, 171 HTTP header, using in SOAP requests, 166 getCertificate method, calling for HTTP tunneling, relationship to web CertifiedPO.java application, 356 services, 109 getChildNodes method, calling in HttpRequest, handling in Cocoon, 322 document-style web service, 171 ■ http://superindex.apress.com/ getCollection method, calling in Xindice I database, 400 i18n Cocoon transformer, sitemap for, 303, getDatabaseRoot method, implementing for 305 Xindice database collection, 395–396 i18n page, output of, 307 getElement method, using with Orders.xml i18n transformer, test document for, 305, 307 application, 71–72 i18ntest.xml code sample, 305–306 getNodeName method, calling in Orders.xml icon element, using on Forrest pages, 443 application, 72 ID attribute type, using with DTDs, 17 getOrders method, calling, 89 IDREFID attribute type, using with DTDs, 17 getResource method, using with images RemoveAllDocuments. java adding to XSL-FO documents, 249 application, 403 incorporating in Forrest, 430 getService method, using with img element, using on Forrest pages, 443 DeleteNode.java application, 407 import element of WSDL document, getStockInfo method, embedding in SOAP example of, 133 body, 189 index.xml page for StockBrokerage site, 424 getStockQuote method, using with RPC-style indexes web service, 158 creating and managing with xindiceadmin getTradeType method, calling in XMLBeans, utility, 411 93 deleting with xindiceadmin utility, 412 getXMLReader method, using with listing with indiceadmin utility, 412 SAXParser class, 64 indiceadmin utility, creating and managing get_authToken security message, description indexes with, 411 of, 148 inline area of XSL-FO documents, overview gibberish of, 245 definition of, 329 inline element using in EncryptPO.java application, 364 nesting in XSL-FO documents, 262 Google’s website for web services, 105 using in XSL-FO, 248 greater than (>) XPath operator, description input source document, creating for Cocoon of, 207 application, 287 464 ■INDEX

input stream, constructing in XSL-FO, 271 description of, 224 inquiry API in UDDI manager XSLT document for, 225 find messages in, 148 running, 228–229 get messages in, 149 source of, 226, 228 overview of, 147 javabook namespace, creating, 9 InsertNode.java code sample, 409 javac compiler installing using in FO to PDF transformation, 266 Apache SOAP, 154, 156 using with document-style web service, Apache Tomcat, 152, 154 172 Cocoon software, 282–283 using with PathSelector.java application, FOP (Formatting Objects Processor), 238 222 JRE 1.5, 152 using with transformation program, Xalan, 197 216 instance quantities, specifying for DTDs, 15 using with XSL-FO servlet code, 272 instream-foreign-object, using in SVG JAVA_HOME environment variable, setting images, 252 for JDK 1.5.0, 449 internal DTD, including in XML documents, JAXB (Java Architecture for XML Binding) 18 API, resource for, 102 internationalization features, testing, 305, JCE (Java Cryptography Extension) reference 307 guide, consulting, 363 invoke method of call object, calling, 187 JDK 1.5.0, downloading for Linux invoke method, using with RPC-style web installation, 449 services, 163 Jetty server IRI (Internationalized Resource Identifier), availability of, 282 identifying XML namespaces by, 8 installing with Forrest, 419 ISO (International Organization for starting for Forrest, 420 Standardization) website, 20 stopping in Forrest, 422 ISO/IEC/ITU 9594-8, relationship to digital testing Cocoon installation with, 283 certificates, 336 JRE 1.5, installing, 152 ITU-T X.509, relationship to digital JSP (Java Server Pages) certificates, 336 versus Cocoon XSP processing model, 317 ■J invoking for server-side transformations, J2EE, storage of application configuration 218 information for, 44 performing transformations in, 217–218 j2world—Smart Solutions for a Mobile World versus XSP,318 website, 416 jsp generator in Cocoon, description of, 308 Java applications, performing JSP page, creating for Sorted Orders example, transformations through, 214 217–218 Java class custom exception handler as, 177 ■K deployment descriptors for, 190–191 KEK (key encrypting key) java command, using with RPC-style web generating in EncryptPO.java application, services, 164 364 Java interfaces, using with XMLBeans, 85, 87 obtaining for DecryptPO.java application, Java libraries for XML-Security, downloading, 370 339 key information, retrieving in VerifyPO.java Java objects, mapping, 183–184 application, 348 Java package key pairs using with XMLBeans, 85 creating for digital certificates, 350–351 using with XSP web page, 316 exporting to CAs (certificate authorities), Java web, storage of application 351 configuration information for, 44 validity of, 349 Java XSLT-filtering application KeyInfo object, constructing for broker XSLT document, 225 EncryptPO.java application, 365 brokerage house XSLT document, 226 ■INDEX 465 keys businessEntity structure schema generating message digest with, 331 definition, 143 generating with RSA algorithms, 342 businessService structure schema generating for symmetric key, 364 definition, 144 public and private keys in asymmetric CDATA element in XML document, 7 cryptography, 332 client application using StockInfo service, using in encryption and decryption, 331 185–186 keystore file, opening in CertifiedPO.java Client faultcode element in SOAP application, 355 message, 122 keystore flat file, using with digital client program for stock quote service, certificates, 350 161–162 keystores, listing keys in, 351 collections and subcollections added to Keytool utility Xindice database, 387, 389 creating key pairs with, 350–351 console-based Java application for XSL using -export option with, 351 transformations, 215 using -import option in, 352 coverpage.xml for Cocoon application, Krysalis Community Project website, 416 287 custom exception handler, 177

■L decrypting encrypted purchase order at faster it Find lastTradePrice message, creating, 137 document, 368, 370 left angle bracket (<) default namespace, 10–11 replacement for, 4 deployment descriptor for exception using with markup, 5 handling, 179 less than (<) XPath operator, description of, deployment descriptor for mapping Java

207 objects, 183–184 http://superindex.apress.com/ line area of XSL-FO documents, overview of, deployment descriptor for POJO, 190 245 deployment descriptor for QuoteService, line element, using in XSL-FO, 248 160 Linux installations deployment descriptor for Ant, 450 StockOrderProcessor application, Cocoon, 452 173 FOP,452 deployment descriptor for exception Forrest, 454 handling, 179 JDK 1.5.0, 449 detail element of detail element in SOAP SOAP toolkit, 451 message, 125 Tomcat, 451 document-style web service, 168, 170 Xalan, 452 Document/Literal SOAP message, 127 Xerces, 450 documents added to AddDocument.java Xindice, 453 application, 395 XMLBeans, 450 documents added to Xindice database XML-Security, 453 collection, 392 ListAllDocuments method documents listed in specified XPath, calling in ListDocs.java application, 400 399–400 passing Collection reference to, 401 DOM parsing technique, 69 ListDocs.java code sample, 399–401 EJB deployment configuration file, 44–45 Listings EJB deployment descriptor, 191 ANY keyword, 14 encrypting PO (purchase order), 361, 363 application counting trades and trade Fault entry in Body element of SOAP quantity, 58, 61 message, 121 binding element in WSDL document, 135 faultstring element of SOAP message, bindingTemplate structure schema 124–125 definition, 144 Fop2PDFServlet, 270–271 Broker.xslt document, 225 formatting document for FO cover page, Brokerage.xslt document, 226 239 BSF script deployment descriptor, 192 generators entry, 310 group tag, 32–33 466 ■INDEX

i18n test document, 305–306 sitemap for i1in application, 303 index.xml page for StockBrokerage site, sitemap for processing XSP, 314 424 sitemap.xmap for Cocoon application, 289 Java application for processing purchase SOAP Body element, 120 order, 53–54 SOAP header blocks, 119–120 Java client application consuming SOAP message, 115 document-style web service, 174–175 SOAP request over HTTP, 129–130 Manager.xslt document, 225 SOAP request with HTTP header, 165 match entry in sitemap for PDF SOAP response with HTTP header, conversion, 298 166–167 matchers entry, 312 stock info server using StockInfo class, 183 menus defined for StockBrokerage site in stock quote service server class, 158 Forrest, 432 StockInfo class, 181–182 MustUnderstand faultcode element of SVG definition, 250 SOAP message, 123 SVG embedded in block, 251 nonstandard faultcode in SOAP message, tabs defined for Forrest home page, 426 124 throwing custom exception, 178 Orders.xml stock purchase order, 51 tModel structure schema definition, 145 Orders.xsd schema definition, 84 tomcat-users.xml configuration file, 154 page2html.xsl transformation document trade order modification, 90, 92 for Cocoon application, 288 transformers entry, 310 partial processing of XML documents, Translets.java, 233 220–221 verifying signed document, 346, 348 PDF creation console application, 264–265 VersionMismatch faultcode element of pipelines element structure, 296 SOAP message, 123 pipelines for converting FO document to WSDL document, 111, 139–140 PDF, 300 WSDL document structure, 132 po.xml document, 168 XML document, 3 poEx.xml causes exception, 180 XML document displaying today’s trades, properties defining site directory structure 428–429 in Forrest, 439–440 XML document for SAX processing, 47 publisherAssertion structure schema XML document for XSL transformation, definition, 146 209, 211 PullFilter.java, 226–227 XML document illustrating XPath syntax, purchase order, 40 200–201, 203 purchase order updated with DOM API, XML document incorporating images 73, 75 inForrest, 430 PushFilter.java, 230–231 XML document referencing remote DTD, removing all documents from collection, 19 402–403 XML document using all tag, 30–31 removing nodes with XUpdate language, XML document using internal DTD, 18 405–406 XML file using quantity specifier +, 16 resource with generate component, XML schema format, 20 293–294 XML schema referenced from local file resources in sitemap, 292–293 system, 36 RPC-style request message, 128 XML signature, 336–337 RPC-style SOAP response message, 129 XML signature structure, 338 selectors entry, 311 XML transformations in JSP, 217 sequence of subelements, 29–30 XML-to-FO transformation, 298 serializers entry, 311 XML2PDF servlet, 273–274 Server faultcode element of SOAP XML2PDF transformation stand-alone message, 122–123 application, 267–268 signing and attaching digital certificate, XMLBeans-based application for counting 353, 355 customers, 87–88 signing dynamically generated XML XMLBeans-based application for creating document, 340, 342 XML-based order document, 99–101 ■INDEX 467

XMLBeans-based application for deleting message digests customer order, 94, 97 definition of, 329 XSL-FO document created by transformer, generating with key, 331 299 using with digital signatures, 333 XSL-FO document generating tabular message element of WSDL document, report, 252, 256 example of, 134 XSL-FO document top-level, 243 messaging exchange patterns in web services XSL-FO generating columnar report, 258, notification messaging, 138–139 261 one-way messaging, 137 XSLT document for transformation, 209, request/response messaging, 137–138 211 solicit/response messaging, 138 XSP document structure, 313 messaging models for web services, XSP predefined Logicsheet, 320 examples of, 107 XSP requesting live quote, 315–316 messsagerouter servlet, role in SOAP listResources method implementation, 156 calling for RemoveAllDocuments.java Microsoft XML parser, obtaining, 41 application, 403 minOccurs specifier, using with attributes in calling in ListDocs.java application, 401 XML schema, 23 lists, specifying in XML schemas, 27 mixed attribute, defining complex types at faster it Find local DTDs, referencing, 19 with, 33 local file systems, referencing XML schemas mod XPath operator, description of, 207 on, 36 modifications element, defining XUPdate LocateAndUpdateTrade method in queries with, 404 Orders.xml, using, 77–78 MultiColumn.fo code sample, 258, 261

Logicsheets. See XSP Logicsheets MultiColumn.pdf, displaying, 263 http://superindex.apress.com/ logo, setting in Forrest, 437 mustUnderstand attribute of SOAP message, overview of, 117 ■M MustUnderstand faultcode element of SOAP mail servers, setting up in Cocoon, 324 message, example of, 123–124 mail.jar file, contents of, 154 mailtest.xsp code sample, 320 ■N main method in Orders.xml, contents of, 76 name attribute Manager.xslt document, 225 using with components element of mappings element, adding to deployment sitemap, 291 descriptor, 184 using with element tag for XML schema, mapTypes method of SOAPMappingRegistry 21 class, calling, 186 named types market survey XML parsing application, creating, 34–35 description of, 43 using with XML schemas, 27–28 match attribute, using with template namespaces. See XML namespaces element, 212 nesSAXparser method, using with match elements, using with pipelines SAXParserFactory class, 63 element, 295 nesting elements in XML documents, 6 match patterns, defining coveragepage.pdf netbook namespace, creating, 9 as, 298 network traffic interceptor matchers using with RPC implementation, 164–165 overview of, 312 using with TCP Tunnel/Monitor program, role in Cocoon pipeline architecture, 286 165 maxOccurs specifier, using with attributes in newDocument method of DocumentBuilder XML schema, 23 class in DOM API, description of, 80 Mazzocchi, Stefano and history of Cocoon newInstance method project, 281 calling for SAXParserFactory class, 54 memory, building DOM in, 71 description of, 79 menus, adding in Forrest, 431 using with SAXParserFactory class, 63 message confidentiality, overview of, 329 NewOrder.xml file, creating on disk, 102 newSAXParser method, calling, 55 468 ■INDEX

newXMLFilter method, calling on factory retrieving for specific stocks in XML object, 228 databases, 384 NMTOKEN attribute type, using with DTDs, XMLBeans application for deletion of, 17 94 Node interface in DOM API, description of, orders collection, updating nodes in, 410 80 orders document, applying transformations node name, retrieving in Orders.xml to, 224, 232 application, 72 Orders element, Customer elements in, 85 node() wildcard, using in XPath queries, 204 Orders.xml application node-set, locating relative to current node, application class in, 75 205–206 LocateAndUpdateTrade method in, NodeList object, returning with 77–78 getChildNodes method, 171 main method in, 76 nodes processing data in, 71–72 inserting in orders collection with searchCustomer method in, 76 XUpdate language, 409–410 UpdateOrder method in, 76 locating in XML documents, 201, 203 Orders.xml document removing with XUpate language, 405, 409 counting customers in, 69 selecting based in input XPath expression, providing error handling in, 72 221 Orders.xml stock purchase order code, 51 selecting in XPath, 201 OrdersDocument class variable, creating, selecting with XPath expressions, 223 88 updating in orders collection, 410 OrdersDocument interface, description of, nonempty complex types, using in XML 85 schemas, 28 org.apache.xalan.xslt.Process utility, nonrepudiation, overview of, 328 command-line switches defined in, note element, using on Forrest pages, 442 214 notification messaging in web services, org.xml.sax package, including for DOM, 70 example of, 139 org.xml.sax.driver property, description of, numbers, restricting in XML schemas, 26–27 55 Organization for the Advancement of ■O Structured Information Standards one-way messaging in web services, example website, 113 of, 137 operations element of WSDL document, ■P example of, 135 page area of XSL-FO documents, overview of, operators, XPath operators, 207 244 optional specifier, using with attributes in page element of Cocoon application, XML schema, 21–22 subelements of, 287 or XPath operator, description of, 207 page numbers, generating automatically in order document, counting occurrences of XSL-FO documents, 262 Customer element in, 55 page template, definition of, 245 order document application, creating in page-sequence element XMLBeans, 99, 102 closing in XSL-FO, 257 OrderProcessing.xslt code sample, 209 using with XSL-FO documents, 246 OrderReport.fo code sample, 252, 256 page2fo.xsl code sample, 298–299 OrderReport.pdf sample, 258 page2html.xsl transformation document orders creating, 288 application for deletion of, 99 using with pipelines element, 296 determining for specified stock at PAN (Permanent Account Number), specified price in XML databases, significance of, 33 386 parse method placing with stock brokerage, 52 calling on parser, 56 removing with XUpdate language, 405, 409 calling, 69 retrieving for specific customers in XML description of, 80 databases, 383–384 ■INDEX 469

using with document-style web service, pipeline resource 175 calling, 294 using with SAXParser class, 64 defining, 294 using with XMLReader interface of SAX naming, 292 API, 64 pipelines parser properties, setting with changing output format for, 301 DocumentBuilderFactory class creating with resources element, 293 instance, 68 defining for i18n transformer, 305 parsers generating PDF output with, 297, 300 configuring in Cocoon, 323 generating text output with, 296–297 extracting data with, 40–41 overview of, 295–296 preventing from interpreting data, 7 plaintext, definition of, 329 parsing. See XML parsing playerdetails element, subelements in, 31 passwords, randomizing with salt, 360 plus (+) paths, combining in XPath, 205 quantity specifier used with DTDs, 15 PathSelector utility XPath operator, 207 downloading and compiling, 202 PO (purchase order) testing Xpath expressions with, 203 decrypting, 367, 371

PathSelector.java code sample, 220–224 encrypting, 360, 365 at faster it Find patterns, using with XML schemas, 25–26 poEx.xml, causing exception with, 180 PDF (Portable Document Format), POJO transformations to, 300 deployment descriptor for, 190 PDF documents developing RPC-style web service server creating with FOP engine, 241 code with, 158

including in Forrest sites, 441 implementing document-style server in, http://superindex.apress.com/ PDF files 168 creating from XSL-FO documents, POJO class, defining for RPC-style web 264–265 service, 160 generating with FOP API, 264, 269 portType element of WSDL document, transforming XML documents into, 268 example of, 135 PDF format, rendering Forrest content to, predicates, locating specific nodes in XML 444 documents with, 203 PDF output, generating with pipeline, 297, prefixed namespaces, using, 11 300 printer support, adding in Forrest, 446 PDF serializer in Cocoon, description of, private key 309 obtaining in CertifiedPO.java application, PDF transformation 355 from FO, 264, 266, 270, 273 using in asymmetric cryptography, 332 from XML, 266, 269, 273, 276 private registries, relationship to UDDI, 141 personinfo element, subelements used with, processed-by header block 30 applying in SOAP messages, 117 pipe character (|) node subelement in, 120 combining XPath paths with, 205 processingInstruction method, using with description of, 207 DefaultHandler class in SAX API, 65 using with DTD elements and processors, configuring in Cocoon, 323 subelements, 15 proxy settings, configuring in Forrest, 440 pipeline public and private key pair, generating for creating in Cocoon application, 289 SignedPO.java application, 342 document generator in, 289 public keys invoking for default and custom retrieving in VerifyPO.java application, 349 processing, 294 sending to CAs (certification authorities), pipeline architecture. See Cocoon pipeline 335 architecture public registries pipeline processing, defining exit point for, publishing services with, 110 291 relationship to UDDI, 141 470 ■INDEX

publisherAssertion structure in UDDI regions, defining in XSL-FO pages, 246 description of, 142 registries related to UDDI, types of, 141 example of, 145 relative paths, XPath used to define syntax publishing API in UDDI for, 199 delete messages in, 147–148 RemoveDocs.java code sample, 402–403 overview of, 146 render method, calling on driver object, 275 save messages in, 147 renderer, setting to PDF, 265 security messages in, 148 request generator in Cocoon, description of, pull model, using in Java XSLT-filtering 308 application, 229 request/response messaging in web services, PullFiler.java code sample, 226–227 example of, 137–138 purchase order code sample, 40 required specifier, using with attributes in purchase order document XML schema, 22 creating, 343 resource resolver, using with VerifyPO.java structure of, 51–52 application, 348 purchase orders resources element counting customers in, 86, 90 creating pipelines with, 293 processing, 52, 54 overview of, 292, 294 verifying, 346, 349 REST (Representational State Transfer) purchaseOrderResponse element creating in model for web services, resource for, document-style web service, 172 107 push filtering model, using, 229, 232 right angle bracket (>) push model, using in Java XSLT-filtering replacement for, 4 application, 229 using with markup, 5 PushFilter.java code sample, 230–231 roles, mapping to classes in Cocoon, 322 root collection, referencing in ■Q BrokerDatabase.java application, Quantity element, checking for, 61 389 quantity specifiers, using with DTDs, 15–16 root elements quotes (“) starting XML documents with, 5 replacement for, 4 using with XML namespaces, 11 using in Xindice, 383 root node, selecting from in XPath, 201 QuoteService, deployment descriptor for, rows, defining in XSL-FO, 257 160 RPC implementation examining SOAP requests in, 165 ■R examining SOAP response in, 166 rd (retrieve_document) command in running network traffic interceptor on, Xindice, using, 382 164 readFileFromDisk method RPC-style messages, declaring, 134 using with AddDocuments.java RPC-style web services. See also web application, 396–397 services using with Xindice database, 397 deploying, 158, 161 records deploying and undeploying, 161 inserting in documents with XUpdate deploying with command interface, language, 409 160–161 removing from orders with XUpdate developing clients for, 161 language, 405, 409 invoking, 163 retrieving in specific order in XML running clients for, 164 databases, 382 writing client code for, 161, 164 region area of XSL-FO documents, overview writing server code for, 158 of, 244 RPC/Literal request message, example of, region body, declaring block in, 256 128 region-after area, placing page number in, RPC/Literal response message, example of, 262 128 region-before area, placing content in, 261 RPC/Literal SOAP messaging mode, overview region-body area, defining flow for, 262 of, 127 ■INDEX 471 rpcrouter servlet schema definition, creating for XMLBeans role in SOAP implementation, 156 document processing, 83–84 URL of, 162 schemas. See XML schemas RSA algorithms, using for key generation, 342 schemaLocation attribute, specifying URI for RSS content, adding in Forrest, 446, 448 external schema with, 36 Run the Admin Client hyperlink in Apache scomp SOAP, explanation of, 155 relationship to XMLBeans, 81 SAAJ (SOAP with Attachments API for Java) testing XMLBeans installation with, 83 website, 112 searchCustomer method in Orders.xml, using, 76 ■S security terminology. See also XML-Security salt, randomizing passwords with, 361 authentication, 328 save messages in publishing API, authorization, 328 descriptions of, 147 message confidentiality, 329 save method, calling on document object in nonrepudiation, 328 XMLBeans, 98 selectNodeIterator method, calling on saveXML method, calling in XMLBeans, CachedXPathAPI instance, 221 97–98, 100–101 selectors element of sitemap component,

SAX (Simple API for XML) overview of, 311 at faster it Find description of, 41 SendMessage application, using with document processing with, 50–51, 63 document-style web service, 175 versus DOM and XMLBeans, 102 sequence tags, using with elements-only overview of, 47 complex types, 29–30 processing document data in, 56–57 serialize element, using with pipelines

providing error handling in, 57 element, 296 http://superindex.apress.com/ XMLReader interface in, 64–65 serializers SAX API classes defining for Cocooon application, 289 DefaultHandler, 65 examples of, 308 SAXParser, 64 overview of, 311 SAXparserFactory, 63 role in Cocoon pipeline architecture, 286 SAX parser instance, creating, 54 server code SAX parsing writing for document-style web services, classes required for, 54 168, 172 using with Java XSLT-filtering application, writing for RPC-style web services, 158 227 Server faultcode element in SOAP message, SAX processing overview of, 122–123 overview of, 47–50 server for document-style web service, pros and cons of, 49 deploying from command line, 173 SAXExample1 class, extending from server requestors, using in web services, 109 defaultHandler, 55 server, shutting down for Tomcat installation, SAXExample1.java, compiling source for, 57 154 SAXExample2 code sample, 58, 61 server-side transformations, performing, SAXException 217–218 description of, 57 ServerPagesGenerator class, using, 314 throwing, 55 service binding, overview of, 112 SAXParseException, description of, 57 service description, obtaining from URL in SAXParser object, creating, 50 registry, 111–112 SAXParserFactory class, instantiating, 54 service element SAXReader class, description of, 50 example of, 136 SAXTransformerFactory instance, creating in using with deployment descriptors, 189 push filtering model, 231 service invocation, overview of, 112 “//Scanner | //Printer”Xpath expression, service providers, using with web services, effect of, 205 109–110 schema compiler, running on schema service root element, location of, 190 definitions, 81 ServiceManagerClient Java application, using with Apache SOAP, 160 472 ■INDEX

services. See also web services simpleType, assigning name to, 27 creating for web services, 110 single quote (‘), replacement for publishing for web services, 110 site.xml, defining Forrest menus in, 431 searching, 111 sitemap components servlet chaining, comparing Cocoon pipeline components element, 309 to, 285 generators element, 310 servlet information for Cocoon, location of, matchers element, 312 321 selectors element, 311 setCoalescing method, description of, 79 serializers element, 311 setContentHandler method, using with transformers element, 310 XMLReader interface of SAX API, 64 sitemap document setDTDHandler method, using with actions element of, 294–295 XMLReader interface of SAX API, 65 components element of, 291 setEntityResolover method, using with pipelines element of, 295–296 XMLReader interface of SAX API, 65 resources element of, 292, 294 setEntityResolver method of, description of, structure of, 291 80 views element of, 291 setIgnoringComments method, description sitemap.xmap file of, 79 for Cocoon application, 289 setMethodName method, calling for RPC- code sample, 298, 300, 303, 314, 319 style web service, 163 location of, 322 setNamespaceAware method, description of, sitemap.xmap pipelines element structure, 79 296 setRenderer method, calling on Drive class, sitemaps 265 creating for Cocoon application, 286, setSchema method 289–290 description of, 79 declaring generators in, 308 using with SAXParserFactory class, 64 for i18n Cocoon transformer, 303, 305 setTargetObjectURI method. calling for RPC- for PDF conversion, 298 style web service, 163 for XSP processing, 319 setValidating method for XSP web page, 314–315 description of, 79 skins using with SAXParserFactory class, 64 customizing on StockBrokerage site, shutdown command, using with Xindice 437–438 server, 413 installing in StockBrokerage site, 433, sign method, executing for XML documents, 435 344 installing third-party skins on Signature element StockBrokerage site, 436 child elements in, 339 slide elements constructing for SignedPO.java declaring, 13 application, 343 including character data in, 15 digest value specified in, 338 using subelements with, 15 locating for VerifyPO. java application, 348 slideshow element signature object, adding digital certificate declaring, 13 and public key to, 356 including single child element in, 13 Signature tag, using with XML signatures, 337 SOAP (Simple Object Access Protocol) signed documents downloading for Linux installation, 451 examining, 345–346 installing, 151, 156 serializing to output file, 356 overview of, 113 verifying, 346, 349 SOAP faultcodes, nonstandard faultcodes, SignedPO.java application, running, 340, 342, 124 344 SOAP implementation architecture, overview simple data types, using in XML schemas, 24, of, 156–157 28 SOAP messages SimpleTransform program, compiling to test actor attribute of, 117 Xalan, 198 application of header blocks in, 117, 120 ■INDEX 473

Body element in, 120–121 src attribute Client faultcode element in, 122 specifying for XSL-FO documents, 249 detail element of, 125 using with components element of encodingStyle attribute of, 117 sitemap, 291 Envelope element of, 116 using with document generator, 289 Fault element in, 121 SSL (Secure Sockets Layer) digital faultcode element in, 121 certificates, obtaining for testing, faultstring element of, 124–125 352 Header element of, 116 Start event, generating relative to SAX parser, mustUnderstand attribute of, 117 48 MustUnderstand faultcode element of, start tags, using with elements, 5 123 startDocument/endDocument method, Server faultcode element in, 122–123 using with DefaultHandler class in structure of, 114–115 SAX API, 65 VersionMismatch faultcode element of, startElement event handler, modifying, 61 123 startElement/endElement method, using SOAP messaging modes with DefaultHandler class in SAX Document/Literal mode, 127 API, 65

overview of, 126 startup.bat batch file, starting Tomcat with, at faster it Find RPC/Literal mode, 127, 129 153 SOAP reply over HTTP, example of, 130 stock brokerage application SOAP requests applying header blocks in, 118 examining in RPC implementation, 165 extending functionality of, 58, 63 examining, 188–189 XML parsing application, 42–43

examining, 189 stock information, obtaining from web http://superindex.apress.com/ over HTTP, 129–130 service, 183 role in web services integration model, stock name 106 including in SOAP request, 170 role in XML processing, 45 setting as text element in XMLBeans, 101 using in document-style web services, stock quote service, client program for, 170 161–162 SOAP responses stock symbol examining, 188–189 adding quantity and trade type to in examining in RPC implementation, 166 XMLBeans, 102 generating in document-style web service, comparing value fo str variable with, 62 171 StockBrokerage collection, creating with SOAP toolkits Xindice, 379 downloading for Linux installation, 451 StockBrokerage site. See also Forrest downloading for web services, 110 customizing skins on, 437–438 soap.war file, contents of, 154 incorporating images in, 430 SOAPException catch block. catching index.xml page for, 424 exceptions in, 187 installing skins on, 433, 435 SOAPFaultListener interface, implementing installing third-party skins in, 436 with custom exception handler, 177 setting tabs for, 427 solicit/response messaging in web services, stockCount variable, incrementing, 62 example of, 138 StockInfo class Sorted Orders example, creating JSP page for, obtaining stock information from, 183 218 representing user-defined data types with, SortedOrders.html transformation, 216 181–182 SortedOrders.jsp code sample, 217, 219 StockInfoService special characters, representation of, 4 deploying, 184 specifiers, using with attributes in XML writing client for, 184, 188 schema, 21, 23 StockOrderProcessor application, deployment descriptor for, 173 474 ■INDEX

StockOrderProcessor class Text format support, adding in Forrest, 444 creating for document-style web service, text output, generating with pipeline, 297 170 text serializer in Cocoon library modifying for exception handling in description of, 308 Apache SOAP, 176 using, 296–297 modifying for exception handling, text-only elements, using in XML schemas, 177–178 29 modifying, 177–178 Thawte certification authority website, 352 StockQuote.xsp code sample, 315–316 timestamp variable, assigning system time to StockQuoteService service, declaring, 136 in XSP web page, 316 StockQuote_xsp.java, accessing Java source tModel data structure in UDDI file for, 318 description of, 142 StockSymbol element, identifying trades example of, 145 with, 52 Tomcat StockSymbol interface, defining Factory class downloading for Linux installation, 451 in, 86 installing, 152, 154 storeResource method, using with Tomcat installation of Cocoon, creating, 282 AddDocuments.java application, 397 Tomcat version 5.5.9, using JRE 1.5 with, 152 stream generator in Cocoon, description of, trade order 308 application for modification of, 94 StreamSource object, constructing for input XMLBeans application for modification to XSLT transformations, 269 of, 90 string length, limiting in XML schemas, 26 trades stylesheet element, defining version attribute determining for specific stocks by of xsl namespace with, 212 specified customer in XML stylesheet processors, inputs accepted by, databases, 385–386 208 identifying in stock brokerage application, Sun website, downloading JavaMail API 52 from, 154 trades.xml code sample in Forrest, 428–429 SVG (), embedding, TradeType, specifying buy or sell with, 52 251–252 transform element, using with pipelines SVG images, including in XSL-FO element, 295 documents, 249, 252 transformation files, obtaining list of, 301 SVG serializer in Cocoon, description of, 309 transformation program, compiling and , using with document-style running, 216 web service, 171 transformations symmetric cryptography applying to orders document, 224, 232 overview of, 331–332 defining for Cocoon application, 287–288 using with digital signatures, 333–334 need for, 196 symmetric keys, generating, 364 to PDF,300 system time, retrieving in XSP web page, 316 performing in JSP, 217–218 performing through Java applications, 214 ■T performing with translets, 233 tables, creating in XSL-FO, 252, 258 of selected contents, 219, 224 tabs, creating in Forrest, 426, 430 server-side transformations, 217–218 tabs.xml document, creating in Forrest, 427 visualizing, 196 taglibs versus Logicsheets, 318 Transformer object, creating for partial tags, using start and end tags with elements, processing of XML document, 221 5 TransformerFactory instance, creating for TcpTunnelGui tool, using with RPC JSP server-side transformation, 218 implementation, 165 transformers. See also Cocoon transformer template element, using with XSLT classes documents, 212 declaring for i18n, 304 text data, including in DTD elements, 14 defining for Cocoon application, 290 text documents, including in Forrest, 440 role in Cocoon pipeline architecture, 285 ■INDEX 475 transformers element URIs overview of, 310 creating short names in Forrest, 447 using with i18n transformer, 304 specifying default namespace with, 12 TransformTest.java code sample, 215 specifying reference to external schema translets file with, 36–37 applying to XML documents, 235 URL object, constructing for RPC-style web basing on XSLT files, 234 service, 162 creating, 232 URL patterns creating at command prompt, 232 matching against client request in definition of, 232 Cocoon, 312 performing transformations with, 233 using with matchers in Cocoon pipeline programming interface for, 233, 235 architecture, 286 Translets.java code sample, 233 URLs (Uniform Resource Locator) TRIPLE DES algorithms, using with associating to bindings, 136 EncryptPO.java application, 364 for invoking text pipeline, 297 true value, setting countQuantity Boolean for running Cocoon application, 290 variable to, 61 using with Tomcat installation of Cocoon, type mappings, specifying in Apache SOAP, 284

193 URN (Uniform Resource Name), specifying at faster it Find types element of WSDL document, example in Apache SOAP, 156 of, 133 user-defined data types creating in Apache SOAP, 181–182 ■U creating mappings for, 181 UDDI (Universal Description, Discovery, and receiving from web services, 181

Integration) user-written comments, including in XML http://superindex.apress.com/ overview of, 141 documents, 7 public and private registries in, 141 UDDI APIs ■V inquiry API, 147 validate method, parsing input file with, 89 inquiry API find messages, 148 Vector, creating for RPC-style web service, inquiry API get messages, 149 163 publishing API, 146 VerifyCertifiedPO.java application, running, publishing API delete messages, 360 147–148 VerifyPO.java application, running, 346, publishing API save messages, 147 348–349 publishing API security messages, 148 VeriSign website, 335 UDDI data structures version attribute of xsl namespace, defining, bindingTemplate structure, 144 212 businessEntity structure, 143 VersionMismatch faultcode element of SOAP businessService structure, 144 message, overview of, 123 overview of, 142 views element of sitemap document, publisherAssertion structure, 145 overview of, 291 tModel structure, 145 Visit the SOAP RPC router URL hyperlink in UDDI registry, relationship to web services, Apache SOAP,explanation of, 155 109 UDDI specifications, web resource for, ■W 110 W3C website, 2 UML sequence diagram for Cocoon start-up, WAR file, creating for Forrest site, 420 accessing, 322 web communication, process of, 284 update method, using with DeleteNode.java web service implementation, obtaining stock app, 407 information from, 183 UpdateNode.java code sample, 410 web services. See also document-style web UpdateOrder method in Orders.xml, using, services; RPC-style web services; 76 services creating RPC-style web services, 157 creating services for, 110 476 ■INDEX

definitions of, 105–106 SAAJ (SOAP with Attachments API for integration model for, 106–107 Java), 112 language independence of, 108 simple data types, 25 messaging exchange patterns in, 137, 139 skins for Forrest, 436 platform independence of, 108 SOAP toolkits, 110 protocols used for, 107 Sun, 154 transport independence of, 108 Thawte certification authority, 352 web services architecture, components of, UDDI specifications, 110 109 VeriSign, 335 Web, early days of, 280 W3C (World Wide Web Consortium), 2 websites WS-I (Web Services Interoperability Ant build script for XMLBeans, 84 Organization), 113 Apache Ant, 450 X.509 standard for digital certificates, 336 Apache Avalon framework, 322 Xalan, 197 Apache Cocoon, 452 Xindice, 377 Apache Cocoon source, 282 Xindice Command Line Tools Reference Apache FOP,452 guide, 411 Apache Forrest, 454 XML parsers, 41 Apache SOAP,154, 451 XML schema built-in data types, 21 Apache Tomcat, 152, 451 XML-DSig charter, 336 Apache Xalan, 452 XMLBeans software, 82 Apache Xerces, 450 XPath specifications, 200 Apache Xerces project code, 46 XSL-FO specifications, 237 Apache Xindice, 453 Yahoo!’s web services, 105 Apache XML-Security, 453 well-formed XML documents, representing Apache XMLBeans, 450 as trees with nodes, 199 Cocoon start-up UML sequence diagram, wildcards, using with XPath queries, 204–205 322 WML serializer in Cocoon, description of, Cocoon transformer classes, 303 308 Cocoon UML sequence diagram for WS-I (Web Services Interoperability HttpRequest handling, 323 Organization) website, 113 deriving rules for XML schemas, 27 WSDL (Web Services Description Language) DH (Diffie-Hellman) algorithm, 342 overview of, 131 ECDH (Elliptic Curve Diffie-Hellman) using, 131 algorithm, 342 WSDL documents FOP binaries, 238 binding element of, 135–136 Forrest download, 417 definitions element of, 132 Forrest websites, 416 example of, 139, 141 Google’s web API service, 105 import element of, 133 ISO (International Organization for message element of, 134 Standardization), 20 operations element of, 135 j2world—Smart Solutions for a Mobile portType element of, 135 World, 416 service description in, 111 JAXB (Java Architecture for XML Binding), service element of, 136 103 structure of, 131 JCE (Java CryptographyExtension) types element of, 133 reference guide, 363 JDK 1.5.0, 449 ■X JRE 1.5, 152 X.509 standard for digital certificates, Krysalis Community Project, 416 significance of, 336 Organization for the Advancement of Xalan Structured Information Standards, command-line transformation tool in, 214 113 downloading, 197 patterns for XML schemas, 26 downloading for Linux installation, 452 REST (Representational State Transfer) filtering capabilities in, 224, 232 model for web services, 107 installing, 197 ■INDEX 477

overview of, 197 XML:DB API, adding document s to testing installation of, 198 collections with, 392, 398 transformation capabilities of, 214, 217 XML declarations transformer factory in, 234 adding in document-style web service, translets in, 232 172 Xalan XpathAPI class, using, 219, 224 beginning XML documents with, 5 XCOPY deployment process, using with XML decryption, developing application for Cocoon application, 290 decrypting PO, 367, 371 Xerces XML document fragment downloading code for, 46 constructing for BrokerDatabase.java downloading for Linux installation, 450 application, 390 obtaining ready-to-use-parser from, 41 constructing for DeleteNode.java Xindice application, 407 Command Line Tools Reference guide for, for InsertNode.java application, 409–410 411 for UpdateNode.java application, 410 downloading, 377 XML documents. See also documents downloading for Linux installation, 453 applying translets to, 235 structure of, 376 components of, 3, 40

using double quotes (“) in, 383 declaring slide element in, 14 at faster it Find Xindice databases generating and signing, 340, 344 creating and managing, 378, 381 including DTDs in, 18–19 loading database driver for, 389 including user-written comments in, 6 obtaining reference to root collection in, locating nodes in, 201, 204 389 marking by using elements, 5

Xindice servers naming elements in, 7 http://superindex.apress.com/ shutting down, 413 nesting elements in, 5–6 starting, 377–378 parsing, 56 xindice utility, listing documents with, 381 role in Cocoon architecture, 284 xindiceadmin utility signing, 344 backing up data with, 412 specifying root elements of, 14 deleting indexes with, 412 starting with root elements, 5 exporting data with, 412 text-based nature of, 4 importing data with, 413 transforming into , 268 listing indexes with, 412 transforming selected contents of, 219, using, 378 224 XMethods stock-related web services, XML encryption, developing application for website for, 105 encrypting PO, 360, 365 XML (eXtensible Markup Language) XML format, outputting in, 301 case sensitivity of, 4 XML namespaces characters restricted by, 4 creating fully qualified elements, 8 extensibility of, 2, 108 creating multiple namespaces, 8, 10 overview of, 2–3 declaring, 8 rationale for use of, 1–2 element names contained in, 9 transforming to FO, 298, 300 overview of, 7–8 XML databases using default and prefixed namespaces, adding documents to, 380 11–12 adding multiple documents to, 380–381 using default namespaces, 10–11 creating collections for XML databases, XML output, enabling in Forrest, 445 379 XML parsers, obtaining, 41 creating subcollections for, 379 XML parsing, necessity of, 39 listing documents in, 381 XML parsing applications querying, 381, 386 application configurations, 44–45 retrieving documents in, 382 market survey, 43 selecting records based on selection stock brokerage, 42–43 criteria in, 382, 386 XML parsing libraries, installing, 46 478 ■INDEX

XML parsing techniques, examples of, 41 XMLBeans software xml prefix, binding to namespace name, 8 downloading for Linux installation, 450 XML processing, system architecture for, 45 installing, 82 XML schemas XMLBeansExample1 class, declaring, 88 annotating, 23–24 XMLBeansExample1.java, downloading code built-in data types used with, 25 for, 90 complex types in, 28, 35 XMLBeansExample2 class, declaring and defining attributes in, 21 creating class variables for, 92 defining elements in, 20–21 XMLBeansExample2.java, downloading including in XML documents, 36 source for, 94 limiting string length in, 26 XMLBeansExample3.java, downloading overview of, 20 source for, 99 referencing on local file systems, 36 xmlbook namespace restricting numbers in, 26–27 creating, 9 simple data types in, 24, 28 declaring, 8 specifying lists in, 27 xmlbook prefix, qualifying namespace specifying references for external schema elements with, 8 files, 36 XML:DB API text-only elements in, 28 adding document s to collections with, using named anonymous types in, 27–28 392 using patterns with, 25–26 creating collections with, 387, 391 XML serializer in Cocoon, description of, deleting documents in, 402, 404 308 listing documents in specified XPath with, xml serializer, specifying, 298 398, 402 XML signatures XMLDBException, throwing, 400 advantages of, 336–337 xmldb\:xindice protocol, using, 400 canonical XML, 338 xmlns prefix, using with XML namespaces, 7 overview of, 336 XMLReader interface structure of, 338 creating in push filtering model, 231 types of, 338 using with SAX API, 64–65 XML syntax, overview of, 3, 7 XMLResource object XML to PDF transformation, implementing, creating for AddDocuments.java 266, 269, 273, 276 application, 397 XML transformations, using, 42 creating for Xindice database, 397 XML-DSig charter website, 336 XmlString instance, creating in XMLBeans, XML-Security. See also security terminology 102 downloading Java libraries for, 339 XMLTransformation.java code sample, downloading for Linux installation, 453 267–268 XML2PDF servlet, compiling and running, XPath 273–276 combining paths in, 205 XMLBeans listing documents in, 398, 402 description of, 41 overview of, 199–200 pros and cons of, 81–82 syntax for, 200–201 versus SAX and DOM, 102 XPath APIs, using with VerifyPO.java XMLBeans document processing application, 348 application for creating order document, XPath axes, overview of, 205–206 99, 102 XPath expressions application for deleting order, 94, 99 changing to select different nodes, 223 application for modifying trade order, 90, for retrieving orders for specific 94 customers, 383–384 downloading for Linux installation, 450 retrieving records in specific order with, Java interfaces in, 85, 87 382 Java package in, 85 selecting parts of XML documents with, overview of, 81 219, 224 schema definition for, 83–84 testing, 202 using Ant tool with, 84 testing with PathSelector utility, 203 ■INDEX 479

XPath operators, overview of, 206–207 XSLT documents XPath processor, modifying in Cocoon, 324 structure of, 212, 214 XPath queries taking as input parameters in XSL-FO, 273 for determining trades for specific stocks use by manager, 225 by specified customers, 385–386 XSLT files, basing translets on, 234 for specified stock at specified price, XSLT filtering, example of, 224 386 XSLT processing model, 208 using wildcards with, 204–205 XSLT transformations, constructing XPathAPI class, transforming selected StreamSource object for input to, 269 contents with, 219, 224 XSLT transformer, role in Cocoon pipeline xpathdirectory generator in Cocoon, architecture, 285 description of, 308 XSLTC processors, configuring in Cocoon, xsd namespace, using with schema root 323 element, 20 XSLTC, description of, 232 xsd:all tags, using with elements-only XSLTInputHandler, using in XML to PDF complex types, 30–31 transformation, 275 xsd:choice tags, using with elements-only XSP (XML Server Pages) complex types, 31 versus JSP, 318 xsd:group tags, using with elements-only overview of, 313 at faster it Find complex types, 32–33 XSP documents XSL (Extensible Stylesheet Language), processing, 314 overview of, 198 structure of, 313 XSL commands, examining in birds.xsl file, XSP Logicsheets 198 categories of, 321 xsl namespace, defining version attribute of, creating XSP document for sending mail http://superindex.apress.com/ 212 with, 319–320 XSL-FO (XSL-Formatting Objects). See also overview of, 318 FO testing mail XSP document with, 321 creating tables in, 252, 258 versus taglibs, 318 overview of, 237 writing sitemap for XSP processing with, server-side transformation application, 319 270 XSP processing, Cocoon implementation of, XSL-FO document structure 317–318 areas in, 243, 245 XSP web page organizing content in, 246, 248 creating live data XSP on, 315, 317 top-level of, 242–243 description of, 314 XSL-FO documents opening live data page in, 317 adding images to, 249 sitemap fo, 314–315 creating columnar text in, 258, 264 XUpdate language creating PDF files from, 264–265 inserting node in orders collection, including SVG images in, 249, 252 409–410 XSL-FO page templates, overview of, 245 overview of, 404 xsl-region-body, setting flow-name attribute removing nodes with, 405, 409 to, 246 updating node in orders collection, 410 XSLT (Extensible Stylesheet Language XUpdate queries, creating, 404–405 Transformations) example of, 208, 212 ■Y overview of, 207 Yahoo!’s website for web services, 105