<a name="521"></a><a name="wbp15ch13P1"></a>Chapter 13: Getting Started with Oracle XML and Java - Perl Cd Bookshelf [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Perl Cd Bookshelf [Electronic resources] - نسخه متنی

Mark V. Scardina, Ben ChangandJinyu Wang

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Chapter 13: Getting Started with Oracle XML and Java

The previous chapters introduced the overall XML functionality provided by the Oracle XDK and Oracle Database 10g. Over the next several chapters, you will learn how to actually develop applications in Java with these products by exploring sample applications derived from actual Oracle customer use cases. To get the greatest benefit from the following chapters, you need to be familiar with the Oracle XDK Java libraries, the JDK environment (both within and without the database), and how to use the XDK with Oracle JDeveloper 10g. This chapter provides a general overview of these topics. This chapter supplements the Getting_Started_Javal documentation provided with the Oracle XDK within the $XDK_HOME\xdk\doc\java directory either in the OTN distribution or in the Oracle XML Application Developer’s Guide included with the Oracle Database 10g release.


The Oracle XDK Java Libraries


Although you learned about the Oracle XDK functionality in the previous chapters, you may not know where all the XDK components are stored, because the XDK is packaged within a set of JAR files that combine functions. The XDK components are delivered in the \lib directory of the OTN distribution and the ORACLE_HOME\lib directory. There is an additional JAR called orai18n.jar in the corresponding ORACLE_HOME\jlib directories. The following is a functional description of each.


xmlparserv2.jar


The xmlparserv2.jar is much more than its name implies, though it started life in Oracle8i as simply the DOM and SAX interfaces. In Oracle XDK 10g, this library contains those classes as well as the XML Schema processor classes, XSLT Processor classes, XML compression classes, JAXP classes, W3C interfaces for DOM and SAX, and utility functionality such as the XMLSAXSerializer and asynchronous DOM Builder.


xml.jar


The xml.jar is a new library for Oracle XDK 10g and is an attempt to consolidate a number of JARs. It includes all the classes from oraclexsql.jar, xsqlserializers.jar, xmlcomp.jar, xmlcomp2.jar, and CLASSPATH. You might wonder why xmlparserv2.jar is not included as well. The answer is that this JAR has been around since the start and has so many products depending on it that it would be too great a risk to existing code to collapse it.


xschema.jar


Although the XML Schema classes are already contained in the xmlparserv2.jar, the xschema.jar is still included for backward compatibility reasons. In previous versions, these classes have resided in this JAR; however, it will eventually disappear. Therefore, you should ignore this JAR for all new development.


oraclexsql.jar and xsqlserializers.jar


The oraclexsql.jar contains most of the XSQL Servlet classes needed to deploy XSQL pages. If, however, you want to create serialized output, such as PDFs, you need the xsqlserializers.jar because it contains these serializer classes. Both of these JARs have been superceded by the xml.jar and are only included for backward compatibility. You should not continue to use them in new development.


xmlcomp.jar, xmlcomp2.jar, xmldemo.jar, and jdev-rt.zip


The xmlcomp.jar contains the XML JavaBeans that do not depend on the database, while the xmlcomp2.jar contains the JavaBeans that do, and thus depends on xdb.jar, which is the library that includes the Java classes that support the XML DB functionality. These JARs are included only for backward compatibility, because their classes are now included in xml.jar.

The xmlcomp.jar contains the DOMBuilder, XSLTransformer, DBAccess, XSDValidator, and XMLDiffer Beans, while the xmlcomp2.jar contains only the XMLDBAccess and XMLCompress Beans. You will not find future XML JavaBeans in these JARs, so you should not use them for new development. You also won’t find the visual Beans that were in previous releases. The XMLTreeView, XMLTransformPanel, XMLSourceView, and DBViewer Beans are now considered demos and are included in the xmldemo.jar. The jdev-rt.zip is used when working with the demos within the JDeveloper IDE.


xsu12.jar


The xsu12.jar contains the classes that implement the XML SQL Utility’s Java functionality. These classes also have a dependency on the xdb.jar for XMLType access.


classgen.jar


The classgen.jar contains the Class Generator for Java classes. In Oracle XDK 10g, only the run-time classes are included, as the JAXB Class Generator included in xml.jar has superceded their functionality. Only Oracle9i applications that cannot be rewritten should continue to use this JAR.


xdb.jar


The xdb.jar contains the classes that are needed by xml.jar and xmlcom2.jar to access XMLTypes. It also includes the SPI and XDBServlet classes to access the XML DB Repository, and the XMLType DOM classes for direct manipulation of the XMLType DOM tree. Note that this is not as complete a DOM implementation as in xmlparserv2.jar and thus will not be covered in this book.


xmlmesg.jar


The xmlmesg.jar is only necessary for development that requires non-U.S. English error messages that are available by default in all the other JARs. This JAR contains 27 additional translations and can simply be added to your CLASSPATH. The selected language will be based on your Java Locale setting.


transx.zip


The transx.zip archive contains the TransX Utility classes. This archive has been supplanted by xml.jar and is retained only for backward compatibility. New development should use the classes from xml.jar.


orai18n.jar


The orai18n.jar contains the Oracle National Language Supported (NLS) character set encodings. Distinct from the previous JARs, it resides in the XDK_HOME/xdk/jlib directory for OTN distributions and ORACLE_HOME/jlib for Oracle Database 10g. You will need it to support the normalization functions in XPath and on XSLT output for the proper collations.


classes12.jar and ojdbc14.jar


The classes12.jar and ojdbc14.jar are the Oracle JDBC drivers for Java 1.2/1.3 and 1.4, respectively. These JARs also depend upon orai18n.jar for their character set support when additional character sets beyond UTF-8, ISO8859-1, and JA16SJIS are required. These JARs are not part of the XDK distribution on OTN but are in the ORACLE_HOME\jdbc\lib directory of the database.

Figure 13-1 illustrates the dependencies between these XDK classes so that you can understand which ones are required when in your CLASSPATH.


Figure 13-1: XDK library dependencies

/ 218