Showing posts with label Oracle XML DB. Show all posts
Showing posts with label Oracle XML DB. Show all posts

Tuesday, October 31, 2023

Handling XLIFF documents generated by Oracle APEX

XLIFF files have been around since the first version of Oracle APEX as I remember.

Even if you are not interested in XLIFF files, you may find interesting the code below as I am showcasing the usage of many SQL/XML functions.

Recently I wanted to spare some time while translating some of these files, so I decided to brush up my Oracle XMLDB skills that have been put on hold in the last years owing to the increasing popularity of JSON.

The goal is to take a XLIFF file exported from an APEX application and turn it into relational data for easier handling, then take the data, presumably modified for some reason, and convert them back into a XLIFF file that can be applied to the original application.

This code was created on Oracle 19c.

-- XLIFF structure
/*
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
  ****************** 
  ** Source     :  100
  ** Source Lang:  en
  ** Target     :  108
  ** Target Lang:  it
  ** Filename:     f100_108_en_it.xlf
  ** Generated By: TOOLS_WKS_ADMIN
  ** Date:         26-OCT-2023 15:55:30
  ****************** 
 -->
<xliff version="1.0">
<file original="f100_108_en_it.xlf" source-language="en" target-language="it" datatype="html">
<header></header>
<body>
<trans-unit id="S-5-1-100">
<source>Welcome</source>
<target>Benvenuto</target>
</trans-unit>
...
<trans-unit id="S-458-4595199304859029-100">
<source>Username</source>
<target>Nome utente</target>
</trans-unit>
</body>
</file>
</xliff>
*/


--------------------------------------------------------
--  DDL for Table XLIFF_EXPORT_FILES
--
--  This table holds the XLIFF documents stored as XMLType
--  Created by Byte64 2023/10/27
--------------------------------------------------------

  CREATE TABLE "XLIFF_EXPORT_FILES" 
( "ID" NUMBER(*,0) GENERATED ALWAYS AS IDENTITY ORDER NOT NULL,
"FILENAME" VARCHAR2(128) NOT NULL,
"DATE_INS" DATE DEFAULT SYSDATE,
"XLIFF" "XMLTYPE" NOT NULL,
CONSTRAINT "XLIFF_EXPORT_FILES_PK" PRIMARY KEY ("ID") USING INDEX ENABLE
);
-------------------------------------------------------- -- DDL for View V_XLIFF_RELATIONAL -- -- This view transforms XML into relational data -- Created by Byte64 2023/10/27 -------------------------------------------------------- CREATE OR REPLACE FORCE EDITIONABLE VIEW "V_XLIFF_RELATIONAL" ("ID", "ITEM_ID", "SOURCE_LANGUAGE", "TARGET_LANGUAGE", "TRANS_UNIT_ID", "SOURCE_TEXT", "TARGET_TEXT", "DATE_INS") AS
select x.id, rownum as item_id, tu.source_language, tu.target_language, t."TRANS_UNIT_ID",t."SOURCE_TEXT",t."TARGET_TEXT", x.date_ins
from xliff_export_files x,
xmltable('/xliff/file' passing x.xliff
columns
source_language varchar2(30) path '@source-language',
target_language varchar2(30) path '@target-language',
trans_unit xmltype path 'body/trans-unit'
) tu,
xmltable('/trans-unit' passing tu.trans_unit
columns
trans_unit_id varchar2(128) path '@id',
source_text varchar2(4000) path 'source',
target_text varchar2(4000) path 'target'
) t
; -------------------------------------------------------- -- DDL for Table XLIFF_RELATIONAL -- -- This table will contain the data extracted with -- view V_XLIFF_RELATIONAL -- Created by Byte64 2023/10/27 -------------------------------------------------------- CREATE TABLE "XLIFF_RELATIONAL"
( "ID" NUMBER(*,0) NOT NULL,
"ITEM_ID" NUMBER(*,0) NOT NULL,
"SOURCE_LANGUAGE" VARCHAR2(30) NOT NULL,
"TARGET_LANGUAGE" VARCHAR2(30) NOT NULL,
"TRANS_UNIT_ID" VARCHAR2(128) NOT NULL,
"SOURCE_TEXT" VARCHAR2(4000) NOT NULL,
"TARGET_TEXT" VARCHAR2(4000) NOT NULL,
"DATE_INS" DATE DEFAULT SYSDATE
); -------------------------------------------------------- -- DDL for View V_XLIFF_RELATIONAL_DATA -- -- This view ensures that the elements are pulled out in -- the same original order, which could make it easier -- to spot problems by comparing the original XLIFF -- with the new one -------------------------------------------------------- CREATE OR REPLACE FORCE EDITIONABLE VIEW "V_XLIFF_RELATIONAL_DATA" ("ID", "ITEM_ID", "SOURCE_LANGUAGE", "TARGET_LANGUAGE", "TRANS_UNIT_ID", "SOURCE_TEXT", "TARGET_TEXT", "DATE_INS") AS
select "ID","ITEM_ID","SOURCE_LANGUAGE","TARGET_LANGUAGE","TRANS_UNIT_ID","SOURCE_TEXT","TARGET_TEXT","DATE_INS"
from xliff_relational
order by id, item_id
; -------------------------------------------------------- -- DDL for View V_XLIFF_OUTPUT_FILES -- -- This view extracts the relational data as XLIFF files -- one BLOB for each ID -- Created by Byte64 2023/10/27 -------------------------------------------------------- CREATE OR REPLACE FORCE EDITIONABLE VIEW "V_XLIFF_OUTPUT_FILES" ("ID", "XLIFF") AS
select
id,
xmlserialize(document
xmlconcat(
xmlcomment('generated externally'),
xmlelement("xliff", xmlattributes('1.0' as "version"),
xmlelement("file", xmlattributes(f.filename as "original",
(select x1.source_language
from xliff_relational x1
where x1.id = f.id
fetch first 1 row only) as "source-language",
(select x1.target_language
from xliff_relational x1
where x1.id = f.id
fetch first 1 row only) as "target-language"
),
xmlelement("header", null),
xmlelement("body", (select xmlagg(
xmlelement("trans-unit", xmlattributes(x.trans_unit_id as "id"),
xmlforest(x.source_text as "source", x.target_text as "target")
)
) from v_xliff_relational_data x
where x.id = f.id
)
)
)
)
) as blob
encoding 'UTF-8'
version '1.0' -- this will generate the XML header automatically
indent size = 2 -- optional indentation for pretty-print
) as xliff
from xliff_export_files f
;

Workflow:

  1. seed the application translation;
  2. export the XLIFF file generated by APEX;
  3. load the XLIFF file into XLIFF_EXPORTED_FILES;
  4. populate XLIFF_RELATIONAL selecting from V_XLIFF_RELATIONAL with the ID created during the previous step;
  5. do some work on the data;
  6. download the resulting file querying V_XLIFF_OUTPUT_FILES by ID;
  7. load the translation back into the Apex Builder;
  8. apply the translation to the application;
  9. publish the application.

Steps 3-6 could be done with the help of a simple APEX application enabling people who are not allowed to work directly in the Application Builder to perform the translation work.

Besides the normal translation work, having the data in a custom table allows to:

  • leverage existing translations by matching the source text, especially in the case of simple strings like button names, item labels taking the translations from another application;
  • perform quality checks searching for similar text and make them consistent throughout the whole application, i.e. verify that buttons, item labels, region titles have a consistent format, and so on.
  • clone a language with minor linguistic variations starting from a complete translation, i.e. English (US) vs English (CA) or Spanish (ES) vs Spanish (MX) and so on.

The XLIFF file generated by the view V_XLIFF_OUTPUT_FILES are pretty printed with an indentation value of 2 spaces, this will cause the file to be somewhat larger than the original even if no change has been made to the target elements. The clause INDENT SIZE = 2 can be removed to keep the file size smaller.

Caveat emptor!

Friday, March 15, 2013

LPX-00209: PI names starting with XML are reserved

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

I don't know why it took me more than the necessary to understand where was the problem when I hit the following error.

ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00209: PI names starting with XML are reserved

At any rate, in my case the reason was not the same as reported in other sites (like having a duplicate XML declaration).
The trouble was caused by a simple blank character located before the initial XML file declaration.
The error occurred on Oracle 10.2 (XE), while on Oracle 11.2.0.3.0 EE the blanks seem to give no concerns whatsoever to the parser.
I ignore the results on the Oracle versions in between.

You can easily simulate the problem with the following query in SQL Developer:

select xmltype(' ' || dbms_xmlgen.getxml('select 1 from dual')) x from dual;

If you have a clob object containing an xmlfile with extra blanks at the beginning of the file and attempting to parse it you get this error, you may easily fix the problem by TRIMming it first. 

See message translations for ORA-19202, LPX-00209 and search additional resources.

Thursday, November 24, 2011

ORA-31038: Invalid enumeration value: "StatelessWithFastRestPackageState"

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

This error is caused by a nice Oracle documentation typo: the enumerated constant StatelessWithFastRestPackageState is misspelled in table 37-19 (in both 10.2 and 11.1 DBMS_EPG chapters of PL/SQL Packages and Types Reference), but is correctly reported elsewhere (too bad I read the wrong one first...).

begin
  dbms_epg.set_dad_attribute('APEX','session-state-management','StatelessWithFastRestPackageState');
  commit;
end;
/
 
Error starting at line 3 in command:
begin
  dbms_epg.set_dad_attribute('APEX','session-state-management','StatelessWithFastRestPackageState');
  commit;
end;
Error report:
ORA-31038: Invalid enumeration value: "StatelessWithFastRestPackageState"
ORA-06512: at "SYS.DBMS_EPG", line 89
ORA-06512: at "SYS.DBMS_EPG", line 222
ORA-06512: at line 2

As you can easily guess, an "e" must be inserted: StatelessWithFastResetPackageState

By the way, according to the HTTP server documentation (referring to Apache as a matter of fact) the default value for this attribute should be StatelessWithResetPackageState, however the best value for Oracle XE (as well as Oracle 9 and above) should be StatelessWithFastResetPackageState.

And now for the real question is: how am I going to measure any benefit from this change?
The short answer is: I don't know, but I hope to see lower elapsed_time values in apex_workspace_activity_log.

See message translations for ORA-31038 and search additional resources.

Monday, November 07, 2011

ORA-19025: EXTRACTVALUE returns value of only one node

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

It's not the first time I write about ORA-19025, however I believe that what follows is an interesting and not so common situation.

Imagine you receive an XML file that have been working perfectly for 3 years and suddenly it throws out the infamous exception:

ORA-19025: EXTRACTVALUE returns value of only one node

After mumbling and rummaging in your bullet-proof, supertested code, you come up with a query that at least pinpoints the offending XML node:


The problem is that for 3 years the title element never contained child nodes other than a single text node, then suddenly, someone managed to enter that sup element. You can easily try yourself:


ORA-19025: EXTRACTVALUE returns value of only one node

A quick and dirty workaround consists in adding XPath's text() function:



X
-----------------------------------------
Don't be  by unwanted tags in a text node 

This will keep you going, at the cost of stripping out the text inside the inner element(s). The problem with XML files is in that a stupid problem like that above makes unusable the whole lot even if the erroneous information is negligible.

If loosing some text is not an option, I fear that the only way forward is to process these nodes through a XSL transform that will strip out the tags and copy the text nodes inside.
May be I'll switch to this fancier option later on, for the moment I am just happy to keep the ball rolling without worrying too much about loosing an insignificant text node out of millions, in the end it's their fault if they added unexpected stuff inside that element.

See message translations for ORA-19025 and search additional resources.

Thursday, August 20, 2009

ORA-31609: error loading file "kuauddef.xsl" from file system directory

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

Sometimes i wish certain things were a little bit easier.
I was attempting to import a datapump export obtained with the DBMS_METADATA "demo" export program i mentioned a while ago, but unfortunately it blows up while processing trigger information.
After investigating the problem, it seemed that, for some reason, there were missing stylesheets that needed to be loaded using a script called initmeta.sql, under the $ORACLE_HOME/rdbms/admin folder according to a user who reported that after doing that, the problem was fixed, but to my surprise i could not find such script in my Oracle XE linux installation.
So i began another iteration, in pursue of a solution for this new "problem" and i found an OTN forum discussion where someone else could not spot the fatal script, but a DBA published the content of initmeta.sql for Oracle version 10gR1, which is a single line:
EXECUTE SYS.DBMS_METADATA_UTIL.LOAD_STYLESHEETS('/Users/oracle/.../rdbms/xml/xsl');
(whole path omitted)

Apparently i only needed to modify the file path, but first i wanted to have a look at the package specification of DBMS_METADATA_UTIL.
Interestingly enough, in version 10gR2 (XE) something must have been changed, because procedure LOAD_STYLESHEETS doesn't take any parameters.
Oh good, i thought, it means that they are retrieving the path themselves, so i removed the parameter and ran the procedure as SYS:
EXECUTE SYS.DBMS_METADATA_UTIL.LOAD_STYLESHEETS;

ORA-31609: error loading file "kuauddef.xsl" from file system directory
"/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/xml/xsl"

ORA-06512: at "SYS.DBMS_METADATA_UTIL", line 1793
ORA-06512: at line 1
31609. 00000 - "error loading file \"%s\" from file system directory \"%s\""
*Cause: The installation script initmeta.sql failed to load
the named file from the file system directory into the database.
*Action: Examine the directory and see if the file is present
and can be read.
And there you go, with ORA-31609.
It's curious that SQL Developer explains the error message mentioning the initmeta.sql script that didn't run at all, it means that procedure LOAD_STYLESHEETS is expected to be run only in that occasion.

So, here is where i am stuck now, the missing $ORACLE_HOME/rdbms/xml directory.
May be i'll update this entry if i manage to work around this problem.

Fortunately there are still the good-ole EXP/IMP utilities to keep the ball rolling.

See message translations for ORA-31609 and search additional resources.

Friday, August 07, 2009

ORA-31050: Access denied

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

After discovering two undocumented procedures in package DBMS_XDB in Oracle XE (10gR2), i was eager to try out a configuration of a secondary listening endpoint.
These two undocumented procedures, called DBMS_XDB.SetListenerEndpoint and DBMS_XDB.GetListenerEndpoint, are actually documented in the 11gR1 manual, so i guess they were added to the package when it was too late to be described in the manuals.
When i attempted to execute the following block as a normal user, i got the exception shown below:
begin
DBMS_XDB.SETLISTENERENDPOINT (
endpoint => DBMS_XDB.XDB_ENDPOINT_HTTP2,
host => NULL,
port => 8082,
protocol => DBMS_XDB.XDB_PROTOCOL_TCP);
end;
/

ORA-31050: Access denied
ORA-06512: at "XDB.DBMS_XDB", line 382
ORA-06512: at "XDB.DBMS_XDB", line 671
ORA-06512: at line 2
After connecting as SYS and executing the block again, i got my second listening endpoint up and running on port 8082.

Note that existing sessions won't pick up the new configuration until you refresh it.
Indeed i when executed the following block from an existing session as a normal user:
declare
l_host varchar2(255);
l_prot number;
l_port number;
begin
DBMS_XDB.GETLISTENERENDPOINT (
endpoint => DBMS_XDB.XDB_ENDPOINT_HTTP2,
host => l_host,
port => l_port,
protocol => l_prot);

dbms_output.put_line(l_host);
dbms_output.put_line(l_port);
dbms_output.put_line(l_prot);
end;
/
i only got null values.
As soon as i executed DBMS_XDB.CFG_REFRESH the new values took effect for that session.

According to the documentation for Oracle 11g, the second listening endpoint is most useful for implementing the HTTPS protocol. I configured a normal (secondary) HTTP port just to verify the possibility of connecting to a specific Apex box from remote using a non standard port.

See message translations for ORA-31050 and search additional resources.

Wednesday, April 29, 2009

ORA-31181: PL/SQL DOM handle accesses node that is no longer available

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

This morning I'm going for an easy one.

...
l_doc := DBMS_XMLDOM.newDomDocument(cl => l_clob);
l_rootElem := DBMS_XMLDOM.getDocumentElement(doc => l_doc);
DBMS_XMLDOM.freeDocument(l_doc);
l_rootNode := DBMS_XMLDOM.makeNode(elem => l_rootElem); -- this is line 436


DBMS_XMLDOM.freeNode(l_rootNode);
...
end;
/
ORA-31181: PL/SQL DOM handle accesses node that is no longer available
ORA-06512: at "XDB.DBMS_XMLDOM", line 2554
ORA-06512: at "XDB.DBMS_XMLDOM", line 2572
ORA-06512: at "TAMEME.TAMEME", line 436
ORA-06512: at line 6

This error is easily explained: you cannot free the object containing the DOM document until you have finished processing all the objects derived from it.
In the code snippet above, procedure DBMS_XMLDOM.freeDocument must be moved after DBMS_XMLDOM.freeNode.
In other words, the call to DBMS_XMLDOM.makeNode is out of scope.

See message translations for ORA-31181 and search additional resources.

Monday, August 04, 2008

ORA-00942 and ORA-06512 at SYS.XMLTYPE

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

You may get the following puzzling stack of error messages when you attempt to use the XMLTYPE constructor on an empty CLOB.
This error can be easily reproduced in the following way:

select xmltype(empty_clob()) as x
from dual;
ORA-00942: table or view does not exist
ORA-06512: at "SYS.XMLTYPE", line 254
ORA-06512: at line 1
Most likely, in a real life scenario, you initialized a CLOB column with the special value EMPTY_CLOB(), that is standard practice when you need to insert a CLOB value into a table as the result of a conversion from a BLOB type, as shown in this PL/SQL snippet:
...
insert into file_store
( name, document, created_by)
values (l_name, empty_clob(), p_user)
returning id, document into l_id, l_clob;

dbms_lob.convertToClob(l_clob, l_blob, DBMS_LOB.LOBMAXSIZE, l_dest_off, l_src_off, l_csid, l_shift, l_warning);
...

Note that you can compare the lob locator with the value EMPTY_CLOB().
...
if l_clob = empty_clob() then
-- lob locator is empty
...
elsif l_clob is null then

-- lob locator is atomically null
...
else

-- lob locator contains a non empty CLOB
...
end if;
...
in case you need to distinguish between a null CLOB locator and an empty CLOB locator.

Once you are sure that the document is not empty, you can try to apply the XMLType constructor and see if you get any parsing errors.

See message translations for ORA-00942 and search additional resources.

Wednesday, July 23, 2008

ORA-31088: object XYZ depends on the schema

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

This error can be seen when you are trying to delete an XML schema from the repository using the DELETE_RESTRICT or DELETE_CASCADE option in DBMS_XMLSCHEMA.DELETE_SCHEMA , but there are still XMLType tables or XMLType columns referencing it.

A slightly subtler situation involves the recycle bin of Oracle 10G and above.
Supposing the recycle bin is enabled, if you drop a table referencing an XML schema but you don't specify PURGE and you don't flush the recycle bin, then you'll get ORA-31088, which may sound difficult to understand at first.

You can reproduce the problem by executing the scripts i used in a previous posting, then performing the following additional steps:

DROP TABLE purchaseorder_as_column;

BEGIN
DBMS_XMLSCHEMA.deleteSchema(
SCHEMAURL => 'http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd',
delete_option => DBMS_XMLSCHEMA.DELETE_CASCADE);
END;

ORA-31088: object "TEST"."PURCHASEORDER_AS_COLUMN" depends on the schema
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 82
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 102
So, the cleanest workaround is to ensure that no depending objects are still present, including those that may have been moved to the recycle bin and then re-execute deleteSchema.
You may execute the following query, for instance:
select *
from user_dependencies d, user_xml_schemas x
where d.referenced_type = 'XML SCHEMA'
and d.referenced_name = x.int_objname
and x.schema_url = 'http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd';

Alternatively you can try to specify either of the two remaining options for the deleteSchema call: DELETE_INVALIDATE or DELETE_CASCADE_FORCE.

See message translations for ORA-31088 and search additional resources.

Tuesday, July 22, 2008

ORA-22809: nonexistent attribute

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

As recently promised in an OTN forum posting, i am now ready to say something more detailed about ORA-22809 and other issues i encountered during recent experiments with XML db.

For once let's begin from a working script and then modify it to reproduce the problem.
Given the limitations of blogspot when it comes to display inline XML tags, i'll just put links to external XML documents that you can download and open separately.

First of all, let's create a directory object pointing to a folder on our server where we'll place the XML schema to be registered.
CREATE DIRECTORY SCHEMA_DIR = "path to desired folder";
Make sure you have READ privileges on this folder.

Secondly, we need a working sample of XML purchase order schema. Download it and save it in the folder pointed to by directory object SCHEMA_DIR created previously.

Thirdly, we need to register the schema, in this fashion:

BEGIN
DBMS_XMLSCHEMA.registerSchema(
SCHEMAURL => 'http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd',
SCHEMADOC => bfilename('SCHEMA_DIR','purchaseOrder.xsd'),
CSID => nls_charset_id('AL32UTF8'),
LOCAL => TRUE,
GENTYPES => TRUE,
GENTABLES => FALSE);
END;

Then, at last, let's build a table containing an XMLType column with an object-relational storage model:

CREATE TABLE purchaseorder_as_column (
id NUMBER,
xml_document XMLType )
XMLTYPE COLUMN xml_document STORE AS OBJECT RELATIONAL
XMLSCHEMA "http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd"
ELEMENT "PurchaseOrder"
VARRAY XML_DOCUMENT.XMLDATA.ACTIONS.ACTION
STORE AS TABLE action_table2
((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$))
ORGANIZATION INDEX OVERFLOW)
VARRAY XML_DOCUMENT.XMLDATA.LINEITEMS.LINEITEM
STORE AS TABLE lineitem_table2
((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$))
ORGANIZATION INDEX OVERFLOW);
Thanks to Marco Gralike who pointed me to the right place in the XML Db Developer's Guide because at a certain point i was lost.

Now, if everything worked out as expected, you should have been able to carry out the above steps without issues, so let's see how easy is to tamper with the annotations in order to get ORA-22809.

Go to line #19 of purchaseOrder.xsd and remove the following text: xdb:SQLName="ACTIONS"
Save the new version as purchaseOrder22809.xsd.

Now, let's replay everything from the beginning:
DROP TABLE purchaseorder_as_column PURGE;

BEGIN
DBMS_XMLSCHEMA.deleteSchema(
SCHEMAURL => 'http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd',
delete_option => DBMS_XMLSCHEMA.DELETE_CASCADE);
END;
/
BEGIN
DBMS_XMLSCHEMA.registerSchema(
SCHEMAURL => 'http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd',
SCHEMADOC => bfilename('SCHEMA_DIR','purchaseOrder22809.xsd'),
CSID => nls_charset_id('AL32UTF8'),
LOCAL => TRUE,
GENTYPES => TRUE,
GENTABLES => FALSE);
END;
/
CREATE TABLE purchaseorder_as_column (
id NUMBER,
xml_document XMLType )
XMLTYPE COLUMN xml_document STORE AS OBJECT RELATIONAL
XMLSCHEMA "http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd"
ELEMENT "PurchaseOrder"
VARRAY XML_DOCUMENT.XMLDATA.ACTIONS.ACTION
STORE AS TABLE action_table2
((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$))
ORGANIZATION INDEX OVERFLOW)
VARRAY XML_DOCUMENT.XMLDATA.LINEITEMS.LINEITEM
STORE AS TABLE lineitem_table2
((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$))
ORGANIZATION INDEX OVERFLOW);

Error at Command Line:25 Column:28
Error report:
SQL Error: ORA-22809: nonexistent attribute
22809. 00000 - "nonexistent attribute"
*Cause: An attempt was made to access a non-existent attribute of an
object type.
*Action: Check the attribute reference to see if it is valid. Then retry
the operation.
As i explained in my last comment in the OTN forum, the problem is caused my a mismatching attribute name.
Side note: i used DROP TABLE ... PURGE, because otherwise i'd get an error when unregistering the schema (ORA-31088). Clearly PURGE works on Oracle 10G or above only.
I believe this example might work on 9iR2 too, after removing the PURGE keyword, but i didn't try it.

Annotations like xdb:SQLName="ACTIONS" allow you to rename columns and/or object attributes that would otherwise derive their name from the original XML Schema element/attribute definition.
After removing the annotation, Oracle created object type PURCHASEORDER_T with an attribute called "Actions" (case sensitive) instead of "ACTIONS" (case insensitive), hence the error returned. The good news is that in the error message stack there is a precise indication of the location of the problem: line 25, column 28 that is where the ACTIONS attribute begins.

As a consequence, you ought to modify the CREATE TABLE statement as follows:
CREATE TABLE purchaseorder_as_column (
id NUMBER,
xml_document XMLType )
XMLTYPE COLUMN xml_document STORE AS OBJECT RELATIONAL
XMLSCHEMA "http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd"
ELEMENT "PurchaseOrder"
VARRAY XML_DOCUMENT.XMLDATA."Actions".ACTION
STORE AS TABLE action_table2
((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$))
ORGANIZATION INDEX OVERFLOW)
VARRAY XML_DOCUMENT.XMLDATA.LINEITEMS.LINEITEM
STORE AS TABLE lineitem_table2
((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$))
ORGANIZATION INDEX OVERFLOW);
whether you prefer to use all uppercase name for SQL entities in contrast with mixed case element names is a matter of taste. Normally i prefer to use either all lowercase or all uppercase element and attribute names in XML just to avoid the inevitable confusion when you mix them up.
There can be situations though where you are forced to use such annotation, like when the XML element or attribute carries an Oracle reserved keyword name.

See message translations for ORA-22809 and search additional resources.

Wednesday, July 09, 2008

DBMS_XMLSTORE and LPX-00222: error received from SAX callback function

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

You may see the following stack of errors
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00222: error received from SAX callback function
ORA-06512: at "SYS.DBMS_XMLSTORE", line 78
ORA-06512: at "TEST.INSERTXML", line 28
ORA-06512: at line 1
in an attempt of:
  1. using DBMS_XMLSTORE.INSERTXML (prior to version 10GR2) for loading a document containing an apostrophe ('). The error is raised regardless of the representation of the apostrophe ( ' or as &apos; or &#39;) and is filed as a bug in metalink.
  2. using DBMS_XMLSTORE.INSERTXML for loading a document into a table whose columns have NOT NULL constraints, no default value and the corresponding element(s) in the document present at least one empty field. This holds also for documents containing a subset of the columns of the table and one of the missing columns is mandatory.
  3. using DBMS_XMLSTORE.INSERTXML for loading a document into a table with primary, unique or foreign keys and the data being loaded violates one or more constraints.
  4. using DBMS_XMLSTORE.INSERTXML for loading a document into a table with insufficient column size. For instance, a document containing strings larger than the target table column can hold.
Most likely there are more situations involving other procedures in the DBMS_XMLSTORE package that i hadn't the time to investigate yet.
In other words, this LPX-00222 error is a sort of catch-all exception, which means that you'll have to go through the pesky job of identifying the offending element(s) in your source XML file manually.
For large files this can really turn into a nightmare, indeed initially i wasted several hours trying to load an XML containing an apostrophe before realizing that this was a known bug of 10GR1.

See message translations for LPX-00222 and search additional resources.

Monday, July 07, 2008

Interesting change in the XML export format of Oracle SQLDeveloper

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

In the last days I've been playing with XML files using SQL Developer and other tools and i noticed the following interesting change in the behavior of SQL Developer when it comes to exporting the data from a table in XML format:

until version 1.5.0 build 5338, the elements in the XML file when exporting table were (in XPath notation format):
results/row/COLUMN NAME (note the mixture of lower and upper case, where COLUMN NAME was the relevant column name.

From version 1.5.1 build 5440, the element names have been changed and are now more consistent:
RESULTS/ROW/COLUMN@NAME="COLUMN NAME" (where COLUMN is now a fixed element whose NAME attribute contains the actual column name.

I've been lazily checking the release notes but could not find anything on this interesting change, but it could be that i didn't notice it.

Note that this new format is not the DBMS_XMLGEN canonical format (as it wasn't the previous one either).

DBMS_XMLGEN canonical format is:
ROWSET/ROW/COLUMN NAME

You can download and use the following XSL stylesheet (SQLDEV2APEX.XSL) to convert from this new format to the DBMS_XMLGEN canonical format, in case you wish to use the exported file to load a table using DBMS_XMLSTORE or through Oracle Application Express (Apex) Data Load page.

Wednesday, May 07, 2008

Extracting nodes belonging to different namespaces

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

As soon as i posted the previous article on the error caused by a missing namespace string parameter in the call to EXTRACT (or EXTRACTVALUE or UPDATEXML), a subliminal question started buzzing in my head.

What happens if i need to extract node(s) whose XPath expression contains elements belonging to different namespaces?
More precisely, how does the namespace parameter look like in such SQL expression?

The answer, fortunately, was found at the first attempt.
Let's take the same document used previously:


select extractValue(
xml_content,
'/feed/openSearch:totalResults',
'xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns="http://www.w3.org/2005/Atom"') val
from xml_documents
where id = 38;

VAL
---
175
As you can see the feed element has a default namespace (no prefix) matched by the blue string and the totalResults element, prefix openSearch, is matched by the green string. Both namespaces appear inside the same string (the famous third parameter of EXTRACT or EXTRACTVALUE), separated by a blank.

I guess one can generalize the namespace syntax as follows:
'xmlns[:prefix]="namespace1" [xmlns[:prefix]="namespace2"] [xmlns[:prefix]=...]'

Specifying the default namespace (sting in purple color in the document above) in the SQL/XML expression is necessary, if you don't do that, you'll get NULL as result:
select extractValue(
xml_content,
'/feed/openSearch:totalResults',
'xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"') val
from xml_documents
where id = 38;

VAL
---
(null)

LPX-00601: Invalid token in 'XPath expression'

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

You can get this error while attempting to extract nodes containing a namespace prefix using a SQL expression like the following:

select extractValue(
xml_content,
'//openSearch:totalResults') val
from xml_documents
where id = 38;

ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: '//openSearch:totalResults'
The problem is caused by the missing namespace parameter in the function call:

select extractValue(
xml_content,
'//openSearch:totalResults',
'xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"') val
from xml_documents
where id = 38;

VAL
---
175
Clearly the namespace declaration in green, must match the corresponding string in the source XML document.
Note also that Oracle uses double quotes to enclose the string whereas single or double quotes might be used in the source document indifferently, what really matters is the string delimited by the quotes and do not forget that is case sensitive: a mismatching string will cause a null value to be returned instead of the expected node.

See a previous posting on problems related to default namespaces declarations and Oracle XML functions.

Oracle's XML SQL functions and the default namespace

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

Although I've been developing applications that make extensive use of XML for years, yesterday i was really amazed when i discovered that Oracle functions like EXTRACT and EXTRACTVALUE return a null value when the document being handled includes a default namespace declaration in the topmost element (see the purple string in the document sample below) and you do not explicitly specify this namespace as the third parameter for these functions.

Let's take a sample RSS XML document (many elements omitted for clarity):


select extractValue(xml_content,'/feed/title') title
from xml_documents
where id = 38;

TITLE
------
(null)

How can it be? i can see the title element right there below the feed element!

To make things worse, add up to the picture that the documentation for Oracle (up until 11gR1) is not so clear on this point but you might think that in the end it's just a matter of looking at some examples given in the SQL reference, however you may easily see yourself that the examples for EXTRACT and EXTRACTVALUE do not show the usage of the third parameter and the syntax diagram merely says "namespace string", without giving any insight on the real syntax of this value. Actually, finding a working example in the official documentation is not so straightforward as you need to go to the search page and review all the examples given for the EXTRACT function in the XML set of books, until you find the good one...

As a consequence, initially, i thought it would be enough to specify the namespace string, but all i got was

select extractValue(xml_content,'/feed/title','http://www.w3.org/2005/Atom') title
from xml_documents
where id = 38;

ORA-31013: Invalid XPATH expression.
At this point i was even more puzzled because even if i got this rather misleading error message, i had the feeling that the culprit was an incorrectly specified namespace string, so i set out on the web in pursue of some working example.

After some research i finally encountered an OTN forum posting where this phantom parameter was eventually specified, so i adapted the example for my case:
select extractValue(xml_content,'/feed/title','xmlns="http://www.w3.org/2005/Atom"') title
from xml_documents
where id = 38;

TITLE
------------------------------------
Annals of Oracle's Improbable Errors
So, finally we got it, but notice the peculiar syntax (in green and blue) and the double enclosing quotes around the namespace string.
At least we can now draw a preliminary conclusion, the namespace string syntax for EXTRACT, EXTRACTVALUE and UPDATEXML is the following:
'xmlns[:prefix]="namespace"'
and in the case of a default namespace there is no prefix.

You may wonder, as i did, why you never came across this problem before today.
May be i always dealt with XML documents without a default namespace declaration like those spawned by Oracle Application Express for instance, when you unload a table in XML format.
Such documents do not pose any problems to the EXTRACT or EXTRACTVALUE functions, so you may live well for years ignoring the namespace parameter.

Note also that a tool like XMLSpy does not ask you to specify a default namespace, for the simple reason it is considered a default value, so, when you specify an XPath expression like /feed/title, it assumes that the elements without a prefix belong to the default namespace.
This situation may easily lead to some confusion if you try out such XPath expression in XMLSpy first and then you use it inside an Oracle XML/SQL expression returning nothing.

I can't say if the behavior depends on a strict interpretation of the XML specification, at any rate it's somewhat curious that one is forced to specify a supposedly default value.

Tuesday, April 22, 2008

Checking the MIME type of an URL (with Apex)

This posting is to announce that a new MIME type checking page is available at my company's site:

http://www.yocoya.com/pls/apex/f?p=yocoya:mime:0:en


The need for this tool arose after discovering that a site i had bookmarked for doing the same thing had been discontinued or moved to another domain, so i thought it could be a good exercise to create a page with the help of Oracle Application Express and the built-in UTL_HTTP packaged procedures.
At the same time, i wanted to understand better the Oracle Apex HTTP redirect behavior so i came up with this tool addressing both issues.
In the end it was quite entertaining to write the code and i finally got a clear picture of the redirect problem.

But why on earth should one be concerned about the MIME type after all?

Knowing the MIME type of a document retrieved from the web may be necessary when diagnosing problems like a browser that fails to display a document inline, but attempts to download it as a binary file. This kind of situations is often caused by an improper setting of the MIME type in the web server configuration.
A typical example is with certain sites returning SVG documents with an invalid MIME type like application/svg-xml whereas the correct MIME type should be application/svg+xml (note the plus sign instead of the minus sign).
Another frequent hit is a wrong WSDL (Web Service Definition Language) MIME type, so instead of getting application/wsdl+xml, you get text/plain.

Coming to the underlying implementation, if you need to check for the MIME type of an URL programmatically, the functionality will be a refinement of the following basic expression:
HttpUriType.createUri('http://wap.priceblog.it').getContentType();

text/vnd.wap.wml; charset=UTF-8
caveat:
due to the http redirects, if you specify an URL pointing to an Oracle Application Express application using the PL/SQL expression above, you may get:

HttpUriType.createUri('http://www.yocoya.com').getContentType();
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1231
ORA-12545: Connect failed because target host or object does not exist
ORA-06512: at "SYS.HTTPURITYPE", line 108
The quick workaround consists in supplying a complete apex URL including a valid session id (the big number after the second colon), that is something like:
begin
dbms_output.put_line(
HttpUriType.createUri(
'http://www.yocoya.com/pls/apex/f?p=yocoya:oerr:1547750763260356').getContentType());
end;
/

text/html; charset=UTF-8
Note that apex sessions expire over time, so you may get an error if you execute the program above as it is, you must use a "fresh" session ID.

Finding out the actual session id and take you to the final page or document is the primary task of the tool i made available on-line.
Clearly there is something more going on behind the scenes, because of the Apex redirect problem mentioned earlier and incidentally i found out that the built-in method called UTL_HTTP.SET_FOLLOW_REDIRECT(n) doesn't work correctly for n greater than zero when talking to an Apex application, it seems to me that it doesn't cope with relative redirects.
That's why i had to come up with this custom procedure.

So, in case you need to check out the MIME type of a document available online or watch what goes on behind the scenes when opening a public page served by Apex, this tool can help.

Or so i guess :-)

The page is a beta version, there could be situations that i didn't think of, so i strongly encourage to report any issues you may encounter or submit enhancement requests.
The errors returned by the UTL_HTTP package are automatically converted into web links to the yocoya's oracle error translation online tool that i introduced a while ago, providing error message translations in 30 languages and quick links to the online Oracle documentation of different releases and, last but not least, oraclequirks.com itself, just in case, however i haven't had the time to publish anything on these specific errors yet, so may be i'll post something in the next weeks.

Friday, April 18, 2008

ORA-31086: insufficient privileges to register schema

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

Attempting to register a global XML schema as a non-privileged user, you may get the following error:

BEGIN
DBMS_XMLSCHEMA.registerSchema(
SCHEMAURL => 'http://www.acme.com/XMLSchemaURL.xsd',
SCHEMADOC => bfilename('XMLDIR','someXMLSchema.xsd'),
CSID => nls_charset_id('AL32UTF8'),
LOCAL => FALSE);
END;

ORA-31086: insufficient privileges to register schema "http://www.acme.com/XMLSchemaURL.xsd"

when you specify the boolean value FALSE for LOCAL, you are attempting to register a global XML schema, but only privileged users like the DBA can perform this operation.

See message translations for ORA-31086 and search additional resources

Sunday, December 16, 2007

On Oracle XDB repository, FTP, WebDAV and firewall issues

After recovering the situation as described in my previous posting, i was finally ready to access my Oracle XE XDB repository via FTP or at least, that was what i thought...

Enabling XDB access via FTP protocol is just a matter of setting a valid port value in the ftp-port parameter inside xdbconfig.xml (theoretically). Typically this value will not be 21, the standard FTP port, because that would conflict with the main FTP server, if any, so the suggested value in many examples is 2100. That is the value i used. If you carefully read the Oracle documentation there is a note about setting XDB FTP on port 21.

I was ready to test my connection and i wanted to try it out with the built-in FTP client of Windows but at first i failed to understand how to specify the port number, so, after a couple of unsuccessful attempts, i gave up with ftp.exe and i went straight to Filezilla.

But even with Filezilla, i hit soon a major problem because it wasn't able to list the root folder after connecting to XDB. Here is the error message that you can receive in such situation:
Transfer channel can't be opened.
Reason: A connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed
because connected host has failed to respond.

Then a bell rang in my head and i changed the configuration from "Default" to Active Mode.
Using FTP in active mode is mentioned in the documentation, as i found out after a while.
Whether you can get FTP to work in passive mode or not is hard to say. The documentation says that it depends on the presence of either localhost or 127.0.0.1 as HOSTNAME in listener.ora, however i tried using passive mode on a server having listener.ora pointing to an address other than 127.0.0.1 and it didn't work.

After setting active mode, Filezilla started working eventually, however i find that the default 60 seconds session timeout is far too short and the "keep alive" method of Filezilla is giving some troubles, so i disabled it.

Once i got filezilla to work, i went back to ftp.exe. I just couldn't believe that i could not specify a port. Indeed there is a way, but not from the command line (as far as i know), from the command prompt execute ftp.exe, then from the ftp prompt, enter:
open host port
in my case this is:
open localhost 2100
It may take a while for the connection to be established, but then it should work.

So far so good, but what about FTP access from another computer?
Well, it all depends on the firewall(s) in between and/or the firewall rules. When there are no active firewalls between client and server, then you just need to repeat the set up already explained, the only difference being the XDB server IP address.

However, if there are active firewalls, then it may be tricky to configure the firewall rules for the FTP protocol in active mode, because you don't know exactly on which port XDB is going to
talk back to your client. The communication will occur on some port above 1023, but i am not aware of any parameter in xdbconfig.xml where one can force this random port to be chosen in a given range, thus the only option is to open up the whole range between 1024 and 65535.

I made a test on my Mac and after disabling the firewall, i could connect to XDB without problems. Unfortunately disabling the firewall altogether doesn't seem the best idea these days.

Given this situation, the best option is probably to set up a tunnelled FTP connection through SSH. May be this will be the subject of a future posting...

At this point i can draw some conclusions:
  • the best option, provided it works flawlessly, is to set up a WebDAV connection to XDB. WebDAV worked out-of-the-box in my case, (save the problem i had when i saved the xdbconfig.xml file on my Mac...) and makes no distinction between local or remote access from a configuration point of view. It's also "firewall friendly" because it uses the same port as Oracle Apex, which means that if Apex is working from a remote machine, then WebDAV access to XDB should be working as well (see the note about HTTP(S) when working on Windows XP SP2).
  • Ftp works well when client and server reside on the same machine but it can be troublesome when the client is located on a remote machine and there are firewalls in between.

Friday, December 14, 2007

ORA-31114: XDB configuration has been deleted or is corrupted

Yesterday, for some reason, i suddenly decided that i wanted to set up a FTP connection with the XDB repository of my XE database running on a xubuntu virtual machine.

After creating the WebDAV connection on my Mac, i edited the /xdbconfig.xml because i needed to set the FTP port to some value other than zero (by default FTP protocol access is disabled on XE).

Upon saving the file i got a file save failure and guess what? xdbconfig.xml was gone!

If you think that as an Apex developer you can easily get on without that file, you are plain wrong.
Apex was gone as well.
I tried connecting to the Apex login page but all i got was a wonderful blank page, not even an error, just an empty page and this is easily explained by the fact that on XE all Apex ancillary files are stored in XDB.

Finally, when i tried to execute a simple query on RESOURCE_VIEW, i got the (in)famous error message:

ORA-31114: XDB configuration has been deleted or is corrupted

At this point i had to take a decision: to restore the whole database just for recovering this tiny bit of information or to find some other solution.

I opted for the latter because i thought i could recover the file from another XE database i had on a different machine and, luckily enough, the operation was easier than expected.

I find that with Oracle, being such a vast product, the main problem is often to locate the right tool for doing a certain operation rather than doing the operation itself. And so it was, because it took me more time to spot the procedure in the Oracle Documentation than to restore that damned file.

Before showing how i did it, let me give you a simple advice.
If you are ever going to tamper with xdbconfig.xml, i suggest you to make an off-line copy of the file, just in case.
So, how to extract the current version of xdbconfig.xml without using WebDAV or FTP?

Piece of cake (when everything is working of course...) , connect as SYS or SYSTEM and execute:
select dbms_xdb.cfg_get().getClobVal()
from dual
copy and paste the result into a text file and call it xdbconfig.backup or whatever.

Now imagine that you need to perform the reverse operation taking the source of xdbconfig.xml from another database or from your saved copy. Again, you need to perform this operations as user SYS or SYSTEM.

First of all you need to ascertain whether the file exists or not (see note at the bottom dec 16):
select * from resource_view
where any_path = '/xdbconfig.xml'
if the resource exists, it means that it has been corrupted in some way, in which case you should be able to overwrite it by using the following procedure:

first of all, open the backup xdbconfig.xml file. If you haven't one, then you can try copying the source contained in the Oracle documentation, you can modify some parameters later, if needed.

set define off
set serveroutput on
declare
xmlf xmltype;
begin
xmlf := xmltype.CreateXML('-- PASTE HERE THE XML SOURCE COPIED FROM THE FILE --');
dbms_xdb.cfg_update(xmlf);
end;
If the file is missing altogether, you can re-create the resource (this is what i had to do actually...) by using the following script:
set define off
set serveroutput on
declare
xmlf xmltype;
res boolean;
begin
xmlf := xmltype.CreateXML('-- PASTE HERE THE XML SOURCE COPIED FROM THE FILE --');
res := dbms_xdb.createresource('/xdbconfig.xml',xmlf);
if res then
dbms_output.put_line('file created');
else
dbms_output.put_line('file not created');
end if;
end;
Comment added on December 16: if the xdbconfig.xml file is corrupt or missing, then you will not be able to execute the query on RESOURCE_VIEW. When i wrote up my posting, i had already recovered it so this explains why i could perform that query. So, you just need to execute the procedure for recreating it (the last one), it if fails, then fall back to the update procedure (the second last one).
-------------------------------------------
ORA-31114: La configurazione XDB è stata eliminata o è danneggiata
ORA-31114: la configuración XDB se ha suprimido o está corrupta
ORA-31114: La configuració XDB s'ha suprimit o està malmesa
ORA-31114: La configuration XDB a été supprimée ou est endommagée.
ORA-31114: XDB-Konfiguration wurde gelöscht oder ist beschädigt
ORA-31114: Η διαμόρφωση XDB έχει διαγραφεί ή έχει αλλοιωθεί
ORA-31114: XDB-konfiguration er slettet eller beskadiget
ORA-31114: XDB-konfigurationen har tagits bort eller är skadad
ORA-31114: XDB-konfigurasjonen er slettet eller ødelagt
ORA-31114: XDB-kokoonpano on poistettu tai virheellinen
ORA-31114: az XDB konfiguráció törölve lett vagy sérült
ORA-31114: Configuraţia XDB a fost ştearsă sau este coruptă
ORA-31114: De XDB-configuratie is verwijderd of beschadigd.
ORA-31114: Configuração de XDB foi deletada ou está danificada
ORA-31114: A configuração de XDB foi apagada ou está corrompida
ORA-31114: Конфигурация XDB удалена или повреждена
ORA-31114: Konfigurace XDB byla odstraněna nebo je porušena
ORA-31114: Konfigurácia XDB je odstránená alebo poškodená
ORA-31114: XDB - konfiguracja została usunięta lub jest uszkodzona
ORA-31114: XDB konfigürasyonu silindi veya bozuk
ORA-31114: XDB configuration has been deleted or is corrupted

See message translations for ORA-31114 and search additional resources

Wednesday, October 10, 2007

ORA-19025: EXTRACTVALUE returns value of only one node

This error occurs when you try to extract scalar values from an XML fragment containing multiple nodes.
In order to simulate error, try executing the following query in a schema where you have at least two tables:
SELECT extractvalue(
xmltype.createXML(
dbms_xmlgen.getxml('select * from user_tables'))
,'/ROWSET/ROW/TABLE_NAME')
FROM dual;

ORA-19025: EXTRACTVALUE returns value of only one node
Indeed if you add a small XPath condition to the query above, you can get a valid result:
SELECT extractvalue(
xmltype.createXML(
dbms_xmlgen.getxml('select * from user_tables'))
,'/ROWSET/ROW[1]/TABLE_NAME')
FROM dual;
This query will extract the table name of the first TABLE_NAME node.

If you are trying to extract all table names from this XML file, then you must rewrite the query as i showed in a previous topic.

See message translations for ORA-19025 and search additional resources.



ORA-19025: EXTRACTVALUE restituisce il valore di un solo nodo
ORA-19025: EXTRACTVALUE devuelve un valor de un solo nodo
ORA-19025: EXTRACTVALUE retorna el valor de només un node
ORA-19025: EXTRACTVALUE renvoie la valeur d'un seul noeud
ORA-19025: EXTRACTVALUE gibt Wert von nur einem Knoten zurück
ORA-19025: Η τιμή EXTRACTVALUE επιστρέφει τιμή με μόνο ένα κόμβο
ORA-19025: EXTRACTVALUE returnerer kun værdi for én node
ORA-19025: EXTRACTVALUE returnerar värdet för bara en nod
ORA-19025: EXTRACTVALUE returnerer en verdi for bare én node
ORA-19025: EXTRACTVALUE palauttaa vain yhden solmun arvon
ORA-19025: Az EXTRACTVALUE csak egy csomópont értékét adja vissza.
ORA-19025: EXTRACTVALUE returnează valoarea pentru un singur nod
ORA-19025: EXTRACTVALUE retourneert waarde van slechts één node.
ORA-19025: EXTRACTVALUE retorna valor de apenas um nó
ORA-19025: EXTRACTVALUE devolve o valor de um único nó
ORA-19025: EXTRACTVALUE возвращает значение только одного узла
ORA-19025: EXTRACTVALUE vrací pouze hodnotu jednoho uzlu
ORA-19025: EXTRACTVALUE vracia hodnotu len jedného uzla
ORA-19025: EXTRACTVALUE zwraca wartość tylko jednego węzła
ORA-19025: EXTRACTVALUE sadece tek bir düğümün değerini döndürür
ORA-19025: EXTRACTVALUE returns value of only one node

yes you can!

Two great ways to help us out with a minimal effort. Click on the Google Plus +1 button above or...
We appreciate your support!

latest articles