Oracle Application Server 10g Oracle XML Developer s Kit Frequently Asked Questions September, 2005

Similar documents
Oracle Database 10g Release 2 Database Vault - Restricting the DBA From Accessing Business Data

Oracle Fusion Middleware 11g Oracle Access Manager Frequently Asked Questions June 2009

Improve Data Integration with Changed Data Capture. An Oracle Data Integrator Technical Brief Updated December 2006

Advanced Global Intercompany Systems : Transaction Account Definition (TAD) In Release 12

An Oracle White Paper October The New Oracle Enterprise Manager Database Control 11g Release 2 Now Managing Oracle Clusterware

Partitioning in Oracle Database 10g Release 2. An Oracle White Paper May 2005

Technical Upgrade Guidance SEA->SIA migration

Oracle WebCenter Portal 11g Developer Workshop

Installation Instructions: Oracle XML DB XFILES Demonstration. An Oracle White Paper: November 2011

Oracle WebCenter Portal 11g Developer Workshop

Using the Oracle Business Intelligence Publisher Memory Guard Features. August 2013

An Oracle White Paper November Primavera Unifier Integration Overview: A Web Services Integration Approach

Adding Mobile Capability to an Enterprise Application With Oracle Database Lite. An Oracle White Paper June 2007

Configuring Oracle Business Intelligence Enterprise Edition to Support Teradata Database Query Banding

JD Edwards EnterpriseOne Licensing

Oracle FLEXCUBE Direct Banking Release Corporate Cash Management User Manual. Part No. E

XML. Objectives. Duration. Audience. Pre-Requisites

Managing Metadata with Oracle Data Integrator. An Oracle Data Integrator Technical Brief Updated December 2006

An Oracle White Paper December, 3 rd Oracle Metadata Management v New Features Overview

Generate Invoice and Revenue for Labor Transactions Based on Rates Defined for Project and Task

Data Capture Recommended Operating Environments

Oracle Data Provider for.net Microsoft.NET Core and Entity Framework Core O R A C L E S T A T E M E N T O F D I R E C T I O N F E B R U A R Y

Oracle FLEXCUBE Direct Banking Release Dashboard Widgets Transfer Payments User Manual. Part No. E

Oracle Database 10g Workspace Manager Support for Oracle Spatial Topology Data Model. An Oracle White Paper May 2005

Working with Time Zones in Oracle Business Intelligence Publisher ORACLE WHITE PAPER JULY 2014

Create Individual Membership. This step-by-step guide takes you through the process to create an Individual Membership.

Superior Product Variants Software for Multi-Attribute Product Companies. An Oracle White Paper April 2004

Create Faculty Membership Account. This step-by-step guide takes you through the process to create a Faculty Membership Account.

Correction Documents for Poland

Creating Custom Project Administrator Role to Review Project Performance and Analyze KPI Categories

Handling Memory Ordering in Multithreaded Applications with Oracle Solaris Studio 12 Update 2: Part 2, Memory Barriers and Memory Fences

Frequently Asked Questions Oracle Content Management Integration. An Oracle White Paper June 2007

Bulk Processing with Oracle Application Integration Architecture. An Oracle White Paper January 2009

An Oracle White Paper September Security and the Oracle Database Cloud Service

Case Study: Redeveloping an Oracle Forms application using Oracle JDeveloper and Oracle ADF

Automatic Receipts Reversal Processing

Oracle WebCenter Portal 11g Developer Workshop

Veritas NetBackup and Oracle Cloud Infrastructure Object Storage ORACLE HOW TO GUIDE FEBRUARY 2018

Oracle Application Development Framework Overview

Oracle Data Masking and Subsetting

Oracle CIoud Infrastructure Load Balancing Connectivity with Ravello O R A C L E W H I T E P A P E R M A R C H

Oracle Enterprise Performance Management Cloud

Oracle Database Lite. Automatic Synchronization White Paper. An Oracle White Paper August 2008

Oracle Financial Services Regulatory Reporting for US Federal Reserve Lombard Risk Integration Pack

Oracle Fusion Configurator

Receiving PeopleSoft Message (PeopleTools 8.17) through the Oracle AS PeopleSoft Adapter. An Oracle White Paper September 2008

Oracle Warehouse Builder 10g Release 2 Integrating Packaged Applications Data

PeopleSoft Applications Portal and WorkCenter Pages

Oracle WebCenter Suite Integrating Secure Enterprise Search

Oracle DIVArchive Storage Plan Manager

Loading User Update Requests Using HCM Data Loader

Integrating Oracle Application Express with Oracle Application Server 10g. An Oracle White Paper April 2005

Oracle WebCenter Portal 11g Developer Workshop

Oracle WebCenter Portal 11g Developer Workshop

Introduction p. 1 An XML Primer p. 5 History of XML p. 6 Benefits of XML p. 11 Components of XML p. 12 BNF Grammar p. 14 Prolog p. 15 Elements p.

April Understanding Federated Single Sign-On (SSO) Process

Oracle Fusion General Ledger Hierarchies: Recommendations and Best Practices. An Oracle White Paper April, 2012

Load Project Organizations Using HCM Data Loader O R A C L E P P M C L O U D S E R V I C E S S O L U T I O N O V E R V I E W A U G U S T 2018

ORACLEAS PORTAL 10g (10.1.4) INTEGRATE YOUR ENTERPRISE CONTENT MANAGEMENT SYSTEMS INTO ORACLE PORTAL

Tutorial on How to Publish an OCI Image Listing

Oracle JD Edwards EnterpriseOne Object Usage Tracking Performance Characterization Using JD Edwards EnterpriseOne Object Usage Tracking

Oracle 10g: XML Fundamentals

August 6, Oracle APEX Statement of Direction

October Oracle Application Express Statement of Direction

An Oracle Technical White Paper September Oracle VM Templates for PeopleSoft

XSLT program. XSLT elements. XSLT example. An XSLT program is an XML document containing

Oracle NoSQL Database Parent-Child Joins and Aggregation O R A C L E W H I T E P A P E R A P R I L,

StorageTek ACSLS Manager Software Overview and Frequently Asked Questions

Data Capture Recommended Operating Environments

An Oracle White Paper July Oracle WebCenter Portal: Copying a Runtime-Created Skin to a Portlet Producer

Oracle Enterprise Data Quality New Features Overview

Oracle Application Server 10g Integration Interconnect. An Oracle Technical White Paper January 2005

An Oracle White Paper October Deploying and Developing Oracle Application Express with Oracle Database 12c

Maximum Availability Architecture. Oracle Best Practices For High Availability

Style Sheet A. Bellaachia Page: 22

WebCenter Portal Task Flow Customization in 12c O R A C L E W H I T E P A P E R J U N E

Oracle Secure Backup. Getting Started. with Cloud Storage Devices O R A C L E W H I T E P A P E R F E B R U A R Y

An Oracle White Paper February Combining Siebel IP 2016 and native OPA 12.x Interviews

Profitability Application Pack Installation Guide Release

Oracle FLEXCUBE Direct Banking Release Dashboard Widgets Customer Services User Manual. Part No. E

Oracle9i: XML Fundamentals for Developers

An Oracle White Paper September Upgrade Methods for Upgrading to Oracle Database 11g Release 2

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Oracle JD Edwards EnterpriseOne Object Usage Tracking Performance Characterization Using JD Edwards EnterpriseOne Object Usage Tracking

Handling Memory Ordering in Multithreaded Applications with Oracle Solaris Studio 12 Update 2: Part 1, Compiler Barriers

Using Oracle In-Memory Advisor with JD Edwards EnterpriseOne

Oracle Business Activity Monitoring 12c Best Practices ORACLE WHITE PAPER DECEMBER 2015

An Oracle White Paper March How to Define an Importer Returning Error Messages to the Oracle Web Applications Desktop Integrator Document

Achieving High Availability with Oracle Cloud Infrastructure Ravello Service O R A C L E W H I T E P A P E R J U N E

Subledger Accounting Reporting Journals Reports

Oracle FLEXCUBE Direct Banking iphone/ipad Workspace Configuration

An Oracle White Paper October Release Notes - V Oracle Utilities Application Framework

Oracle NoSQL Database Parent-Child Joins and Aggregation O R A C L E W H I T E P A P E R M A Y,

An Oracle White Paper. Released April 2013

ORACLE S PEOPLESOFT GENERAL LEDGER 9.2 (WITH COMBO EDITING) USING ORACLE DATABASE 11g FOR ORACLE SOLARIS (UNICODE) ON AN ORACLE S SPARC T7-2 Server

Oracle NoSQL Database For Time Series Data O R A C L E W H I T E P A P E R D E C E M B E R

Oracle Database Vault

Migrating VMs from VMware vsphere to Oracle Private Cloud Appliance O R A C L E W H I T E P A P E R O C T O B E R

Next-Generation SOA Infrastructure. An Oracle White Paper May 2007

Call: JSP Spring Hibernate Webservice Course Content:35-40hours Course Outline

Transcription:

Oracle Application Server 10g Oracle XML Developer s Kit Frequently Asked Questions September, 2005 This FAQ addresses frequently asked questions relating to the XML features of Oracle XML Developer's Kit (XDK) in Oracle Application Server (OracleAS) 10g. Oracle XML Developer's Kit provides the basic building blocks for reading, manipulating, transforming and viewing XML documents. To provide a broad variety of deployment options, the Oracle XDK consists of the XML components in C, C++ and Java. This FAQ covers the following XDK components: XML Parsers: create and parse XML using industry standard DOM, SAX and JAXP interfaces. XSLT Processors: transform or render XML into other text-based formats such as HTML. XML Schema Processors: allow validate XML against the XML schemas defining the simple and complex datatypes. XML SQL Utility: generates XML documents, DTDs and XML schemas from SQL queries. XSQL Servlet: combines XML, SQL, and XSLT in the server to deliver dynamic web content. For further information, please visit the OTN XML Center at http://www.oracle.com/technology/tech/xml/index.html, which contains additional samples, demos and documents. 1.0 XML Parser 1.1 Does Oracle XML parser support DTD caching? How do I set it up? Yes, the XML parser in Oracle XDK Java provides the validating/non-validating DTD caching through the setdoctype() function. After you set the DTD object to the XML parser using this function, the XML parser will cache this DTD object for further XML parsing. For example, if your application requires to validate multiple XML documents with the same DTD. After the first XML document is parsed, you can get the DTD from the XML parser and set it to the XML parser: import oracle.xml.parser.v2.domparser; import oracle.xml.parser.v2.xmldocument; import oracle.xml.parser.v2.dtd;... // Get an instance of the parser DOMParser parser = new DOMParser(); // Parse the first document and set the DTD for caching parser.setvalidationmode(domparser.dtd_validation); parser.setattribute(domparser.use_dtd_only_for_validation,boolean.true); parser.parse("{xml_document_url}"); DTD dtd =parser.getdoctype(); Page 1

parser.setdoctype(dtd); // loop of XML parsing for(...) { // XML Parsing with DTD Cache } The parser will cache this DTD and use it for parsing the XML documents thereafter. You also should set the DOMParser.USE_DTD_ONLY_FOR_VALIDATION attribute, if the cached DTD object is used only for validation by: parser.setattribute(domparser.use_dtd_only_for_validation,boolean.true); Otherwise, the XML parser will copy the DTD object and add it to the DOM tree. Additionally, the following example shows how to set the external DTDs: parser.parsedtd("{dtd_url}","{root_element_name}"); DTD dtd = parser.getdoctype(); parser.setdoctype(dtd); // loop of XML parsing for(...) { // XML Parsing with DTD Cache } 1.2 How do I include binary data in an XML documents? There is no way to directly include binary data within the XML document. However, there are two work-arounds: 1/ The binary data could be referred as an external unparsed entity that resided in a different file. 2/ The binary data can be unencoded (meaning converting binary data into ASCII data) and be included in a CDATA section. The limitation on the encoding technique is that it only produces legal characters for the CDATA section. 1.3 How can make the XML Parser ignore the parsing of the <!DOCTYPE> tag? When loading XML documents with <!DOCTYPE> definitions, the parser will give errors if the DTD URLs can't be resolved. However, there are two ways to make the XML parsers ignores the definitions: 1/ Put standalone="yes" to <?xml...?>declaration. 2/ Use the XMLParser.setAttribute(XMLParser.STANDALONE, Boolean.TRUE) function to treat the input file as if it had standalone="yes" in the XML declaration. 1.4 Which version of JAXP does XDK XML parser support? XDK XML Parser for Java support JAXP 1.2 in this release. Page 2

2.0 XSLT Processor 2.1 When should I use the XSLT extensions? Before using the XSLT extensions, make sure you understand the following: First, currently the extensions are only provided through the Java Binding Mechanisms in XDK XSLT Processor for Java. Second, you should use extensions only if the built-in XSLT functions can't solve the problems such as using some math functions such as cos() and sin() functions. Third, you should know the XSLT stylesheet is not portable after using the XSLT extensions. This is because XSLT extension binds to a specify programming language. In other words, if you define Java XSLT extensions, the XSLT stylesheet can only be used by the certain XSLT processors implemented in Java. When using Oracle XSLT extensions, make sure you set the namespace of the extension class to be: http://www.oracle.com/xsl/transform/java/ 2.2 What are the built-in extensions in the Oracle XDK XSLT Processor for Java? Oracle XDK XSLT Processor for Java provides two built-in extension functions: <ora:output>: where xmlns:ora="http://www.oracle.com/xsl/transform/java". This element can be used as a top-level element or within the XSL templates. When it is used as a top-level element, it is similar to the <xsl:output> and can have all the attributes allowed by the <xsl:output>. Additionally, it has an "'name" attribute used as an identifier. When <ora:output> is used in an XSL template, it can only have two attributes, the "use" and the "href" attribute. The "use" attribute specifies the name of the top-level <ora:output> to be used, and the "href" gives the output URL for the sub-tree of the XSLT result. ora:node-set: where xmlns:ora="http://www.oracle.com/xsl/transform/java". The ora:node-set function converts a result tree fragment into a node-set. 2.3 How can I check whether the XML element contains child nodes or child attributes? You can use the following syntax to check whether the XML element contains child nodes: <xsl:if test="not(node())"> <xsl:attribute name="null">yes</xsl:attribute> You can use the following syntax to check whether the XML element contains attribute nodes: <xsl:if test="not(attribute::node())"> <xsl:attribute name="attrnull">yes</xsl:attribute> With these, you can specify the *null indicators* as shown in the following XSLT stylesheet: Page 3

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/xsl/transform" version="1.0"> <xsl:template match="/mytaglist/mytag"> <xsl:element name="mytag"> <xsl:if test="not(node())"> <xsl:attribute name="null">yes</xsl:attribute> <xsl:if test="not(attribute::node())"> <xsl:attribute name="attrnull">yes</xsl:attribute> <xsl:for-each select="@*"> <xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute> </xsl:for-each> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="node() @* comment() processing-instruction()"> <xsl:copy> <xsl:apply-templates select="@* node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> 3.0 XML Schema Processor 3.1 Does XDK XML schema processor fully support W3C XML Schema recommendation 1.0? Yes. 3.2 What is the example calling sequence of XML schema processor in C++? Here is the example calling sequence: 1/ XMLSchema.initialize(): initializes the process 2/ Parse XML documents as an input to XML schema processor 3/ XMLSchema.validate(): validate the parsed XML documents 4/ XMLSchema.terminate(): end the process 4.0 XML SQL Utility 4.1 Can XML SQL Utility insert XML data across tables? XML-SQL Utility (XSU) can only store to a single table. It maps a canonical representation of the XML documents into any table/view. However, there are ways to store XML across tables with the XSU. First approach is that you use XSLT to transform the XML document into multiple XML documents and insert them separately. Second approach is that you define database views over multiple tables (object views if needed) and then do the inserts into the view. If the view is inherently non-updatable (because of complex joins,...), then you can create INSTEAD-OF triggers over the views for managing the insertion. 4.2 How can I load data stored in XML attributes into database tables with XSU? XML SQL Utility assumes the canonical mapping of the XML document and the database Page 4

schema when loading data. This requires all data stored in XML elements. You have to use XSLT to transform the XML attributes into XML elements before inserting the data into database when using XSU. 4.3 Does XML SQL Utility commit after it's done with the inserting/deleting/updating? By default, the XML SQL Utility does not explicit commit. If the autocommit is on (default for the JDBC connection) then after each batch of statement (using the "setbatchsize" feature) the executions of a commit happen. The user can override this by turning autocommit off and then specifying after how many statement executions should a commit occur which can be done using the "setcommitbatch" feature (when batchsize=1). Finally, what happens if an error occurs? Well, the XSU rollbacks either to the state the target table was before the particular call to the XSU, or the state right after the last commit made during the current call to the XSU. 5.0 XSQL Servlet 5.1 What is Oracle XSQL Servlet? Oracle XSQL Servlet is part of XDK Java components and provides servlet engine, Java APIs and a command-line utility. To run the XSQL command-line utility, you need to set the following libraries and the XSQLConfig.xml file in the JAVA CLASSPATH: xmlparserv2.jar: Oracle XDK XML Parser for Java classes12.jar: JDBC xsu12.jar: XML SQL Utility xml.jar: XSQL Servlet The command is: java oracle.xml.xsql.xsqlcommandline xsql xsqlfileuri [outfilename] [param1=value1... paramn=valuen] To run XSQL Servlet in Web servers, you need to do specific setups for XSQL servlet in the Web servers. You can find the information in the Release Notes of XSQL. 5.2 Can we perform DML operations using XSQL servlet? Yes. This is supported using the <xsql:dml> tag or using the <xsql:insert-request> tag. Page 5

Oracle Application Server 10g: Oracle XML Developer s Kit FAQ September, 2005 Author: Jinyu Wang Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 oracle.com Copyright 2005, Oracle. All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle, JD Edwards, PeopleSoft, and Retek are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle, JD Edwards, PeopleSoft, and Retek are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Page 6