Home » Developer & Programmer » JDeveloper, Java & XML » Oracle XMLSAVE & XSL
Oracle XMLSAVE & XSL [message #295239] Mon, 21 January 2008 19:27
Messages: 11
Registered: January 2008
Junior Member
We are using Oracle

I am trying to execute the following code to update the view - which actually means executing the INSTEAD OF trigger. . . But while it is executing without "error" (blowing up), it makes the rowcount = 0 and the INSTEAD OF trigger does NOT get executed.
I am going crazy trying to figure out how to TEST this code - and the point was to verify that the XSLT was correct.

One other big question is what is the correct format of
the clause: (in the example here - the XML tags have the '-' dashes and the ORacle Columns have the '_' Underscores)


SO I am assuming - because I cannot find ANYTHING after hours of searching - that the format is
<TAG><xsl:value-of select="path/COLUMNNAME"/></TAG>

The body of the code is here:
l_ctx := DBMS_XMLSave.newContext('V_VEND_XML_H');
DBMS_XMLSave.setXSLT(l_ctx, GC_ifmis_vend_h_xsl_to_canonic, null);
DBMS_XMLSave.setIgnoreCase(l_ctx, 1); --IGNORE_CASE.
DBMS_XMLSave.setCommitBatch(l_ctx, 0);
V_rowcount := DBMS_XMLSave.updateXML(l_ctx, v_clob);

A sample segment of the XML is shown here...
<?xml version = '1.0'?>

And my XSL is shown here:
GC_ifmis_vend_h_xsl_to_canonic constant clob :=
'<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<ADD-COUNT><xsl:value-of select="GVN-RECORDS/Header/ADD_COUNT"/></ADD-COUNT>
<ACTION-TIME><xsl:value-of select="GVN-RECORDS/Header/ACTION_TIME"/></ACTION-TIME>

I hope I have supplied enough info - but I would be happy to add dtls if needed
New info - on my way to my stroke Sad, I tried one more thing. In my test file, I changed the XML tags to make all of the dashes(-) into underscores (_) and then changed the references in the PL/SQL code (in the XSL) to also only have underscores. FINALLY that worked. . BUT I had been instructed that I HAD to use the tags as they were defined - meaning with the dashes(-).
So I guess I still need to know - as I have been unable to find any examples after HOURS of searching - of how to code the XSL / Oracle column mapping in the example shown above.

Thanks so much for any ideas.

[Updated on: Mon, 21 January 2008 21:05]

Report message to a moderator

Previous Topic: Java Tester
Next Topic: password for pdf outputs from xml reports
Goto Forum:

Current Time: Sat Jul 22 18:11:32 CDT 2017

Total time taken to generate the page: 0.08232 seconds