XMLTRANSORM - LPX-00607: Invalid reference - xsl:variable
Hi,
I'm working on Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit.
I have a problem using XMLTRANSFORM method with variable (ie. SenderDN).
There is a table "ma_table" with three columns : "id", "data_xml" and "data_xsl".
Here is the query used :
SELECT XMLTRANSFORM (data_xml, data_xsl) FROM ma_table WHERE id = 64;Here is the data to transform :
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOSTA xmlns="http://www.xxxxxx.com/yyyy/pipo">
<infos>
<generated>2009-08-19T16:23:56</generated>
<reference_tech>ABCD123456789</reference_tech>
</infos>
<RECEDEP>AAAAAAAA</RECEDEP>
<SENDERM>BBB</SENDERM>
<REFSEND>5100161753</REFSEND>
<QUALIFI>N</QUALIFI>
<REFINTE>0010000934487</REFINTE>
<TYPSTAT>IPRC</TYPSTAT>
<STAREMT>REJT</STAREMT>
<RAISON>DSEC</RAISON>
<NARRA>blablabla</NARRA>
<NARRA1>blablabla</NARRA1>
<NARRA2/>
<CENTRDT>20090819</CENTRDT>
<STTLMDT>00000000</STTLMDT>
<TYPSORA>SOU</TYPSORA>
<INDMONT>O</INDMONT>
<QUANTFI/>
<SEAMMNT>10941,19</SEAMMNT>
<CLIEDEV>EUR</CLIEDEV>
<IFICODI>EEEEEEEEEE</IFICODI>
<IFILIBE/>
<IDCPTIT>123456789456132</IDCPTIT>
<routage>
<feuille name="tagada">
<Destinataire>dest</Destinataire>
<Priority>Normal</Priority>
<IsNotificationRequested>false</IsNotificationRequested>
<Service>dervice</Service>
</feuille>
</routage>
</SOSTA>And here is the stylesheet :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:yyyy="http://www.xxxxxx.com/yyyy/pipo">
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<xsl:variable name="SenderDN">sender dn</xsl:variable>
<xsl:variable name="SenderBIC8">bic height</xsl:variable>
<xsl:template match="/*">
<DataPDU xmlns="urn:swift:saa:xsd:saa.2.0">
<Header>
<Message>
<SenderReference>
<xsl:value-of select="./yyyy:infos/yyyy:reference_tech"/>
</SenderReference>
<MessageIdentifier>
<xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:MessageIdentifier"/>
</MessageIdentifier>
<Format>MX</Format>
<Sender>
<DN>
<xsl:value-of select="$SenderDN"/>
</DN>
<FullName>
<X1>
<xsl:value-of select="$SenderBIC8"/>
<xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:SenderBranchCode"/>
</X1>
</FullName>
</Sender>
<Receiver>
<DN>
<xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:ReceiverDN"/>
</DN>
<FullName>
<X1>
<xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:ReceiverBIC11"/>
</X1>
</FullName>
</Receiver>
<InterfaceInfo>
<UserReference>
<xsl:value-of select="./yyyy:infos/yyyy:reference_tech"/>
</UserReference>
</InterfaceInfo>
<NetworkInfo>
<Service>
<xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:Service"/>
</Service>
</NetworkInfo>
</Message>
</Header>
<Body>
<AppHdr>
<MsgRef>
<xsl:value-of select="./yyyy:infos/yyyy:reference_tech"/>
</MsgRef>
<CrDate>
<xsl:value-of select="./yyyy:infos/yyyy:generated"/>
</CrDate>
</AppHdr>
<Document> </Document>
</Body>
</DataPDU>
</xsl:template>
</xsl:stylesheet>And I get this error message :
ORA-31011: XML parsing failed
ORA-19202: Erroroccured in XML processing
LPX-00607: Invalid reference: 'SenderDN'Why this error?
How to use this variable?
Thanks,
-Dominique
Hi,
I'va found the solution by modifying the <xsl:stylesheet> like this :
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:yyyy="http://www.xxxxxx.com/yyyy/pipo"
xmlns="urn:swift:saa:xsd:saa.2.0">(adding xmlns="urn:swift:saa:xsd:saa.2.0")
But I don't understand why it work fine now ???
If anyone have an explanation?
Thanks,
-Dominique
Similar Messages
-
PLS-S-00487, Invalid reference to variable while compiling PRO*C program
Hi,
I am writing a PRO*C code and get an error in compilation.
Code is as below:
+#include <stdio.h>+
+#include <string.h>+
EXEC SQL INCLUDE sqlca.h;
int main(int argc , char **argv)
+{+
int i;
EXEC SQL BEGIN DECLARE SECTION;
VARCHAR connString[100];
struct emp_record
+{+
char name[25];
char dept[10];
int id;
int salary;
int comm;
int tot_sal;
+}e1;+
EXEC SQL END DECLARE SECTION;
strcpy (connString.arr, "abcd/efgh@ijkl");
connString.len = strlen ( connString.arr);
+printf("\n Connection is [%d][%s]",connString.len,connString.arr);+
+EXEC SQL CONNECT :connString;+
+if(sqlca.sqlcode!=0)+
+{+
+printf("\nFailed to Connect, sqlcode is %d\n",sqlca.sqlcode);+
+printf("\nOracle Message = %s", sqlca.sqlerrm.sqlerrmc);+
+exit(-1);+
+}+
+else+
+{+
+printf("\nConnected\n");+
+}+
+EXEC SQL EXECUTE+
+BEGIN+
+emp_calc ( :e1.name,+
+:e1.id,+
+:e1.salary,+
+:e1.tot_sal+
+);+
+END;+
+END-EXEC;+
+if(sqlca.sqlcode!=0)+
+{+
+printf("Oracle Error:[%d][%s]",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);+
+}+
+}+
Procedure code is:
+CREATE OR REPLACE PROCEDURE "EMP_CALC" (+
+pi_empname in emp.ename%type,+
+pi_empno in emp.empno%type,+
+pi_sal in emp.sal%type,+
+po_totsal out NUMBER)+
+is+
+begin+
+po_totsal := 1.1 * pi_sal;+
+dbms_output.put_line('Total Salary is:' || po_totsal);+
+end;+
*My main aim is to use elements of a structure in procedure call as parameters*
*But when I compile I get error on such usage as follows:*
Pro*C/C++: Release 11.2.0.3.0 - Production on Tue Apr 30 16:59:22 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
System default option values taken from: /mtsapp1/ora11g/product/11.2.0.3/dbhome_1/precomp/admin/pcscfg.cfg
Error at line 52, column 20 in file singleStructOra.pc
emp_calc ( :e1.name,
...................1
PLS-S-00487, Invalid reference to variable 'E1'
Error at line 52, column 1 in file singleStructOra.pc
emp_calc ( :e1.name,
1
PLS-S-00000, Statement ignored
Semantic error at line 50, column 1, file singleStructOra.pc:
BEGIN
1
PCC-S-02346, PL/SQL found semantic errors
*I would like to know how to resolve this compilation error and how do I use members of structures in such a procedure call.*
Thanks....Sadly PL/SQL blocks do not understand structs (or arrays). DML statements do understand them.
This is not very clearly stated in the manual, but it does say:
http://docs.oracle.com/cd/E11882_01/appdev.112/e10825/pc_08arr.htm#autoId33
Restrictions on Arrays of Structs
The following restrictions apply to the use of arrays of structs in Pro*C/C++:
Arrays of structs (just as with ordinary structs) are not permitted inside an embedded PL/SQL block.
http://docs.oracle.com/cd/E11882_01/appdev.112/e10825/pc_07pls.htm#autoId13
Do not use C pointer or array syntax in PL/SQL blocks. The PL/SQL compiler does not understand C host-variable expressions and is, therefore, unable to parse them.
Although the example uses an array of structs, simple structs also fail. I have always had to copy the fields to and from simple variables when calling stored procedures.
regards,
David -
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
Oracle 9.2 client ORA 8.1.7 Server:
Trying to run an SP in SQL navigator ( or PL/SQL)
I get the following error(s)
ORA-06550: line 6, column 16:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 6, column 3:
++++++++++++++++++++++++++++++++++++++++++++
Here's the Package and Proc Code with the errors at the end.
It seems not to like a Ref Cursor, but I'm not experienced enough to know the reason.
ANy Help would be very appreciated: AJACODE
++++++++++++++++++++++++++++++++++++++++++++
--Package Spec
Package RPT_NB_GUI_Param_Get_PKG
IS
TYPE rc_Params_gettbl IS RECORD (
o_QueryID Number,
o_ParameterID Number,
o_Param VARCHAR2 (20),
o_Param_Type VARCHAR2 (50),
o_Param_QueryID Number
TYPE rc_params IS REF CURSOR RETURN rc_Params_gettbl;
END; -- Package Specification RPT_NB_GUI_Param_Get_PKG
--+++++++++++++++++++++++++++++++++++++++++
-- Proc
Procedure RPT_NB_GUI_Param_Get_PROC
p_QueryID in Number ,
rc_ParamsGet IN OUT RPT_NB_GUI_Param_Get_PKG.rc_Params)
IS
-- Purpose: To generate Parameters for GUI
-- MODIFICATION HISTORY
-- Person Date Comments
-- AJ Grasso 04/11/2003 Created
BEGIN
OPEN rc_ParamsGet For
SELECT
QP.QueryID
,P.ParameterID
,P.Parameter
,PT.Parameter_Type
,PQ.Parameter_QueryID
FROM
rpt_Query_Parameter QP, rpt_Parameter P, rpt_Parameter_Type PT, rpt_parameter_query PQ
WHERE --inner join rpt_Parameter P ON
(QP.ParameterID = P.ParameterID)
AND --inner join rpt_Parameter_Type PT ON
(QP.Parameter_TypeID = PT.Parameter_TypeID)
AND --left outer join rpt_parameter_query PQ ON
(QP.Parameter_queryID = PQ.parameter_queryID)
AND (QP.QueryID = p_QueryID) ;
END; -- RPT_NB_GUI_Param_Get_PROC
-- ERRORS
-- +++++++++++++++++
ORA-06550: line 6, column 16:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 6, column 3:
PL/SQL: Statement ignored
ORA-06550: line 7, column 16:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 7, column 3:
PL/SQL: Statement ignored
ORA-06550: line 8, column 16:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 8, column 3:
PL/SQL: Statement ignored
ORA-06550: line 9, column 16:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 9, column 3:
PL/SQL: Statement ignored
ORA-06550: line 10, column 16:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 10, column 3:
PL/SQL: Statement ignored
ORA-06550: line 16, column 74:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 16, column 3:
PL/SQL: Statement ignored
ORA-06550: line 17, column 78:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 17, column 3:
PL/SQL: Statement ignored
ORA-06550: line 18, column 71:Oracle 9.2 client ORA 8.1.7 Server:
Trying to run an SP in SQL navigator ( or PL/SQL)
I get the following error(s)
ORA-06550: line 6, column 16:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 6, column 3:
++++++++++++++++++++++++++++++++++++++++++++
Here's the Package and Proc Code with the errors at the end.
It seems not to like a Ref Cursor, but I'm not experienced enough to know the reason.
ANy Help would be very appreciated: AJACODE
++++++++++++++++++++++++++++++++++++++++++++
--Package Spec
Package RPT_NB_GUI_Param_Get_PKG
IS
TYPE rc_Params_gettbl IS RECORD (
o_QueryID Number,
o_ParameterID Number,
o_Param VARCHAR2 (20),
o_Param_Type VARCHAR2 (50),
o_Param_QueryID Number
TYPE rc_params IS REF CURSOR RETURN rc_Params_gettbl;
END; -- Package Specification RPT_NB_GUI_Param_Get_PKG
--+++++++++++++++++++++++++++++++++++++++++
-- Proc
Procedure RPT_NB_GUI_Param_Get_PROC
p_QueryID in Number ,
rc_ParamsGet IN OUT RPT_NB_GUI_Param_Get_PKG.rc_Params)
IS
-- Purpose: To generate Parameters for GUI
-- MODIFICATION HISTORY
-- Person Date Comments
-- AJ Grasso 04/11/2003 Created
BEGIN
OPEN rc_ParamsGet For
SELECT
QP.QueryID
,P.ParameterID
,P.Parameter
,PT.Parameter_Type
,PQ.Parameter_QueryID
FROM
rpt_Query_Parameter QP, rpt_Parameter P, rpt_Parameter_Type PT, rpt_parameter_query PQ
WHERE --inner join rpt_Parameter P ON
(QP.ParameterID = P.ParameterID)
AND --inner join rpt_Parameter_Type PT ON
(QP.Parameter_TypeID = PT.Parameter_TypeID)
AND --left outer join rpt_parameter_query PQ ON
(QP.Parameter_queryID = PQ.parameter_queryID)
AND (QP.QueryID = p_QueryID) ;
END; -- RPT_NB_GUI_Param_Get_PROC
-- ERRORS
-- +++++++++++++++++
ORA-06550: line 6, column 16:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 6, column 3:
PL/SQL: Statement ignored
ORA-06550: line 7, column 16:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 7, column 3:
PL/SQL: Statement ignored
ORA-06550: line 8, column 16:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 8, column 3:
PL/SQL: Statement ignored
ORA-06550: line 9, column 16:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 9, column 3:
PL/SQL: Statement ignored
ORA-06550: line 10, column 16:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 10, column 3:
PL/SQL: Statement ignored
ORA-06550: line 16, column 74:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 16, column 3:
PL/SQL: Statement ignored
ORA-06550: line 17, column 78:
PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
ORA-06550: line 17, column 3:
PL/SQL: Statement ignored
ORA-06550: line 18, column 71: -
PLS-00487: Invalid reference to variable ' expression '
oracle database 10G
OS unix
One of procedure is giving error PLS-00487: Invalid reference to variable '<expression>' while compilation in above database while it is compiling
successfully in other database.
Is there any database error?PLS-00487: Invalid reference to variable "string"
Cause: A variable was referenced in a way that is inconsistent with its datatype. For example, a scalar variable might have been mistakenly referenced as a record, as follows: DECLARE CURSOR emp_cur IS SELECT empno, ename, sal FROM emp; emp_rec emp_cur%ROWTYPE; my_sal NUMBER(7,2); BEGIN ... total_sal := total_sal + my_sal.sal; -- invalid ...
Action: Check the spelling of the variable name. Make sure the variable was declared properly and that the declaration and reference are consistent regarding datatype.
Most probably the compiler "sees" some other type variable with the same name first which in the other database doesn't exist or is out of scope.
Regards
Etbin -
Error:Invalid reference to variable 'PARTS1.PNUM%TYPE' - how to resolve
error:
ERROR at line 29:
ORA-06550: line 29, column 39:
PLS-00487: Invalid reference to variable 'PARTS1.PNUM%TYPE'
ORA-06550: line 29, column 4:
PL/SQL: SQL Statement ignored
DECLARE
cursor c1 is select pnum from parts1;
TYPE NumTab IS TABLE OF parts1.pnum%TYPE INDEX BY PLS_INTEGER;
TYPE NumTab1 IS TABLE OF parts1.pnum%TYPE INDEX BY PLS_INTEGER;
--TYPE NameTab IS TABLE OF parts1.pname%TYPE INDEX BY PLS_INTEGER;
pnums NumTab;
pnums1 NumTab1;
-- pnames NameTab;
--iterations CONSTANT PLS_INTEGER := 500;
t1 INTEGER;
t2 INTEGER;
t3 INTEGER;
l_num_index integer := 0;
BEGIN
FOR j IN 1..50000 LOOP -- load index-by tables
insert into parts1 values(j);
END LOOP;
commit;
t1 := DBMS_UTILITY.get_time;
/* FOR i IN 1..iterations LOOP -- use FOR loop
INSERT INTO parts1 VALUES (pnums(i));
END LOOP;
select pnum bulk collect into pnums from parts1;
t2 := DBMS_UTILITY.get_time;
open c1;
loop
l_num_index := l_num_index + 1;
fetch c1 into pnums1(l_num_index).pnum;
EXIT WHEN c1%notfound;
end loop;
close c1;
t3 := DBMS_UTILITY.get_time;
DBMS_OUTPUT.PUT_LINE('Execution Time (secs)');
DBMS_OUTPUT.PUT_LINE('---------------------');
DBMS_OUTPUT.PUT_LINE('FOR loop: ' || TO_CHAR((t2 - t1)/100));
DBMS_OUTPUT.PUT_LINE('FORALL: ' || TO_CHAR((t3 - t2)/100));
COMMIT;
END;
thanks,
vinodhThe line number in the error message is nearly always a good clue.
fetch c1 into pnums1(l_num_index).pnum;should be
fetch c1 into pnums1(l_num_index); -
LPX-00217 invalid character error - Using reference characters in XML file
Hi, I hope you will help me to understand and to fix the error I get during insert of an XML file into a table with XML Type field.
I used Oracle documentation for this:
1. Create table
CREATE TABLE XMLDOC
( XMLCOLUMN xmltype);
2. Create external directory
CREATE OR REPLACE DIRECTORY FILESDIR AS 'E:\ora_xml_test\';
3. Create function
CREATE OR REPLACE function DSS.getClobDocument(
filename in varchar2,
charset in varchar2 default NULL)
return CLOB deterministic
is
file bfile := bfilename('FILESDIR',filename);
charContent CLOB := ' ';
targetFile bfile;
lang_ctx number := DBMS_LOB.default_lang_ctx;
charset_id number := 0;
src_offset number := 1 ;
dst_offset number := 1 ;
warning number;
begin
if charset is not null then
charset_id := NLS_CHARSET_ID(charset);
end if;
targetFile := file;
DBMS_LOB.fileopen(targetFile, DBMS_LOB.file_readonly);
DBMS_LOB.LOADCLOBFROMFILE(charContent, targetFile,
DBMS_LOB.getLength(targetFile), src_offset, dst_offset,
charset_id, lang_ctx,warning);
DBMS_LOB.fileclose(targetFile);
return charContent;
end;
And now appears the problem when I use different character references - one of them are parsed by the XML parser and another -are not:
test1.xml - Contains a charachter from Latin language -ă (ă)
<?xml version="1.0" encoding="UTF-8"?>
<ROWSET>
<ROW
<IDNO>1</IDNO>
<NAME>aaa (ă)</NAME>
</ROW>
</ROWSET>
--a semicolumn must be added after 103
SQL> insert into XMLDOC values(xmltype(getClobDocument('test1.xml','UTF8')));
1 row created.
test2.xml - Contains a charachter from Cyrillic language -ш (Є)
<?xml version="1.0" encoding="UTF-8"?>
<ROWSET>
<ROW>
<IDNO>1</IDNO>
<NAME>aaa (Є)</NAME>
</ROW>
</ROWSET>
--a semicolumn must be added after 404
SQL> insert into XMLDOC values(xmltype(getClobDocument('test2.xml','UTF8')));
insert into XMLDOC values(xmltype(getClobDocument('test2.xml','UTF8')))
ERROR at line 1:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00217: invalid character 1028 (\u0404)
Error at line 5
ORA-06512: at "SYS.XMLTYPE", line 0
ORA-06512: at line 1
I am not familiar to Unicode and encoding maybe I ' missing something.
Please help!!!Which database version are you using and what is the characterset used during its creation...?
There is a lot on this forum which has been already answered / addressed but the database must support it, in other words the characterset must support it. Among others, see Re: XML-Document with special characters for instance.
Conversion like you are doing (ă) is not needed. -
LPX-00601: Invalid token in: err while trying to read data from xml
Hey ,
While trying to read data from xml i got err:
LPX-00601: Invalid token in: 'path'
the proc. i'm using to read data from the xml is:
procedure read_xml_file_test (in_filename in varchar2)
is
my_dir varchar2(20) := 'XML_DIR;
cur_emp2 number:=0;
l_bfile BFILE;
l_clob CLOB;
l_parser dbms_xmlparser.Parser;
l_doc dbms_xmldom.DOMDocument;
l_nl dbms_xmldom.DOMNodeList;
l_nl2 dbms_xmldom.DOMNodeList;
l_n dbms_xmldom.DOMNode;
l_n2 dbms_xmldom.DOMNode;
l_temp VARCHAR2(1000);
v_errors internet_clients.errors%type;
src_csid NUMBER := NLS_CHARSET_ID('UTF8');
dest_offset INTEGER := 1;
src_offset INTEGER := 1;
lang_context INTEGER := dbms_lob.default_lang_ctx;
warning INTEGER;
v_count number := 0; --total records
v_count_s number := 0; -- sucsess record
v_count_f number := 0; -- failed record
v_flag varchar2(1);
v_char2 varchar2(1);
v_l1 VARCHAR2(255);
v_l2 VARCHAR2(255);
v_l3 VARCHAR2(255);
v_l4 VARCHAR2(255);
v_l6 VARCHAR2(255);
BEGIN
l_bfile := BFileName(my_dir, in_filename);
dbms_lob.createtemporary(l_clob, cache=>FALSE);
dbms_lob.open(l_bfile, dbms_lob.lob_readonly);
dbms_lob.loadclobfromfile(l_clob, l_bfile, dbms_lob.getlength(l_bfile), dest_offset,src_offset, src_csid, lang_context, warning);
dbms_lob.close(l_bfile);
-- make sure implicit date conversions are performed correctly
dbms_session.set_nls('NLS_DATE_FORMAT','''DD/MM/RR HH24:MI:SS''');
-- Create a parser.
l_parser := dbms_xmlparser.newParser;
-- Parse the document and create a new DOM document.
dbms_xmlparser.parseClob(l_parser, l_clob);
l_doc := dbms_xmlparser.getDocument(l_parser);
-- Free resources associated with the CLOB and Parser now they are no longer needed.
dbms_lob.freetemporary(l_clob);
dbms_xmlparser.freeParser(l_parser);
-- Get a list of all the nodes in the document using the XPATH syntax.
l_nl := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'soap:Envelope/soap:Body/GetFieldsNameResponse/GetFieldsNameResult/diffgr:diffgram/DataSet_FRM_GANERIC_PROP/FRM_GANERIC_PROP');
-- Loop through the list and create a new record in a tble collection
-- for each record.
FOR cur_emp IN 0 .. dbms_xmldom.getLength(l_nl) - 1 LOOP
l_n := dbms_xmldom.item(l_nl, cur_emp);
cur_emp2:=0;
loop
v_count := v_count + 1;
begin
-- Use XPATH syntax to assign values to he elements of the collection.
dbms_xslprocessor.valueOf(l_n,'L1/text()',v_l1);
dbms_xslprocessor.valueOf(l_n,'L2/text()',v_l2);
dbms_xslprocessor.valueOf(l_n,'L3/text()',v_l3);
dbms_xslprocessor.valueOf(l_n,'L4/text()',v_l4);
dbms_xslprocessor.valueOf(l_n,'L6/text()',v_l6);
exception
when others then
null;
end;
exit when cur_emp2=dbms_xmldom.getLength(l_nl2);
END LOOP;
end loop;
-- Free any resources associated with the document now it
-- is no longer needed.
dbms_xmldom.freeDocument(l_doc);
--remove file to another directory
--COMMIT; -- do not use the commit if you want to run this proc. from within the search_dir_list proc , because it execute a select from tmp table dir_list which contain a "on commit delete rows" clause.
/*EXCEPTION
/*WHEN OTHERS THEN
dbms_lob.freetemporary(l_clob);
dbms_xmlparser.freeParser(l_parser);
dbms_xmldom.freeDocument(l_doc);
null;
ROLLBACK; */
END;While trying to execute this i got:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: 'soap:Envelope/soap:Body/GetFieldsNameResponse/GetFieldsNameResult/diffgr:diffgram/DataSet_FRM_GANERIC_PROP/FRM_GANERIC_PROP'
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 939
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 967
ORA-06512: at "MARKET.READ_XML_FILE_TEST", line 51
ORA-06512: at line 1
i guess i mised somthing at the line
l_nl := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'soap:Envelope/soap:Body/GetFieldsNameResponse/GetFieldsNameResult/diffgr:diffgram/DataSet_FRM_GANERIC_PROP/FRM_GANERIC_PROP');i attached here part of my xml:
<?xml version="1.0" encoding="UTF-8" ?>
- <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <GetFieldsNameResponse xmlns="http://tempuri.org/">
- <GetFieldsNameResult>
- <xs:schema id="DataSet_FRM_GANERIC_PROP" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xs:element name="DataSet_FRM_GANERIC_PROP" msdata:IsDataSet="true" msdata:Locale="he-IL">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="FRM_GANERIC_PROP">
- <xs:complexType>
- <xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
- <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
- <DataSet_FRM_GANERIC_PROP xmlns="">
- <FRM_GANERIC_PROP diffgr:id="FRM_GANERIC_PROP1" msdata:rowOrder="0">
<L1>val1</L1>
<L2>val2</L2>
<L3>val3</L3>
<L4>val4</L4>
<L6>val6</L6>
</FRM_GANERIC_PROP>
</DataSet_FRM_GANERIC_PROP>
</diffgr:diffgram>
</GetFieldsNameResult>
</GetFieldsNameResponse>
</soap:Body>
</soap:Envelope>I Guess it somthing that have to do with node definition ,
but i have tried so many combinations and none ot those worked for me.
i'm deeply stuck here.
What do i miss here?
THANKS yair
Edited by: yair_k on 02:30 14/10/2010Hey , after got a lot of success with the xml reading part , i wonder if you
can help me with a problem while trying to reading that xml from a web service.
i use a procedure as followes:
FUNCTION read_from_web_service(in_username in varchar2 , in_password in varchar2)
RETURN CHAR
AS
l_service UTL_DBWS.service;
l_call UTL_DBWS.call;
l_a_ns VARCHAR2(32767);
l_wsdl_url VARCHAR2(32767);
l_namespace VARCHAR2(32767);
l_service_qname UTL_DBWS.qname;
l_port_qname UTL_DBWS.qname;
l_operation_qname UTL_DBWS.qname;
l_xmltype_in SYS.XMLTYPE;
l_xmltype_out SYS.XMLTYPE;
l_return VARCHAR2(32767);
BEGIN
l_wsdl_url := 'http://www.company.com/publisherService/ServiceGetpublisherTable.asmx?wsdl';
l_namespace := 'http://tempuri.org/';
l_service_qname := UTL_DBWS.to_qname(l_namespace, 'ServiceGetpublisherTable');
l_port_qname := UTL_DBWS.to_qname(l_namespace, 'ServiceGetpublisherTableSoap');
l_operation_qname := UTL_DBWS.to_qname(l_namespace, 'GetFieldsName');
l_service := UTL_DBWS.create_service (
wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
service_name => l_service_qname);
l_call := UTL_DBWS.create_call (
service_handle => l_service,
port_name => l_port_qname,
operation_name => l_operation_qname);
l_xmltype_in := SYS.XMLTYPE('<?xml version="1.0" encoding="utf-8"?>
<GetFieldsName xmlns="' || l_namespace || '">
<user>' || in_username || '</user>
<password>'|| in_password || '</password>
</GetFieldsName>');
l_xmltype_out := UTL_DBWS.invoke(call_Handle => l_call,
request => l_xmltype_in);
UTL_DBWS.release_call (call_handle => l_call);
UTL_DBWS.release_service (service_handle => l_service);
l_return := l_xmltype_out.extract('//GetFieldsName/text()').getstringVal();
dbms_output.put_line(l_return);
RETURN l_return;
END;but when i run it i got message:
ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException: Server did not recognize the value of HTTP Header SOAPAction: .
regarding the line:
l_xmltype_out := UTL_DBWS.invoke(call_Handle => l_call,
request => l_xmltype_in);
So , i deeply stuck here!
my web service description is:
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
- <s:element name="GetFieldsName">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="GetFieldsNameResponse">
- <s:complexType>
- <s:sequence>
- <s:element minOccurs="0" maxOccurs="1" name="GetFieldsNameResult">
- <s:complexType>
- <s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="GetMSG_ByUser_Not_Readed">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="GetMSG_ByUser_Not_ReadedResponse">
- <s:complexType>
- <s:sequence>
- <s:element minOccurs="0" maxOccurs="1" name="GetMSG_ByUser_Not_ReadedResult">
- <s:complexType>
- <s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="SetMSG_ByUser_Not_Readed_As_Readed">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Rec_Id" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="SetMSG_ByUser_Not_Readed_As_ReadedResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="SetMSG_ByUser_Not_Readed_As_ReadedResult" type="s:boolean" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
- <wsdl:message name="GetFieldsNameSoapIn">
<wsdl:part name="parameters" element="tns:GetFieldsName" />
</wsdl:message>
- <wsdl:message name="GetFieldsNameSoapOut">
<wsdl:part name="parameters" element="tns:GetFieldsNameResponse" />
</wsdl:message>
- <wsdl:message name="GetMSG_ByUser_Not_ReadedSoapIn">
<wsdl:part name="parameters" element="tns:GetMSG_ByUser_Not_Readed" />
</wsdl:message>
- <wsdl:message name="GetMSG_ByUser_Not_ReadedSoapOut">
<wsdl:part name="parameters" element="tns:GetMSG_ByUser_Not_ReadedResponse" />
</wsdl:message>
- <wsdl:message name="SetMSG_ByUser_Not_Readed_As_ReadedSoapIn">
<wsdl:part name="parameters" element="tns:SetMSG_ByUser_Not_Readed_As_Readed" />
</wsdl:message>
- <wsdl:message name="SetMSG_ByUser_Not_Readed_As_ReadedSoapOut">
<wsdl:part name="parameters" element="tns:SetMSG_ByUser_Not_Readed_As_ReadedResponse" />
</wsdl:message>
- <wsdl:portType name="ServiceGetpublisherTableSoap">
- <wsdl:operation name="GetFieldsName">
<wsdl:input message="tns:GetFieldsNameSoapIn" />
<wsdl:output message="tns:GetFieldsNameSoapOut" />
</wsdl:operation>
- <wsdl:operation name="GetMSG_ByUser_Not_Readed">
<wsdl:input message="tns:GetMSG_ByUser_Not_ReadedSoapIn" />
<wsdl:output message="tns:GetMSG_ByUser_Not_ReadedSoapOut" />
</wsdl:operation>
- <wsdl:operation name="SetMSG_ByUser_Not_Readed_As_Readed">
<wsdl:input message="tns:SetMSG_ByUser_Not_Readed_As_ReadedSoapIn" />
<wsdl:output message="tns:SetMSG_ByUser_Not_Readed_As_ReadedSoapOut" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="ServiceGetpublisherTableSoap" type="tns:ServiceGetpublisherTableSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="GetFieldsName">
<soap:operation soapAction="http://tempuri.org/GetFieldsName" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="GetMSG_ByUser_Not_Readed">
<soap:operation soapAction="http://tempuri.org/GetMSG_ByUser_Not_Readed" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="SetMSG_ByUser_Not_Readed_As_Readed">
<soap:operation soapAction="http://tempuri.org/SetMSG_ByUser_Not_Readed_As_Readed" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="ServiceGetpublisherTableSoap12" type="tns:ServiceGetpublisherTableSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="GetFieldsName">
<soap12:operation soapAction="http://tempuri.org/GetFieldsName" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="GetMSG_ByUser_Not_Readed">
<soap12:operation soapAction="http://tempuri.org/GetMSG_ByUser_Not_Readed" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="SetMSG_ByUser_Not_Readed_As_Readed">
<soap12:operation soapAction="http://tempuri.org/SetMSG_ByUser_Not_Readed_As_Readed" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="ServiceGetpublisherTable">
- <wsdl:port name="ServiceGetpublisherTableSoap" binding="tns:ServiceGetpublisherTableSoap">
<soap:address location="http://www.company.com/publisherService/ServiceGetpublisherTable.asmx" />
</wsdl:port>
- <wsdl:port name="ServiceGetpublisherTableSoap12" binding="tns:ServiceGetpublisherTableSoap12">
<soap12:address location="http://www.company.com/publisherService/ServiceGetpublisherTable.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>also i have to mention that i have changed publisher references inside the code , and i also canot
supply username and password , so i guess you canot test it. still i not shure if my definitions (namespace est.) inside my code defined correctly.
hope you can help me with this.
regards
yair -
Xsl variable error not explained in earlier thread
Steve,
Thank you so much for your response to my earlier thread, it is difficult to focus on what I am supposed to be doing today, with all the sad news from the east coast.
Re-visiting this variable issue one more time to try understand what is going wrong with this file.
Below is a shortened version of the file plus the output from parsing it with xalan, saxon and oracle's two latest versions. As you see it parses fine with xalan and saxon but errors out with oracle's latest version. Should this be looked at again perhaps?
xml file
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="UtilDataForm.xsl"?>
<page>
<dataform target="News.xsql" submit="SubmitButtonTitle">
<item type="checkboxlist" name="nameOfCheckBoxList" label="CheckBoxList">
<ROWSET>
<ROW><VALUE>4</VALUE><DISPLAY>This</DISPLAY></ROW>
<ROW><VALUE>5</VALUE><DISPLAY>That</DISPLAY></ROW>
<ROW><VALUE>6</VALUE><DISPLAY>The Other</DISPLAY></ROW>
</ROWSET>
</item>
</dataform>
</page>
xsl file
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!--
| UtilDataForm.xsl: Transform <dataform> structural info
| into a data-bound HTML Form
+-->
<xsl:template match="dataform">
<xsl:variable name="form-target">
<xsl:choose>
<xsl:when test="@target">
<xsl:value-of select="@target"/>
</xsl:when>
<xsl:when test="./target">
<xsl:value-of select="./target"/>
<xsl:if test="*">?</xsl:if>
<xsl:for-each select="*">
<xsl:value-of select="name(.)"/>
<xsl:text>=</xsl:text>
<xsl:value-of select="."/>
<xsl:if test="position() != last()">
<xsl:text>&;</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<center>
<form method="POST" action="{$form-target}">
<xsl:for-each select="item[@type='hidden']">
<input type="hidden" name="{@name}" value="{normalize-space(.)}"/>
</xsl:for-each>
<table>
<xsl:for-each select="item[@type != 'hidden']">
<tr>
<th align="right"><xsl:value-of select="@label"/></th>
<td>
<xsl:choose>
<xsl:when test="@type='text'">
<input type="text" name="{@name}"
value="{normalize-space(.)}">
<xsl:if test="@size">
<xsl:attribute name="size">
<xsl:value-of select="@size"/>
</xsl:attribute>
</xsl:if>
</input>
</xsl:when>
<xsl:when test="@type='password'">
<input type="password" name="{@name}"
value="{normalize-space(.)}">
<xsl:if test="@size">
<xsl:attribute name="size">
<xsl:value-of select="@size"/>
</xsl:attribute>
</xsl:if>
</input>
</xsl:when>
<xsl:when test="@type='textarea'">
<textarea class="code" rows="5" name="{@name}">
<xsl:if test="@size">
<xsl:attribute name="cols">
<xsl:value-of select="@size"/>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="normalize-space(.)"/>
</textarea>
</xsl:when>
<xsl:when test="@type='list'">
<xsl:variable name="default" select="default"/>
<select name="{@name}">
<xsl:for-each select="ROWSET/ROW">
<option value="{VALUE}">
<xsl:if test="VALUE=$default">
<xsl:attribute name="selected"/>
</xsl:if>
<xsl:value-of select="DISPLAY"/>
</option>
</xsl:for-each>
</select>
</xsl:when>
<xsl:when test="@ty pe='checkboxlist'">
<xsl:variable name="name" select="@name"/>
<xsl:for-each select="ROWSET/ROW">
<input type="checkbox" name="{$name}" value="{VALUE}">
<xsl:if test="SELECTED='Y'">
<xsl:attribute name="checked"/>
</xsl:if>
</input>
<xsl:value-of select="DISPLAY"/>
</xsl:for-each>
</xsl:when>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
</table>
<input type="submit" value="{@submit}"/>
</form>
</center>
</xsl:template>
</xsl:stylesheet>
xalan output
<?xml version="1.0" encoding="UTF-8"?>
<center><form action="News.xsql" method="POST"><table><tr><th align="right">CheckBoxList</th><td><input value="4"
name="nameOfCheckBoxList" type="checkbox"/>This
<input value="5" name="nameOfCheckBoxList"
type="checkbox"/>That
<input value="6" name="nameOfCheckBoxList" type="checkbox"/>The Other
</td></tr></table><input
value="SubmitButtonTitle" type="submit"/></form></center>
saxon output
<?xml version="1.0" encoding="utf-8"?>
<center><form method="POST" action="News.xsql"><table><tr><th align="right">CheckBoxList</th><td><input type="checkbox"
name="nameOfCheckBoxList" value="4"/>This
<input type="checkbox" name="nameOfCheckBoxList" value="5"/>That
<input
type="checkbox" name="nameOfCheckBoxList" value="6"/>The Other
</td></tr></table><input type="submit"
value="SubmitButtonTitle"/></form></center>
oraxsl with xmlparserv2.jar dated 06/19/01 10:09
<?xml version = '1.0'?>
<center><form method="POST" action="News.xsql"><table><tr><th align="right">CheckBoxList</th><td><input type="checkbox"
name="nameOfCheckBoxList" value="4"/>This
<input type="checkbox" name="nameOfCheckBoxList" value="5"/>That
<input
type="checkbox" name="nameOfCheckBoxList" value="6"/>The Other
</td></tr></table><input type="submit"
value="SubmitButtonTitle"/></form></center>
oraxsl with xmlparserv2.jar dated 08/04/01 20:24
file:/W:/workorders/util/UtilDataForm.xsl: XSL-1031: (Error) Variable not defined: 'name'.
oracle.xml.parser.v2.XPathException: Variable not defined: 'name'.
Error occurred while processing W:\workorders\util\FormTest.xsql: file:/W:/workorders/util/UtilDataForm.xsl: XSL-1031:
(Error) Variable not defined: 'name'.
Thank you again for your help!
Ola Kvalvaag
IS Administrator
CT&E Environmental Services Inc.Yeah!!! It works. Turned out to be a combination of DrKlap's and Martisan's suggestions -- had to change var frame's declaration from JFrame to MyFrame:
MyFrame frame;Next, created the external class -- but again changed JFrame references to MyFrame:
public class ShowOnExit extends WindowAdapter {
// JFrame aFrame;
MyFrame aFrame;
public ShowOnExit(MyFrame f) {
aFrame = f;
public void windowClosing(WindowEvent e)
System.out.println("Why me???" + aFrame.textArea.getText()); // aFrame here not frame !!!
}This worked. So looks like even though the original code added a WindowListener to 'frame', the listener didn't couldn't access frame's methods unless it was explicitly passed in as a parameter. Let me know if that's wrong.
Thanks again, all. -
LPX-00601: Invalid token
Hallo,
and the next problem arised when trying to
SELECT XMLTransform(x.xmldoc,
(select stylesheet from stylesheet_tab where id = 1)).getStringVal()
AS result
FROM testtab x;
=>
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in
<xsl:value-of select="auskunfteiAntwort[@xsi:type='faResponse']/auskunftAusCacheA1"/>
Whats the problem with this line ?
The xsl file already works when the tranformation is done with java instead of oracle.
Thanks,
JochenSQL> select * from nls_session_parameters;
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
SQL> select * from nls_database_parameters;
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET AL32UTF8
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET UTF8
NLS_RDBMS_VERSION 10.2.0.1.0
I don't find something like a xsi namespace prefix.
In fact thats the first time "xsi" appears in this stylesheet. Is Oracle more strict than the "standard" ? -
Report failed to parse SQL query:ORA-01745: invalid host/bind variable name
Hi,
We are currently upgrading from v2.2.0.00.32 to v4.0.0.00.46.
I have copied the applications onto our test server along with the various database objects and data etc.
When I am running a report in v4, it is failing with the following error: "failed to parse SQL query: ORA-01745: invalid host/bind variable name".
When I copy the SQL that builds the report into TOAD (on out test server) it runs OK so really cant see why it would fail in APEX. It works fine when I run the query in our APEX v2 and in TOAD in our live server.
The query is as follows:
SELECT
aea.ALTERATION_ID
,aea.ALTERATION_ID "ALTERATION_ID_DISPLAY"
,aea.assembly_name "Revised BOM"
,assembly.description "Revised BOM Description"
,assembly.INVENTORY_ITEM_STATUS_CODE "Revised BOM Status"
,aea.BEFORE_CHANGE_QTY
,flv.MEANING "Alteration Type"
,aea.component_name "Part No"
,component.description "Part No Description"
,component.INVENTORY_ITEM_STATUS_CODE "Part No Status"
,aea.AFTER_CHANGE_QTY
,TO_CHAR(aea.last_update_date,'DD-MM-YYYY HH24:MI:SS')"Last Update Date"
,aea.LAST_UPDATE_BY
,aea.COMMENTS
,aea.ORACLE_CHANGE_NOTICE
,AEA.SELECTION_CRITERIA
FROM XXMEL_APEX_ECO_ALTERATIONS aea
, fnd_lookup_values flv
, (SELECT INVENTORY_ITEM_STATUS_CODE
,segment1
,description
FROM mtl_system_items_b
WHERE 1=1
AND organization_id = 26) component
, (SELECT INVENTORY_ITEM_STATUS_CODE
,segment1
,description
FROM mtl_system_items_b
WHERE 1=1
AND organization_id = 26) assembly
WHERE 1=1
AND aea.COMPONENT_NAME = component.segment1 (+)
AND aea.assembly_NAME = assembly.segment1 (+)
AND flv.lookup_code = aea.acd_type
AND aea.eco = :P13_ECO
AND flv.lookup_type = 'ECG_ACTION'
AND modify_flag = 'Y'
ANy help would be great,
Thanks
Chris
Edited by: Cashy on 22-Nov-2010 04:13
Edited by: Cashy on 22-Nov-2010 04:14For some reason, the updatable fields (this is a updateable report) where not connecting to the database properly. Whn I changed them to a report columns and removed the database field reference, the report rendered
-
Invalid reference parameter in distribution list
Hi all!
I want to distribute a very simple report that has a user parameter 'P_1'.
The basic problem I have is to reference this parameter P_1 in my distribution file:
I always get the following error message:'Invalid reference parameter '&P_1' in distribution list.
<destinations>
<file id="MyFiles" name="&<P_1>_test.pdf" format="pdf" instance="all">
<include src="report"/>
</file>
</destinations>
Any idea what's wrong here?
Thanks
ThorstenPlease try with encoded versions of these special params (Since they have special meanings in XML )
& --> &
(less than) < --> <
Greater than > --> >
So the param becomes - &<P_1>...
This is explained in doc
(HTML) http://otn.oracle.com/products/reports/htdocs/getstart/docs/A92102_01/title.htm
Please See chapter 9 - Creating advanced distributions
NOTE: (from docs)
There is no special requirement for the greater-than symbol (>)used with variables, but for consistency, we recommend that you use the encoded version (>).
Thanks
The Oracle Reports Team -
XSL Append & XSL Variable !!!
Hi,
If anyone has any ideas on the below problem I would sincerely appreciate it as it is driving me crazy!!!
I need to concatenate/append the contents of a Collection node into a string variable, such that each element is comma seperated in the string. I need to do this to pass the string of comma seperated values into a 3rd party service that I am calling. It looks like I would use an XSL transform to achieve this. However, it appears to be impossible because Oracle Transform mapper does not support <xsl:variable> ie. I get "unsupported" when I try to use this.
So,for example, I want to convert the following collection
<NamesCollection>
<name>A</name>
<name>B</name>
<name>C</name>
<name>D</name>
<name>E</name>
<name>F</name>
<name>G</name>
<name>H</name>
</NamesCollection>
...such that it would become:
<NAMES>A,B,C,D,E,F,G,H</NAMES>
I found some sample XSL code in google:
<xsl:variable name="String">
<xsl:for-each select="/NamesCollection">
<xsl:value-of select="name" />
<xsl:text>,</xsl:text>
</xsl:for-each>
</xsl:variable>
However, Oracle mapper does not support "xsl:variable". So the above is no good.
I cannot also nest a "for-each" inside a node,
Eg.
<NAMES>
<xsl:for-each select="/NamesCollection">
<xsl:value-of select="name"/>
</xsl:for-each>
</NAMES>
because it complains:
Error: Invalid Usage of <for-each> Element
If anyone has any suggestions, they would be sincerely appreciated !!!!!!!!!Humm...
You can iterate trough your NamesCollection (see <HOME>\integration\orabpel\samples\tutorials\112.Arrays sample).
After, for each <name>, you can use an "Assign" activity to append all names to another variable.
The trick here is to edit the "Assign" source code on process.bpel (because the default behaviour is to replace the value, not append). You have to use a BPEL extension:
<assign name="Assign_1">
<bpelx:append>
<bpelx:from concat(bpws:getVariableData(eachName_Variable),",") />
<bpelx:to variable="namesWithComma_Variable" />
</bpelx:append>
</assign>
Logic:
<IterateOver NamesCollection>
<get one name>
<concat it with a comma>
<concat it with other names>
<loop iterate> -
Currency Translation not working with "Time Reference from Variable"
We have created several Currency Translations using RSCUR with a fixed "Key Date". All have been working fine until we got the request to allow a variable date for the exchange rate date. I have built a variable on 0DATE which I am putting a default date value into using user exit. This default date is the SAME date as the fixed "Key Date" which we have been using. Unfortunately when we use the "Time Reference from Variable" option and use this new variable, no currency conversion is taking place, instead it only shows the original currency values. I am 100% sure that my variable is getting a value and it is the same date we are using for the fixed "Key Date" value so both methods should be using the exact same exchange rates. The documentation that I can find states:
● Time reference: The time reference for the currency translation can be either fixed or variable.
If the time reference is fixed, the time at which the exchange rate is determined is independent of the data. You have the following options:
○ You can establish that the time reference be determined upon translation.
○ You can select the current date.
○ You can specify a fixed date as the key date.
○ You can specify any variable that exists for InfoObject 0DATE.
○ You can establish that the query key date be used. This is determined in the query settings.
In my case I am only switching from option "You can specify a fixed date as the key date"=(Key Date) to "You can specify any variable that exists for InfoObject 0DATE"=(Time Reference from Variable).
What am I missing? Any help is appreciated.I neglected to mention that we are calling this currency translation through a WAD button using the SET_CURRENCY_TRANSLATION command. I did do a test by applying the currency conversion within query key figure. This seems to work. So it appears the issue is with how the WAD is processing the variable, not the query. When I display the variable in a drop down item within the WAD it does have the default value that I have assigned in user exit.
-
I have the following piece of code. The numbers are the number of the code lines.
In line 17 I want to assign a value to the attribute value of the node options. The value should be the value of the xsl-variable "wildart" which i declared in line 7. How can use the value of this variable in line 17 correctly?
1 String xsl =
2 + "<form name=\"wildart\" action=\"/servlet/model/ServletTransformerTest\" method=\"post\">"
3 + "<select name=\"wildart\" onChange=\"form.submit()\">"
4 + "<option>Bitte Ausw�hlen</option>"
5 + "<xsl:for-each select=\"//tier\">"
6 + "<xsl:sort select=\"@wildart\" data-type=\"text\"/>"
7 + "<xsl:variable name=\"wildart\" select=\"@wildart\"/>"
8 + "<xsl:variable name=\"name\" select=\"@name\"/>"
9 + "<xsl:variable name=\"anzahl\" select=\"count(//tier[@wildart=$wildart])\"/>";
10
11 if(optionSelected == null) {
12
13 xsl = xsl
14 + "<xsl:for-each select=\"//tier[@wildart =$wildart]\">"
15 + "<xsl:if test=\"position()=last()\">"
16 + "<xsl:if test=\"@name=$name\">"
17 + "<option value=\"$wildart\">"
18 + "<xsl:value-of select=\"@wildart\"/>"
19 + "</option>"
20 + "</xsl:if>";
21 }use : "<option value=\"{$wildart}\">"
-
LPX-00601: Invalid token Error in DBMS_XSLPROCESSOR
Hi All,
I am using DBMS_XMLDOM and DBMS_XSLPROCESSOR to parse the XML file.
the following code was working fine in Release 10.1.0.4.0
l_n :=DBMS_XSLPROCESSOR.selectsinglenode
(xmldom.makenode (doc)
,'/tmf:MTOSI_InventoryData/tmf:mdList/tmf:md/tmf:tlList/tmf:tlInv/tmf:tlNm');
v_mux_id :=DBMS_XMLDOM.getnodevalue(DBMS_XMLDOM.getfirstchild (l_n));
BANNER
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - 64bi
PL/SQL Release 10.1.0.4.0 - Production
CORE 10.1.0.4.0 Production
TNS for Solaris: Version 10.1.0.4.0 - Production
NLSRTL Version 10.1.0.4.0 - Production
But we have copied the same code in Release 10.2.0.2.0 i am getting the following error Plese do the needful
11:42:03 AM ORA-31011: XML parsing failed
11:42:03 AM : Error occurred in XML processing
11:42:03 AM LPX-00601: Invalid token in: '/tmf:MTOSI_InventoryData/tmf:mdList/tmf:md/tmf:tlList/tmf:tlInv/tmf:tlNm'
11:42:03 AM ORA-06512: at line 9
11:42:03 AM *** Script stopped due to error ***
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bi
PL/SQL Release 10.2.0.2.0 - Production
CORE 10.2.0.2.0 Production
TNS for Solaris: Version 10.2.0.2.0 - Production
NLSRTL Version 10.2.0.2.0 - Production
Plese do the needful
Thanks in Advance
ElanFUNCTION SELECTSINGLENODE RETURNS RECORD
Argument Name Type In/Out Default?
ID RAW(13) OUT
N RECORD IN
ID RAW(13) IN
PATTERN VARCHAR2 IN
NAMESPACE VARCHAR2 IN DEFAULTYou need to provide the namespace prefix mapping for the prefixes tmf via the NAMESPACE parameter (eg 'xmlns:tmf="xxxxxx"'
Maybe you are looking for
-
RFC connection from SAP to AS400 system
Hi , I am working on a Interface requirement wherein I need to get connected to AS400 fetch some data and update in Shipment Document in SAP at runtime. I am thinking about calling RFC but not sure whether it will work or not. Has anybody worked on t
-
How to bulk import data into CQ5 from MySQL and file system
Is there an easy way to bulk import data into CQ5 from MySQL and file system? Some of the files are ~50MB each (instrument files). There are a total of ~1,500 records spread over about 5 tables. Thanks
-
Using FlipView to create a PhotoViewer with pinch to zoom capability (like WP8 PhotoApp)
Hello, I'm currently developing a Universial App using WinRT to develop for Windows 8.1 and WP8.1. Inside that app I want to view a couple of images. Viewing the images works just fine with a FlipView but the disadvantage is, you cannot zoom. I searc
-
Using the advanced telemetry Python script (unrecognized signature)
I am trying to profile an AIR for Mobile project (using AIR 3.5) in Scout. I (apparently) cannot compile the project in Flash Builder because it utilizies CameraRoll. I'm trying to add advanced telemetry using the Python script at https://github.com/
-
How to publish Web parts page in Share point server 2010
Hi All, I have created Web parts page in share point server 2010. it working fine but it always displayed with Ribbon controls and other tool bars, if there any possibility to publish web parts page, here user able to view content only not editing op