Oracle Database 10g XML & SQL: Design, Build & Manage XML Applications in Java, C, C++ & PL/SQL by Mark V. Scardina, Ben...
96 downloads
1904 Views
11MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
Oracle Database 10g XML & SQL: Design, Build & Manage XML Applications in Java, C, C++ & PL/SQL by Mark V. Scardina, Ben Chang and Jinyu Wang McGraw-Hill/Osborne © 2004 (600 pages)
ISBN:0072229527
This comprehensive guide focuses on utilizing XML technologies within Oracle's XML-enabled products, with emphasis on XML standards, their usage and best practices. Table of Contents Oracle Database 10g XML & SQL—Design, Build & Manage XML Applications in Java, C, C++ & PL/SQL Introduction Part I - Oracle and the XML Standards
Chapter 1
- Introducing XML
Chapter 2
- Accessing XML with DOM, SAX, JAXB, and StAX
Chapter 3
- Transforming XML with XSLT and XPath
Chapter 4
- Validating XML with DTDs and XML Schemas
Chapter 5
- XML Operations with XQuery
Chapter 6
- XML Messaging and RPC with SOAP
Chapter 7
- Putting It All Together with XML Pipeline, JSPs, and XSQL
Part II - Oracle XML Management for DBAs
Chapter 8
- Getting Started with the Oracle XML Database
Chapter 9
- Storing XML Data
Chapter 10 - Generating and Retrieving XML Chapter 11 - Searching XML Data Chapter 12 - Managing the Oracle XML Database Part III - Oracle XML for Java Developers
Chapter 13 - Getting Started with Oracle XML and Java Chapter 14 - Building an XML-Powered Web Site Chapter 15 - Creating a Portal Site with XML and Web Services Chapter 16 - Developing an XML Gateway Application with SOAP and AQ Chapter 17 - Developing XML-Based Reusable Components Part IV - Oracle XML for C Developers
Chapter 18 - Getting Started with Oracle XML and C Chapter 19 - Building an XML-Managed Application Chapter 20 - Build an XML Database OCI Application Chapter 21 - Create an XML-Configured High-Performance Transformation Engine Part V - Oracle XML for C++ Developers
Chapter 22 - Getting Started with Oracle XML and C++ Chapter 23 - Build an XML Database OCI C++ Application Chapter 24 - Building an XML Data-Retrieval Application Part VI - Oracle XML for PL/SQL Developers
Chapter 25 - Getting Started with Oracle XML and PL/SQL Chapter 26 - Building PL/SQL Web Services Chapter 27 - Extending PL/SQL XML Functionality with Java Chapter 28 - Putting It All Together Appendix
- XML Standards Bodies and Open Specifications
Glossary Index List of Figures List of Tables List of Sidebars
Back Cover Oracle Database 10g XML & SQL: Design, Build & Manage XML Applications in Java, C, C++ & Written by members of the Oracle XML group, this is a must-have reference for all IT managers, DBAs, and developers who PL/SQL want to learn the best practices for using XML with Oracle’s XML-enabled products. Includes real-world case studies based ISBN:0072229527 by Mark V. Scardina, Ben Chang and Jinyu Wang on the authors’ experience managing Oracle’s XML Discussion Forum--a community of 20,000+ XML component users. McGraw-Hill/Osborne © 2004 (600 pages) About the XML Authors This comprehensive guide focuses on utilizing technologies within Oracle's XML-enabled products, with emphasis on XML standards, their usage and best practices. Mark V. Scardina is Oracle’s XML Evangelist for Server products and is the Group Product Manager for the CORE and XML Development Group tasked with providing the XML infrastructure components used throughout the Oracle product stack, Table of Contents including the Oracle XML Developer’s Kit. Mark chairs the Oracle XML Standards committee and is an editor on the W3C XSL Working Group. He is a frequent speaker atBuild industry trade shows and conferences, a writer for&industry Oracle Database 10g XML & SQL—Design, & Manage XML Applications in Java, C, C++ PL/SQL journals and is coauthor of Oracle9i XML Handbook and Oracle XML Handbook . Prior to joining Oracle, he worked at Socket Communications Introduction and ACE Technologies. He holds a B.S. in Information Systems Management from USF. Part I - Oracle and the XML Standards
Chapter 1 is- aIntroducing XML at Oracle Corp., where he heads the CORE and XML Development Group as Director. In Ben Chang 15-year veteran addition on Oracle6 to Oracle Database he served the longest tenure as Development Release Chapter to 2 working - Accessing XML with DOM, SAX, JAXB,10g andreleases, StAX Manager for Oracle 8.0, spanning five releases. He also served three years as chair of Oracle’s C Coding Standards Chapter 3 - Transforming XML with XSLT and XPath Committee, and he was a W3C DOM Working Group editor. He is co-author of Oracle9i XML Handbook and Oracle XML Chapter 4 Before - Validating with DTDs and XML Handbook. comingXML to Oracle, he worked atSchemas IBM Corp., Pacific Bell, Bellcore, and GE Corporate R&D. He holds an M.S. in Electrical (Computer Systems) from Stanford University and a B.S. in Electrical Engineering and Computer Chapter 5 Engineering - XML Operations with XQuery Science from the University of California at Berkeley. Chapter 6 - XML Messaging and RPC with SOAP Chapter 7 is - Putting All Together withfor XML Pipeline, andmanagement, XSQL Jinyu Wang a SeniorItProduct Manager Oracle XML JSPs, Product in charge of the Oracle XML Developer’s Kit, Part II - Oraclethe XML Management for components DBAs which provides XML infrastructure used across Oracle product stacks. As an Oracle Certified Professional with an extensive database background, she leads a variety of projects that successfully apply XML technologies to Chapter 8 - Getting Started with the Oracle XML Database enterprise business applications. While completing her master’s degree in computer science at the University of Southern Chapter 9 - Storing XML Data California and electrical engineering at Northern Jiaotong University, she worked on artificial intelligence and computer Chapter 10 - Generating Retrieving XML vision, focusing on motionand analysis. Chapter 11 - Searching XML Data Chapter 12 - Managing the Oracle XML Database Part III - Oracle XML for Java Developers
Chapter 13 - Getting Started with Oracle XML and Java Chapter 14 - Building an XML-Powered Web Site Chapter 15 - Creating a Portal Site with XML and Web Services Chapter 16 - Developing an XML Gateway Application with SOAP and AQ Chapter 17 - Developing XML-Based Reusable Components Part IV - Oracle XML for C Developers
Chapter 18 - Getting Started with Oracle XML and C Chapter 19 - Building an XML-Managed Application Chapter 20 - Build an XML Database OCI Application Chapter 21 - Create an XML-Configured High-Performance Transformation Engine Part V - Oracle XML for C++ Developers
Chapter 22 - Getting Started with Oracle XML and C++ Chapter 23 - Build an XML Database OCI C++ Application Chapter 24 - Building an XML Data-Retrieval Application Part VI - Oracle XML for PL/SQL Developers
Chapter 25 - Getting Started with Oracle XML and PL/SQL Chapter 26 - Building PL/SQL Web Services Chapter 27 - Extending PL/SQL XML Functionality with Java Chapter 28 - Putting It All Together Appendix
- XML Standards Bodies and Open Specifications
Glossary Index List of Figures List of Tables List of Sidebars
Oracle Database 10g XML & SQL: Design, Build & Manage XML Applications in Java, C, C++ & Oracle Database 10g XML & SQL—Design, Build & PL/SQL Mark V. Scardina, Ben Chang and Jinyu Wang Manageby XML Applications in Java, C, C++ & PL/SQL ISBN:0072229527 McGraw-Hill/Osborne © 2004 (600 pages) This comprehensive guide focuses on utilizing XML technologies within Oracle's XML-enabled products, with Mark V. Scardina emphasis on XML standards, their usage and best practices. Ben Chang Jinyu Wang Table of Contents
McGraw-Hill/Osborne Oracle Database 10g XML & SQL—Design, Build & Manage XML Applications in Java, C, C++ & PL/SQL 2100 Powell Street, 10th Floor Introduction Emeryville, California 94608 Part I - Oracle and the XML Standards U.S.A. 1 Chapter
- Introducing XML
Chapter 2
XML with DOM, SAX, JAXB, and StAX To arrange- Accessing bulk purchase discounts for sales promotions, premiums, or fund-raisers, please contact McGrawChapter 3 - Transforming with XSLT XPath on translations or book distributors outside the U.S.A., please Hill/Osborne at the aboveXML address. For and information Chapter 4 Validating XML with DTDs and XML see the International Contact Information pageSchemas immediately following the index of this book. Chapter 5
- XML Operations with XQuery Copyright 2004 by The McGraw-Hill Companies, Inc. (Publisher). All rights reserved. Printed in the United States Chapter 6 -©XML Messaging and RPC with SOAP
of America. Except ItasAllpermitted the Copyright Act of 1976, Chapter 7 - Putting Togetherunder with XML Pipeline, JSPs, and XSQLno part of this publication may be reproduced or distributed in any form or by any for means, Part II - Oracle XML Management DBAsor
stored in a database or retrieval system, without the prior written
permission Publisher. Chapter 8 - of Getting Started with the Oracle XML Database Chapter 9
- Storing XML Data
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Chapter 10 - Generating and Retrieving XML
Chapter - Searching XML Data Oracle software programs have been reproduced herein with the permission of Screen11 displays of copyrighted Chapter Oracle 12 Corporation - Managing and/or the Oracle its affiliates. XML Database Part III - Oracle XML for Java Developers
1234567890 CUS CUS 01987654 Chapter 13 - Getting Started with Oracle XML and Java Chapter 14 - Building an XML-Powered Web Site
ISBN 0-07-222952-7
Chapter 15 - Creating a Portal Site with XML and Web Services Chapter Publisher 16 - Developing an XML Gateway Application with SOAP and AQ
Brandon Nordin Chapter 17A. - Developing XML-Based Reusable Components Part IV - Oracle XML for C Developers
Vice President & Associate Publisher Scott Rogers
Chapter 18 - Getting Started with Oracle XML and C Chapter 19 - Building an XML-Managed Application Chapter 20 - Build an XML Database OCI Application Acquisitions Editor Chapter 21 - Create an XML-Configured High-Performance Transformation Engine Lisa McClain Part V - Oracle XML for C++ Developers
Project22Editors Chapter - Getting Started with Oracle XML and C++ LeeAnn23Pickrell, Chapter - Build an XML Database OCI C++ Application Lisa Wolters-Broder, Chapter 24 - Building an XML Data-Retrieval Application Emily Part VI Wolman - Oracle XML for PL/SQL Developers Chapter 25 - Getting Started with Oracle XML and PL/SQL
Acquisitions Coordinator Athena Honore
Chapter 26 - Building PL/SQL Web Services Chapter 27 - Extending PL/SQL XML Functionality with Java Chapter Technical 28 - Editors Putting It All Together
Olivier Le -Diouris, Anjana Manian Appendix XML Standards Bodies and Open Specifications Glossary
Copy Editor William McManus
Index
List of Figures
List of Tables Proofreader List of Sidebars John Gildersleeve
Indexer Irv Hershman Composition Apollo Publishing Services, Jim Kussow Illustrators Kathleen Edwards,
Michael Mueller, Melinda Lytle Oracle Database 10g XML & SQL: Design, Build & Manage XML Applications in Java, C, C++ &
Series DesignPL/SQL Jani Beckwith by Mark V. Scardina, Ben Chang and Jinyu Wang Cover Series Design McGraw-Hill/Osborne © 2004 (600 pages) Damore Johann Design, Inc.
ISBN:0072229527
This comprehensive guide focuses on utilizing XML technologies within Oracle's XML-enabled products, with
on XML standards, their ™ and best practices. This book was emphasis composed with Corel VENTURA usage Publisher.
Information has been obtained by Publisher from sources believed to be reliable. However, because of the possibility Table of Contents of human or mechanical by our sources, or others, Publisher does Oracle Database 10g XML &error SQL—Design, Build &Publisher, Manage XML Applications in Java, C, not C++guarantee & PL/SQL to the accuracy, adequacy, or completeness of any information included in this work and is not responsible for any errors or Introduction omissions or the obtained from Part I - Oracle andresults the XML Standards
the use of such information.
Chapter 1
- Introducing XML Oracle Corporation does not make any representations or warranties as to the accuracy, adequacy, or
Chapter 2 - Accessing XML with DOM, SAX, JAXB, and StAXand is not responsible for any errors or omissions. completeness of any information contained in this Work, Chapter 3 - Transforming XML with XSLT and XPath
To my family for their understanding, tolerance, and support through the late nights and lost weekends. To my Chapter 4 - Validating XML with DTDs and XML Schemas coworkers accepting without complaint my interruptions for technical help and advice. Chapter 5 -for XML Operations with XQuery —Mark6Scardina Chapter - XML Messaging and RPC with SOAP Chapter 7
- Putting It All Together with XML Pipeline, JSPs, and XSQL
To my family for their support. —Ben Chang
Part II - Oracle XML Management for DBAs
Chapter 8
- Getting Started with the Oracle XML Database
Chapter - Storing I would9like to thankXML firstData and foremost my husband, Yong, for his support when I worked on this book. I’d also like Chapter - Generating Retrieving to thank10my colleaguesand on the Oracle XML XML development team who gave me invaluable help. Chapter —Jinyu11 Wang - Searching XML Data Chapter 12 - Managing the Oracle XML Database
About Authors Part III -the Oracle XML for Java Developers
Chapter 13 - Getting Started with Oracle XML and Java
Mark V. Scardina is Oracle’s XML Evangelist for Server products and is the Group Product Manager for the CORE
Chapter 14 Development - Building an XML-Powered and XML Group taskedWeb withSite providing the XML infrastructure components used throughout the Oracle Chapter - Creating a Portal Site with XMLDeveloper’s and Web Services product15 stack, including the Oracle XML Kit. Mark chairs the Oracle XML Standards committee and is Chapter 16on - Developing an XML Gateway Application SOAPspeaker and AQ at industry trade shows and conferences, a an editor the W3C XSL Working Group. He is a with frequent Chapter 17industry - Developing XML-Based Reusable of Components writer for journals and is co-author Oracle9i XML Handbook and Oracle XML Handbook. Prior to joining Part IV - Oracle XMLat forSocket C Developers Oracle, he worked Communications
and ACE Technologies. He holds a B.S. in Information Systems
Chapter 18 - Getting Started with Oracle XML and C Management from USF. Chapter 19 - Building an XML-Managed Application
Mark lives Sanan Francisco with his wife and twin boys. His hobbies include DanceSport, high-end audio/video, and Chapter 20 -inBuild XML Database OCI Application working on his house.
Chapter 21 - Create an XML-Configured High-Performance Transformation Engine Part V - Oracle XML for C++ Developers
Ben Chang is a 15-year veteran at Oracle Corp., where he heads the CORE and XML Development Group as
Chapter 22In - Getting withon Oracle XML to and C++ Database 10g releases, he served the longest tenure as Director. additionStarted to working Oracle6 Oracle Chapter 23 Build an XML Database OCI C++ Application Development Release Manager for Oracle 8.0, spanning five releases. He also served three years as chair of Chapter 24C- Coding BuildingStandards an XML Data-Retrieval Application Oracle’s Committee, and he was a W3C DOM Working Group editor. He is co-author of Part VI - Oracle XML for PL/SQL Developers Oracle9i XML Handbook and Oracle XML Handbook.
Before coming to Oracle, he worked at IBM Corp., Pacific Bell,
Chapter 25and - Getting Started with Oracle XML and PL/SQL Bellcore, GE Corporate R&D. He holds an M.S. in Electrical Engineering (Computer Systems) from Stanford Chapter 26 -and Building Web Services University a B.S.PL/SQL in Electrical Engineering and Computer Science from the University of California at Berkeley. Chapter 27 - Extending PL/SQL XML Functionality with Java
Jinyu Wang is a Senior Product Manager for Oracle XML Product management, in charge of the Oracle XML Chapter 28 - Putting It All Together
Developer’s Kit, which provides the XML infrastructure components used across Oracle product stacks. As an - XML Standards Bodies and Open Specifications Oracle Certified Professional with an extensive database background, she leads a variety of projects that Glossary successfully apply XML technologies to enterprise business applications. While completing her master’s degree in Index computer science at the University of Southern California and electrical engineering at Northern Jiaotong University, List of Figures she worked on artificial intelligence and computer vision, focusing on motion analysis. Appendix
List of Tables
List of Sidebars
Oracle Database 10g XML & SQL: Design, Build & Manage XML Applications in Java, C, C++ & Introduction PL/SQL by Mark V. Scardina, Ben Chang and Jinyu Wang
ISBN:0072229527
XML is now six years old, having been published as a W3C recommendation in February 1998. It was around that McGraw-Hill/Osborne © 2004 (600 pages) time that Oracle began to take a serious look at this new promising technology. In fact the Architectural Review on utilizing XML technologies within Oracle's XML-enabled products, with Board decidedThis that comprehensive XML was goingguide to befocuses of company-wide importance and handed down a development charter to emphasis on XML standards, their usage and best practices. the CORE Development group as follows: Table Deliver of Contents the best platform for developers to productively build and cost-effectively deploy reliable and scaleable
Internet applications exploiting XML. Oracle Database 10g XML & SQL—Design, Build & Manage XML Applications in Java, C, C++ & PL/SQL Introduction
This charter has proven to be prescient as not only has XML become a dominant Internet technology, but also has spawned an entire family of standards that are becoming the foundation of electronic publishing, business, and Chapter 1 - Introducing XML application development. The impact of XML has been felt to no greater measure than within Oracle and has kept Chapter 2 - Accessing XML with DOM, SAX, JAXB, and StAX the now CORE and XML Development group busy these many years. The authors are members of this group and Chapter 3 - Transforming XML with XSLT and XPath have had the opportunity to not only participate in the XML standards process and produce the implementations but Chapter 4 - Validating XML with DTDs and XML Schemas also work with over a hundred development groups across Oracle and countless customers in putting this family of Chapter 5 - XML Operations with XQuery technologies to work in a myriad of ways. Thus we hope to bring to you not only the means to put Oracle’s XML Chapter 6 XML Messaging and RPC withand SOAP technology to work, but also new ways new ideas for using XML in your applications. Part I - Oracle and the XML Standards
Chapter 7
- Putting It All Together with XML Pipeline, JSPs, and XSQL
Over years, theManagement XML dialog has changed. Part II the - Oracle XML for DBAs
It used to be asked, when talking with new users or businesses
contemplating XML,Started What iswith all this fuss about? Why would I want to exchange data in a bloated form having lost its Chapter 8 - Getting the Oracle XML Database binding? is theXML oneData killer XML application? Chapter 9 What - Storing Chapter 10 - Generating and Retrieving XML
These were tough questions, primarily because XML is not an end but a means. Its strength and its weakness are in its ability to be infinitely flexible and extensible. Fortunately, as companion standards such as XSL, XML Schema, Chapter 12 - Managing the Oracle XML Database Namespaces, XPath, and so on, were developed and rolled out businesses and their developers stopped asking Part III - Oracle XML for Java Developers Why XML? and started asking How XML? which leads us to why we wrote this book. Chapter 11 - Searching XML Data
Chapter 13 - Getting Started with Oracle XML and Java
Chapter You may 14be - Building surprised an to XML-Powered learn that Oracle Web Site does not have a research and development division. All development is
done in15 the- Creating context of a product. This XML can and make developing Chapter a Portal Site with Web Services new technologies difficult as these standards efforts evolve,16 have bugs, andan have years to stabilize. This canand be AQ seen in the years it took to publish XML Schema Chapter - Developing XMLtaken Gateway Application with SOAP and that Query is XML-Based in its fifth year and still not out the door. Nevertheless, Oracle has been an early adopter in all Chapter 17XML - Developing Reusable Components of these technologies, them to Part IV - Oracle XML for putting C Developers
work within all Oracle products.
Chapter 18 - Getting Started with Oracle XML and C
This situation gave birth to the Oracle XML Developer’s Kit in 1999 as a vehicle to expose implementations of these technologies to both the internal and external development community. This was desirable, as it would allow us to Chapter 20 - Build an XML Database OCI Application bring these implementations to production quicker using the beta facilities of the Oracle Technology Network (OTN), Chapter - Createfrom an XML-Configured High-Performance Transformation getting 21 feedback a broad spectrum of developers looking for XML Engine functionality. Productizing Oracle’s XML Part V - Oracle XML for C++ Developers infrastructure for external use meant that we had to develop a license. At that time the only Oracle licenses available Chapter 22 - Getting Started with Oracle XML and C++ were either a product license that limited usage to one’s own deployment or a development one that forbid Chapter 23 - Build an XML Database C++for Application deployment. Neither of these madeOCI sense a software development kit that we weren’t charging for and wanted Chapter - Building an XMLseriously. Data-Retrieval Application people 24 to develop against We were able to successfully navigate Oracle’s legal system to create a Part VI - Oracle XML for PL/SQLlicense Developers deployment and redistribution for the XDK that exists to this day. Chapter 19 - Building an XML-Managed Application
Chapter 25 - Getting Started with Oracle XML and PL/SQL
The license wasn’t enough weServices were looking for serious enterprise-level development and deployments. We Chapter 26 - Building PL/SQL as Web needed27 support as well. Therefore we again successfully Chapter - Extending PL/SQL XML Functionality with Java negotiated to have the XDK be included as part of the
Oracle server support contracts for the database, application server, and tools at the same service level at no additional charge. Additionally, we were able to offer standalone support agreements for non-Oracle customers. Appendix - XML Standards Bodies and Open Specifications Finally, for those who could not afford or did not need formal support, we opened a support forum on OTN, which Glossary has rapidly grown to six forums that we directly support. Over the last five years we have released both beta and Index production XDKs at roughly three month intervals. Beta versions have a time-based development-only license but List of Figures the production releases have the full redistribution license. Chapter 28 - Putting It All Together
List of Tables
List Finally of Sidebars we come to this book. While this is the third book for two of us, it represents a totally different effort from the
previous Oracle XML Handbook and Oracle9i XML Handbook. Those previous editions provided a survey of Oracle and XML and in-depth discussions about the XDK. This edition is totally rewritten with almost all new content. While the previous editions came with CDs, this one does not for two very important reasons. First, all the code in the book will be downloadable from the Oracle Press web site. As distinct from a CD, this allows us to update it should any bugs appear. In the previous editions we provided Oracle software on the CD; however, it forced us to include only Oracle software, so we made most of the code available on OTN. This had the unanticipated effect of lessening the book’s value in some reader’s minds. This edition does not suffer under those limitations, so you will find more original and innovative content and all of the code available for download.
The book is divided into six parts and is organized to be accessible by managers, DBAs, and developers alike. Part I includesChapters 1 through 7 and focuses on the family of XML standards that are important to Oracle and that Oracle when Database 10g XML & SQL: Design, Build & Manage XML Applications in Java, C, C++ should be considered designing XML-enabled solutions. These not only discuss the common standards of & PL/SQL DOM, SAX, XSLT, and XML Schema, but venture into new standards, some of which are not complete, such as ISBN:0072229527 by Mark V. Scardina, Ben ChangThese and Jinyu Wangare not intended to be comprehensive in their XML Query, XML Pipeline, StAX, and JAXB. chapters McGraw-Hill/Osborne © 2004 (600 pages) coverage, as whole books have been written on many of them. They do intend to give you a good feel for the This comprehensive guide utilizing XML technologies withinguidance Oracle's XML-enabled products, with functionality offered and to compare andfocuses contrastonsimilar standards thus providing in their optimum usage. emphasis on XML standards, their usage and best practices.
Part II includes Chapters 8 through 12 and focuses on XML and the Oracle database. Beginning in Oracle9i Release 2, native XML support was introduced along with significant XML functionality integrated into other database features Table of Contents such as Oracle Text and Advanced Queuing. These chapters provide an in-depth look at this functionality and its Oracle Database 10g XML & SQL—Design, Build & Manage XML Applications in Java, C, C++ & PL/SQL evolution into Oracle Database 10g. After getting started in Chapter 8, the chapters are arranged along task lines Introduction such as storing XML, retrieving and generating XML, searching and querying XML, and managing the Oracle XML Part I - Oracle and the XML Standards DB. These chapters are designed to be accessible to both developers and DBAs. Chapter 1
- Introducing XML
Chapter - Accessing XML with SAX,13 JAXB, and StAX Parts III2 through VI consists of DOM, Chapters through 28 and focus on how to use Oracle’s XML technology for real Chapter 3 - development. Transforming XML with XSLT and application These chapters areXPath split into Oracle’s major development languages of Java, C, C++, and Chapter 4 Each - Validating XMLbegins with DTDs XML Schemas PL/SQL. language with aand getting started chapter covering environment, IDE setup, runtime setup, and Chapter so on. The 5 - subsequent XML Operations chapters with XQuery in these parts discuss real-use case application scenarios. In many instances,
these were drawn from actual projects. While they include extensive source code, each example is Chapter 6 - XML Messaging andcustomer RPC with SOAP explained detail and code iswith available for download fromXSQL Oracle Press. Chapter 7 -inPutting It Allthe Together XML Pipeline, JSPs, and Part II - Oracle XML Management for DBAs
This book was written during the development of Oracle Database 10g and as such could not have been completed - Getting Started with the Oracle XML Database without the help of many within Oracle. The authors wish to especially thank the following:
Chapter 8 Chapter 9
- Storing XML Data
Chapter 10 - Generating and Retrieving XML
K Karun Chapter 11 - Searching XML Data
Tomas Saulys
Chapter 12 - Managing the Oracle XML Database Bill Han Anjana Manian
Tim Yu Meghna Mehta
Part III - Oracle XML for Java Developers
Kongyi Stanley Chapter 13Zhou - Getting Started with Oracle XML and Guan Java
Ian Macky
Chapter 14Lenkov - Building an XML-Powered Web Site Novoselsky Dimitry Anguel
Mark Drake
Chapter 15 - Creating a Portal Site with XML and Web Services
Stephen Buxton
Asha Tarachandani
Chapter 16 - Developing an XML Gateway Application with SOAP and AQ Chapter - Developing XML-Based Reusable Components Nipun17 Agarwal Jim Warner Part IV - Oracle XML for C Developers
Bhushan.Khaladkar
Ravi Murthy Olivier LeDiouris
Dan Chiba
Chapter 18 - Getting Started with Oracle XML and C Chapter 19 - Building an XML-Managed Application
Chapter 20 - Build an XML Database OCI Application Chapter 21 - Create an XML-Configured High-Performance Transformation Engine Part V - Oracle XML for C++ Developers
Chapter 22 - Getting Started with Oracle XML and C++ Chapter 23 - Build an XML Database OCI C++ Application Chapter 24 - Building an XML Data-Retrieval Application Part VI - Oracle XML for PL/SQL Developers
Chapter 25 - Getting Started with Oracle XML and PL/SQL Chapter 26 - Building PL/SQL Web Services Chapter 27 - Extending PL/SQL XML Functionality with Java Chapter 28 - Putting It All Together Appendix
- XML Standards Bodies and Open Specifications
Glossary Index List of Figures List of Tables List of Sidebars
Oracle Database 10g XML & SQL: Design, Build & Manage XML Applications in Java, C, C++ & Part I: Oracle and the XML Standards PL/SQL by Mark V. Scardina, Ben Chang and Jinyu Wang McGraw-Hill/Osborne © 2004 (600 pages)
ISBN:0072229527
Chapter List
This comprehensive guide focuses on utilizing XML technologies within Oracle's XML-enabled products, with emphasis on XML standards, their usage and best practices.
Chapter 1: Introducing XML
Table of Contents
OracleChapter Database XML & SQL—Design, Build & Manage in Java, C, C++ & PL/SQL 2: 10g Accessing XML with DOM, SAX, JAXB, XML and Applications StAX Introduction
Transforming XML with Part IChapter - Oracle 3: and the XML Standards
XSLT and XPath
Chapter 1
- Introducing XML
Chapter 2
- Accessing XML with DOM, SAX, JAXB, and StAX
Chapter 4: Validating XML with DTDs and XML Schemas
Chapter 3 - Transforming XML with XSLT and XPath Chapter 5: XML Operations with XQuery Chapter 4
- Validating XML with DTDs and XML Schemas Chapter 6: XML Messaging and RPC with SOAP Chapter 5 - XML Operations with XQuery Chapter 6
- XML Messaging and RPC with SOAP Chapter 7: Putting It All Together with XML Pipeline, JSPs, and XSQL
Chapter 7
- Putting It All Together with XML Pipeline, JSPs, and XSQL
Part II - Oracle XML Management for DBAs
Chapter 8
- Getting Started with the Oracle XML Database
Chapter 9
- Storing XML Data
Chapter 10 - Generating and Retrieving XML Chapter 11 - Searching XML Data Chapter 12 - Managing the Oracle XML Database Part III - Oracle XML for Java Developers
Chapter 13 - Getting Started with Oracle XML and Java Chapter 14 - Building an XML-Powered Web Site Chapter 15 - Creating a Portal Site with XML and Web Services Chapter 16 - Developing an XML Gateway Application with SOAP and AQ Chapter 17 - Developing XML-Based Reusable Components Part IV - Oracle XML for C Developers
Chapter 18 - Getting Started with Oracle XML and C Chapter 19 - Building an XML-Managed Application Chapter 20 - Build an XML Database OCI Application Chapter 21 - Create an XML-Configured High-Performance Transformation Engine Part V - Oracle XML for C++ Developers
Chapter 22 - Getting Started with Oracle XML and C++ Chapter 23 - Build an XML Database OCI C++ Application Chapter 24 - Building an XML Data-Retrieval Application Part VI - Oracle XML for PL/SQL Developers
Chapter 25 - Getting Started with Oracle XML and PL/SQL Chapter 26 - Building PL/SQL Web Services Chapter 27 - Extending PL/SQL XML Functionality with Java Chapter 28 - Putting It All Together Appendix
- XML Standards Bodies and Open Specifications
Glossary Index List of Figures List of Tables List of Sidebars
Database 10g XML & SQL: Design, Build & Manage XML Applications in Java, C, C++ & ChapterOracle 1: Introducing XML PL/SQL by Mark V. Scardina, Ben Chang and Jinyu Wang
ISBN:0072229527
Extensible Markup Language (XML) is a meta-markup language, meaning that the language, as specified by the McGraw-Hill/Osborne © 2004 (600 pages) World Wide Web Consortium’s (W3C) XML 1.0 specification, enables users to define their own markup languages to This comprehensive guide focuses on utilizing XML technologies within Oracle's XML-enabled products, with describe and encapsulate data into XML files. These files can then be transformed into HTML (as well as into any emphasis on XML standards, their usage and best practices. other markup language) and displayed within browsers such as Netscape Navigator and Microsoft Internet Explorer, exchanged across the Internet between applications and businesses, or stored in and retrieved from databases. The Table of of Contents power XML comes from its simplicity, its being part of an open standard, and the incorporation of user-defined Oracle Database 10g XML & SQL—Design, Build & Manage markup tags that lend semantics to the embedded data.XML Applications in Java, C, C++ & PL/SQL Introduction
XML’s originsand come Standard Part I - Oracle thefrom XMLthe Standards
Generalized Markup Language (SGML)—ratified by the International
Standards (ISO) in 1986—on which Hypertext Markup Language (HTML), created in 1990, is based. Chapter 1 -Organization Introducing XML While SGML is still a widely used standard in theand document Chapter 2 - Accessing XML with DOM, SAX, JAXB, StAX world, and HTML is still widely used as the basis of millions3of -web pages on XML the World Wideand Web, XML is rapidly gaining widespread acceptance because of its Chapter Transforming with XSLT XPath
advantages in data exchange, storage, and description over the existing markup languages. Since the publication of - Validating XML with DTDs and XML Schemas its v1.0 specifications by the W3C in February 1998, XML has been widely seen as the language and data Chapter 5 - XML Operations with XQuery interchange of choice for e-commerce. Chapter 4 Chapter 6
- XML Messaging and RPC with SOAP
Chapter 7
- Putting It All Together with XML Pipeline, JSPs, and XSQL
What Is an XML Document?
Part II - Oracle XML Management for DBAs
Chapter 8
- Getting Started with the Oracle XML Database
While this book is not meant to be a full XML tutorial, as with any standard, numerous concepts and technical terms Chapter 9 - Storing XML Data need to be explained. Because XML was developed to convey data, a relevant example is a data record of a book Chapter 10 - Generating and Retrieving XML listing from a standard database. A complex SQL query could return data in the following format: Chapter 11 - Searching XML Data
History of Interviews, Juan, Smith, 99999-99999, Oracle Press, 2003.
Chapter 12 - Managing the Oracle XML Database Part III - Oracle XML for Java Developers
If XML is used as the output form, however, this record now has additional context for each piece of data, as
Chapter 13 -in Getting Started with Oracle XML and Java evidenced the following: Chapter 14 - Building an XML-Powered Web Site
History of Interviews Chapter 16 - Developing an XML Gateway Application with SOAP and AQ Chapter 17 - Developing XML-Based Reusable Components Juan Part IV Oracle XML for C Developers Smith Chapter 18 - Getting Started with Oracle XML and C Chapter 19 - Building an XML-Managed Application 99999-99999 Chapter 20 - Build an XML Database OCI Application Oracle Press Chapter 21 Create an XML-Configured High-Performance Transformation Engine 2003 Part10.00 Chapter 22 - Getting Started with Oracle XML and C++ Chapter 15 - Creating a Portal Site with XML and Web Services
Chapter 23 - Build an XML Database OCI C++ Application
Certain24 items of noteaninXML this Data-Retrieval example are explored in detail later. Notice that the file has symmetry, and each piece of Chapter - Building Application dataVIhas its context enclosing in the form Part - Oracle XML for PL/SQLitDevelopers
… . The angle brackets and text inside are called tags, and each set of tags and its enclosed data is called an element. This relationship can be thought of as similar Chapter 25 - Getting Started with Oracle XML and PL/SQL to a column in a database table in which the text of the tag is the column heading and the text between the tags is Chapter 26 - Building PL/SQL Web Services the data from a row in that column. In the preceding example, title could be the name of the column and History of Chapter 27 - Extending PL/SQL XML Functionality with Java Interviews could be the data in a row. Chapter 28 - Putting It All Together
Appendix - XML Bodies and tags Openinstead Specifications Notice, too, that Standards several tags contain of data. This is a significant feature of XML, which permits nesting Glossary of data to define relationships better. Returning to the database metaphor, the tag could be modeled as a Index table whose columns were and . In XML terminology, these column tags are referred to as
children of the parent tag. List of Figures List of Tables
Now look at the tag and you see that it includes text of the form name=“value”. These name-value pairs are called attributes, and one or more of these can be included in the start tag of any element. Attributes, however, are not legal in end tags (for example, ). Notice that attribute values must be framed by quotes (single or double, as long as the closing and opening quotes are the same) as specified by SGML. HTML is much more permissive in this area.
List of Sidebars
One final terminology note: the entire XML example is enclosed by … . These tags are defined as theroot of the document, and only one may exist in any particular document. XML documents that follow these rules of having only one root and properly closing all open tags are considered well formed.
XML’s basic concepts and terminology are straightforward and are formalized in an open Internet standard. As the W3C XML 1.0 specification states, “XML documents are made up of storage units called entities, which contain either parsed data or unparsed data [or PCDATA] up of characters, someinofJava, whichC,form Oracle Databasedata. 10g Parsed XML & SQL: Design, Buildis&made Manage XML Applications C++ & character data,PL/SQL and some of which form markup. Markup encodes a description of the document’s storage layout and logical structure.” documents and logical structure. The physical structure of the XML ISBN:0072229527 by MarkXML V. Scardina, Ben have Changboth andphysical Jinyu Wang document simply refers to the XML file and(600 thepages) other files that it may import, whereas the logical structure of an XML McGraw-Hill/Osborne © 2004 document refers to comprehensive the prolog and guide the body of the This focuses ondocument. utilizing XML technologies within Oracle's XML-enabled products, with emphasis on XML standards, their usage and best practices.
The XML of the book example represents the body of an XML document, but it is missing important information that helps identify its nature. This information is in the prolog, discussed in the following section.
Table of Contents
Oracle Database 10g XML & SQL—Design, Build & Manage XML Applications in Java, C, C++ & PL/SQL
The Prolog
Introduction
Part I - Oracle and the XML Standards
Theprolog consists of the XML declaration (that is, the version number), a possible language encoding hint, other - Introducing XML attributes (name-value pairs), and an optional grammar or data model specified by either an XML Schema Definition Chapter 2 Accessing XML DOM, SAX, JAXB, and StAX (XSD) or a- Document Typewith Definition (DTD) referred to by a URL. The prolog may also contain the actual XSD or Chapter 3 example - Transforming XML with XSLT XPathDTD would look like the following: DTD. An with a reference to anand external Chapter 1
Chapter 4
- Validating XML with DTDs and XML Schemas
- XML Operations with XQuery
Chapter 5 Chapter 6
- XML Messaging and RPC with SOAP
Chapter 7 a - Putting It All Together with Pipeline,of JSPs, and XSQL Note that line containing is XML an example an XML processing instruction (PI). In this example, xml is the Part II -ofOracle XMLPI. Management name the XML In addition,for theDBAs character
set encoding supported in the example is a compressed version of
Chapter Unicode 8 called - Getting UTF-8. Started While with XML theprocessors Oracle XML usually Database detect the encoding from the first 3 bytes in the file, this
declaration be used as a hint to indicate the expected encoding. Finally, the standalone attribute refers to Chapter 9 - can Storing XML Data whether10the processor and needs to include or import other external files. Chapter - Generating Retrieving XML Chapter 11 - Searching XML Data
The second line of this prolog refers to a DOCTYPE. This is where the declaration of the grammar or data model for this XML document is done. Why is this important? Remember, an XML file has both physical and logical Part III - Oracle XML for Java Developers representations. In some applications, it may be sufficient to process the XML without knowing whether information Chapter 13 - Getting Started with Oracle XML and Java is missing, but most of the time, an application wants to validate the XML document it receives to confirm everything Chapter 14 - Building an XML-Powered Web Site is there. To do this, the application must know which elements are required, which ones can have children, which Chapter 15 have - Creating a Portal Site XML and Web Services ones can attributes, and sowith forth. In XML terms, the grammar or data model in this example is referred to as Chapter 16 -DTD Developing an XML Gateway Application SOAP be and AQ DTD. This can reside within the XML file itselfwith or simply referred to so that the processor can locate it, as in Chapter 17 - Developing XML-Based Reusable Components this example. Chapter 12 - Managing the Oracle XML Database
Part IV - Oracle XML for C Developers
The preceding example might as follows with Chapter 18 - Getting Started withlook Oracle XML and C an XML Schema declaration: Chapter - Building an XML-Managed Application Chapter Chapter 21 - Create an XML-Configured High-Performance Transformation Engine Part V - Oracle XML for C++ Developers
To begin note Started that thewith XMLOracle Schema Chapter 22with, - Getting XMLdeclaration and C++ has a prefix xsd:, which is associated with the XML Schema
namespace through the declaration xmlns:xsd=“http://www.w3.org/ 2001/XMLSchema”. This prefix is used on the names of the data types defined in the referenced XSD to differentiate them from others using the same name. Chapter 24 - Building an XML Data-Retrieval Application Thexsd:schemadeclaration denotes the beginning of this XML Schema incorporated in this XML document, along Part VI - Oracle XML for PL/SQL Developers with one other declaration, xmlns:bk=“http://www.mypublishsite.com/books”,whichdefines the namespace of Chapter 25 - Getting Started with Oracle XML and PL/SQL the prefix bk: so asto identify these types as defined by the author of this data model. Chapter 23 - Build an XML Database OCI C++ Application
Chapter 26 - Building PL/SQL Web Services
Chapter 27 -that Extending PL/SQL XML Functionality Java Note also the schema declaration is within with the tag instead of in the prolog. This is a distinct difference Chapter 28XSDs - Putting All Together between andItDTDs. Thus, the XML schema declaration is an attribute of the root element of the document Appendix and is part- of XML theStandards body, which Bodies we discuss and Open next. Specifications Glossary
The Body
Index
List of Figures
List Theofroot Tables element, which contains the remainder of the XML document, follows the prolog and is called the body of
theofXML document. This part is composed of elements, processing instructions, content, attributes, comments, List Sidebars entity references, and so forth. As previously mentioned, elements must have start tags and corresponding end tags nested in the correct order; otherwise, the XML document is not well-formed, and XML parsers may signal errors because of this. Elements can also have attributes, or name-value pairs, such as . Built-in attributes defined by the XML 1.0 specification also exist, such as xml:space=“preserve” to indicate that the whitespace between the elements be considered as data and thus preserved. Entity references, defined only in DTDs, are similar to macros in that entities are defined once, and references to
them, such as &nameofentity, can be used in place of their entire definitions. For example, in a DTD, could bedeclared, and then &Copyright could be Database used as a shortcut the XML document. An XML XMLApplications parser must recognize entities Oracle 10g XMLthroughout & SQL: Design, Build & Manage in Java, C, C++ & defined in DTDs, even though the validity check may be turned off and an additional XML Schema is specified. PL/SQL Again, built-in entities exist as defined by the specifications, such as those for the ampersand, & ISBN:0072229527 by Markalso V. Scardina, Ben Chang andXML Jinyu1.0 Wang apostrophe, ' less than, < and so (600 forth. Comments are recognized when they are enclosed in the McGraw-Hill/Osborne © 2004 pages) construct. This comprehensive guide focuses on utilizing XML technologies within Oracle's XML-enabled products, with emphasis on XML standards, their usage and best practices.
Within the body of the XML document instance, certain element and attribute names may have prefixes, which are XML namespaces identified by Uniform Resource Identifier (URI) references that qualify the names of these Table of Contents elements and attributes and locate resources that could be on different machines or XML documents. For example, Oracle 10g XML & SQL—Design, Build & Manage XML Applications in Java, C, & PL/SQL if the Database declaration xmlns:bk=“http:// www.mypublishsite.com/books” is made in C++ a parent element, the prefix Introduction bk:title stands for http:// www.mypublishsite.com/books:title. You can use identical names for either elements Part I - Oracleifand Standards or attributes theythe areXML qualified with URIs to differentiate the names. For example, bk:hello is called a qualified Chapter 1 Introducing XML name; the namespace prefix bk is mapped to the URI, http://www.mypublishsite.com/books, and the local part is Chapter 2 - Accessing XML with DOM, SAX, JAXB, and StAX hello. Note that URI references can contain characters not allowed in element names; that is why bk serves as a Chapter substitute 3 -for Transforming the URI. It isXML important with XSLT to mention and XPath that the bk prefix belongs to the document in which it is declared. Another4 document declaring theDTDs prefix book of bk but referencing the same URI would be considered Chapter - Validating XML with and XMLinstead Schemas equivalent parsed by with an XML parser. Chapter 5 -when XML Operations XQuery Chapter 6
- XML Messaging and RPC with SOAP
Finally, the body may contain character data (CDATA) sections to mark off blocks of text that would otherwise be - Putting It All Together with XML Pipeline, JSPs, and XSQL regarded as markup, comments, entity references, processing instructions, and so forth. The CDATA syntax is
Chapter 7
Part II - Oracle XML Management for DBAs
Chapter 8 - Getting Started with the Oracle , Database Chapter 9
- Storing XML Data
These sections are simply skipped by XML parsers as if they were opaque. Later in the book, you will see how you use them to embed SQL statements in XML documents.
Chapter 10 - Generating and Retrieving XML Chapter 11 - Searching XML Data
Chapter Thus, the 12 body - Managing of the the XML Oracle document XML Database contains the root element with its schema declarations, child and sibling Part nodes, III -elements, Oracle XML attributes, for Java Developers text nodes that
represent the textual content of an element or attribute, and CDATA
sections. Chapter 13 - Getting Started with Oracle XML and Java Chapter 14 - Building an XML-Powered Web Site Chapter 15 - Creating a Portal Site with XML and Web Services Chapter 16 - Developing an XML Gateway Application with SOAP and AQ Chapter 17 - Developing XML-Based Reusable Components Part IV - Oracle XML for C Developers
Chapter 18 - Getting Started with Oracle XML and C Chapter 19 - Building an XML-Managed Application Chapter 20 - Build an XML Database OCI Application Chapter 21 - Create an XML-Configured High-Performance Transformation Engine Part V - Oracle XML for C++ Developers
Chapter 22 - Getting Started with Oracle XML and C++ Chapter 23 - Build an XML Database OCI C++ Application Chapter 24 - Building an XML Data-Retrieval Application Part VI - Oracle XML for PL/SQL Developers
Chapter 25 - Getting Started with Oracle XML and PL/SQL Chapter 26 - Building PL/SQL Web Services Chapter 27 - Extending PL/SQL XML Functionality with Java Chapter 28 - Putting It All Together Appendix
- XML Standards Bodies and Open Specifications
Glossary Index List of Figures List of Tables List of Sidebars
OracleXML Database 10g XML & SQL: Design, Build & Manage XML Applications in Java, C, C++ & Well-Formed Documents PL/SQL
by Mark V. Scardina, Ben Changis and Wang As mentioned previously, an XML document wellJinyu formed if only one root exists and all start tags have ISBN:0072229527 © 2004nesting. (600 pages) corresponding McGraw-Hill/Osborne end tags, with the correct For example, the following is not well formed: This comprehensive guide focuses on utilizing XML technologies within Oracle's XML-enabled products, with emphasis on XML standards, their usage and best practices. History of Interviews Table of Contents Oracle Juan Database 10g XML & SQL—Design, Build & Manage XML Applications in Java, C, C++ & PL/SQL Smith Introduction Part I -99999-99999 Oracle and the XML Standards Oracle Chapter 1 - Introducing XML Press 2003 Chapter 2 - Accessing XML with DOM, SAX, JAXB, and StAX 10.00 Chapter 3 - Transforming XML with XSLT and XPath Chapter 4 - Validating XML with DTDs and XML Schemas Chapter 5 - XML Operations with XQuery Chapter 6 - XML Messaging and RPC with SOAP … Chapter 7 - Putting It All Together with XML Pipeline, JSPs, and XSQL Part II - Oracle XML Management for DBAs
Chapter 8 - Getting Started withwhy theitOracle The following are the reasons is not XML well Database formed: Chapter 9
- Storing XML Data
Two exists, bookcatalog bookcatalog2. Chapter 10roots - Generating and Retrievingand XML Chapter 11 - Searching XML Data
The tagdoes not have a correct corresponding end tag, as in .
Chapter 12 - Managing the Oracle XML Database Part III - Oracle for Java is Developers The end tagXML not nested
correctly, because the end tag is after it instead of before it.
Chapter 13 - Getting Started with Oracle XML and Java
XML parsers will reject this documentWeb without Chapter 14 - Building an XML-Powered Site further processing. Chapter 15 - Creating a Portal Site with XML and Web Services Chapter 16 - Developing an XML Gateway Application with SOAP and AQ Chapter 17 - Developing XML-Based Reusable Components Part IV - Oracle XML for C Developers
Chapter 18 - Getting Started with Oracle XML and C Chapter 19 - Building an XML-Managed Application Chapter 20 - Build an XML Database OCI Application Chapter 21 - Create an XML-Configured High-Performance Transformation Engine Part V - Oracle XML for C++ Developers
Chapter 22 - Getting Started with Oracle XML and C++ Chapter 23 - Build an XML Database OCI C++ Application Chapter 24 - Building an XML Data-Retrieval Application Part VI - Oracle XML for PL/SQL Developers
Chapter 25 - Getting Started with Oracle XML and PL/SQL Chapter 26 - Building PL/SQL Web Services Chapter 27 - Extending PL/SQL XML Functionality with Java Chapter 28 - Putting It All Together Appendix
- XML Standards Bodies and Open Specifications
Glossary Index List of Figures List of Tables List of Sidebars
Database 10g XML & SQL: Design, Build & Manage XML Applications in Java, C, C++ & Valid XMLOracle Documents PL/SQL
by Mark V. Scardina, Ben Chang Jinyu Wang DTD or XML Schema, meaning that theISBN:0072229527 A valid XML document is one that conforms to and either a specified elements, McGraw-Hill/Osborne © 2004 (600 pages)in the XML document are the same as the ones specified in the attributes, structural relationships, and sequences DTD or XML Schema. For example, the focuses following is valid respect towithin the DTD, which follows it: products, with This comprehensive guide onXML utilizing XMLwith technologies Oracle's XML-enabled emphasis on XML standards, their usage and best practices. Table of Contents History of Interviews Oracle Database 10g XML & SQL—Design, Build & Manage XML Applications in Java, C, C++ & PL/SQL Juan Introduction Part ISmith - Oracle and the XML Standards Chapter 1 - Introducing XML 99999-99999 Chapter 2 - Accessing XML with DOM, SAX, JAXB, and StAX Oracle Press Chapter 3 - Transforming XML with XSLT and XPath 2003 Chapter 4 - Validating XML with DTDs and XML Schemas 10.00 Chapter 5 - XML Operations with XQuery Chapter 6 - XML Messaging and RPC with SOAP Chapter 7
- Putting It All Together with XML Pipeline, JSPs, and XSQL
Part - Oracle is XML forthe DBAs TheIIfollowing theManagement DTD to which XML
Chapter 8
document conforms:
- Getting Started with the Oracle XML Database
- Storing XML Data Chapter 10 - Generating and Retrieving XML Part III - Oracle XML for Java Developers Chapter 13 - Getting Started with Oracle XML and Java Chapter 14 - Building an XML-Powered Web Site Chapter 15 - Creating a Portal Site with XML and Web Services Chapter 16 - Developing an XML Gateway Application with SOAP and AQ Chapter 17 Developing XML-Based Reusable Components Part Chapter 18 - Getting Started with Oracle XML and C Chapter 19 Building an XML-Managed Application Chapter 20 - Buildprice an XMLtype Database OCI Application Chapter ]> 21 - Create an XML-Configured High-Performance Transformation Engine Part V - Oracle XML for C++ Developers Chapter 22 - Getting Started with Oracle XML and C++ History ofDatabase Interviews Chapter 23 - Build an XML OCI C++ Application Chapter 24 - Building an XML Data-Retrieval Application Part VI - Oraclename>Juan element contains all of the elements, attributes, and text within the document. Such an element is called the root element. Only one root element may exist within an XML document. The root element marks the beginning of the document and is considered the parent of all the other elements, which are nested within its start tag and end tag. For XML documents to be considered “valid” with respect to this DTD, the root element must be the first element to start off the body of the XML document. Following this is the element declaration, which stipulates the child elements that must be nested within the root
element , the content model for the root element. Note that all the child elements of are explicitly called out in its element declaration, and author has a + as a suffix. This is an example of the Extended Backus-Naur Format that10g canXML be used for Design, describing the & content model. allowed suffixes are Oracle(EBNF) Database & SQL: Build Manage XML The Applications in Java, C, C++ & PL/SQL
? For 0 or 1 occurrence
ISBN:0072229527 by Mark V. Scardina, Ben Chang and Jinyu Wang McGraw-Hill/Osborne © 2004 (600 pages) * For 0 or more occurrences This comprehensive guide focuses on utilizing XML technologies within Oracle's XML-enabled products, with on XML standards, their usage and best practices. + For 1 or emphasis more occurrences
Note also the use of #PCDATA to declare that the element text must be non-marked-up text, and the price’s required attribute values are explicitly declared. The difference between CDATA and PCDATA is that CDATA Oracle Database 10g XML & SQL—Design, Build & Manage XML Applications in Java, C, C++ & PL/SQL sections are simply skipped by the parser and aren’t checked for well-formedness; hence, they can be viewed as Introduction non-parsed character data.
Table of Contents
Part I - Oracle and the XML Standards
Chapter - Introducing A DTD 1in an external fileXML can also be used. In this case only a reference is embedded in the XML document as this Chapter 2 Accessing XML with DOM, other version of the booklist.xml file.SAX, JAXB, and StAX Chapter - Transforming XML with XSLT and XPathstandalone="no" ?> Chapter 19 - Building an (title, XML-Managed Application Chapter 20 Build an XML Database OCI Application Chapter 21 - Create an XML-Configured High-Performance Transformation Engine Part Chapter 22 - Getting Started with Oracle XML and C++ Chapter 23 - BuildISBN an XML Database OCI C++ Application Chapter Application Part Chapter 25 - Getting Started with Oracle XML and PL/SQL Chapter 26 - Building PL/SQL Web Services Chapter 18 - Getting Started with Oracle XML and C
Chapter 27 - Extending PL/SQL XML Functionality with Java Chapter 28 - Putting It All Together
When it comes to validating XML documents, functionally these two methods are the same.
Appendix
- XML Standards Bodies and Open Specifications
Glossary Index List of Figures List of Tables List of Sidebars
10g DTDs XML & SQL: Design, Build & Manage XML Applications in Java, C, C++ & ValidatingOracle XMLDatabase Against PL/SQL
by parser, Mark V. by Scardina, and Jinyu according Wang A validating XML parsingBen the Chang XML document to the rules specified in the DTD, triesISBN:0072229527 to McGraw-Hill/Osborne © 2004 (600 determine whether the document conforms to pages) the DTD (valid), meaning that the structural relationships and sequences areThis the comprehensive same. Depending onfocuses the implementation of the parser, if an errorOracle's is encountered during guide on utilizing XML technologies within XML-enabled products, with emphasis on stop, XML standards, their usage and bestprocessing, practices. or continue with internal corrections. validation, processing may as in “panic mode” exception Warnings or errors may be reported either as processing occurs or at the very end of the processing. Finally, most processors have a mode whereby validation can be turned off; however, with DTDs, certain constructs defined in Table of Contents DTDs not discussed here, such as entityBuild definitions, must still be processed. Oracle Database 10g XML & SQL—Design, & Manage XML Applications in Java, C, C++ & PL/SQL Introduction Part I - Oracle and the XML Standards
Chapter 1
- Introducing XML
Chapter 2
- Accessing XML with DOM, SAX, JAXB, and StAX
Chapter 3
- Transforming XML with XSLT and XPath
Chapter 4
- Validating XML with DTDs and XML Schemas
Chapter 5
- XML Operations with XQuery
Chapter 6
- XML Messaging and RPC with SOAP
Chapter 7
- Putting It All Together with XML Pipeline, JSPs, and XSQL
Part II - Oracle XML Management for DBAs
Chapter 8
- Getting Started with the Oracle XML Database
Chapter 9
- Storing XML Data
Chapter 10 - Generating and Retrieving XML Chapter 11 - Searching XML Data Chapter 12 - Managing the Oracle XML Database Part III - Oracle XML for Java Developers
Chapter 13 - Getting Started with Oracle XML and Java Chapter 14 - Building an XML-Powered Web Site Chapter 15 - Creating a Portal Site with XML and Web Services Chapter 16 - Developing an XML Gateway Application with SOAP and AQ Chapter 17 - Developing XML-Based Reusable Components Part IV - Oracle XML for C Developers
Chapter 18 - Getting Started with Oracle XML and C Chapter 19 - Building an XML-Managed Application Chapter 20 - Build an XML Database OCI Application Chapter 21 - Create an XML-Configured High-Performance Transformation Engine Part V - Oracle XML for C++ Developers
Chapter 22 - Getting Started with Oracle XML and C++ Chapter 23 - Build an XML Database OCI C++ Application Chapter 24 - Building an XML Data-Retrieval Application Part VI - Oracle XML for PL/SQL Developers
Chapter 25 - Getting Started with Oracle XML and PL/SQL Chapter 26 - Building PL/SQL Web Services Chapter 27 - Extending PL/SQL XML Functionality with Java Chapter 28 - Putting It All Together Appendix
- XML Standards Bodies and Open Specifications
Glossary Index List of Figures List of Tables List of Sidebars
Oracle Database XML & SQL: Design, Build & Manage XML Applications in Java, C, C++ & Introducing the XML 10g Schema Language PL/SQL
by Mark V. Scardina, Ben Chang andSchema Jinyu Wang In February 1999, a W3C Note detailing the XML Working Group’s XML Schema requirements ISBN:0072229527 was © 2004 (600 pages) published. ThisMcGraw-Hill/Osborne document, titled “XML Schema Requirements,” includes an overview, purpose, usage scenarios, design principles, the structural, datatype, conformance requirements for the XML Schema language. Thisand comprehensive guide focusesand on utilizing XML technologies within Oracle's XML-enabled products, with emphasis on XML standards, their usage and best practices.
The“Overview” section states that the XML Schema Working Group, by charter, is assigned to look into a more informative constraint on the XML document than is provided by DTDs, namely one that would also, among other Table of Contents things: Oracle Database 10g XML & SQL—Design, Build & Manage XML Applications in Java, C, C++ & PL/SQL Introduction Support both primitive and complex datatypes Part I - Oracle and the XML Standards
Support restrictionsXML or extensions on datatypes Chapter 1 - Introducing Chapter 2
- Accessing XML with DOM, SAX, JAXB, and StAX
Chapter 3
- Transforming XML with XSLT and XPath
Be written in XML
Chapter 4 - Validating DTDssnippet and XML For example, considerXML the with following ofSchemas a DTD: Chapter 5
- XML Operations with XQuery
Chapter 6 - XML Messaging and RPC with SOAP Chapter 7 - Putting It All(#PCDATA)> Together with XML Pipeline, JSPs, and XSQL
Chapter 8 - Getting with the Oracle XML Database Chapter 9
- Storing XML Data
Chapter 10 - Generating and Retrieving XML
This could in XML format as the following XSD file: Chapter 11 -appear Searching XML Schema Data Chapter - Managing the Oracle XML Database Part Chapter 13 - Getting Started with Oracle XML and Java Chapter 14 - Building an XML-Powered Web Site Site with XML and Web Services Possible XML Schema of a with DTD SOAP shown Chapter 16 - Developing an XMLequivalent Gateway Application andin AQListing 1. Chapter 17 - Developing XML-Based Reusable Components Part IV - Oracle XML for C Developers Chapter 19 - Building an XML-Managed Application Chapter 21 - Create an XML-Configured High-Performance Transformation Engine Chapter 22 - Getting Started with Oracle XML and C++ 23 - Build an XML Database OCI C++ Application Chapter 24 - Buildingname="Book"/> an XML Data-Retrieval Application Appendix