4938: len1 NUMBER;
4939: len2 NUMBER;
4940: n XMLDOM.DOMNODE;
4941: e XMLDOM.DOMELEMENT;
4942: l_parser DBMS_XMLPARSER.parser;
4943: l_indomdoc DBMS_XMLDOM.DOMDocument;
4944: l_pdf_rec PDF_REC_TYPE;
4945: l_index INTEGER;
4946: l_node_name VARCHAR2(2000);
4953: l_log_unexpected := FND_LOG.level_unexpected;
4954: IF (l_log_procedure >= l_log_current_level)THEN
4955: fnd_log.string( l_log_procedure,'ahl.plsql.'||g_pkg_name||'.'||l_api_name ,'Entering procedure');
4956: END IF;
4957: l_parser := DBMS_XMLPARSER.newParser;
4958: --DBMS_XMLPARSER.parseBuffer(l_parser,p_enigma_response);
4959: -- fix for bug 9834092
4960: DBMS_XMLPARSER.parseClob(l_parser,p_enigma_response);
4961: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
4954: IF (l_log_procedure >= l_log_current_level)THEN
4955: fnd_log.string( l_log_procedure,'ahl.plsql.'||g_pkg_name||'.'||l_api_name ,'Entering procedure');
4956: END IF;
4957: l_parser := DBMS_XMLPARSER.newParser;
4958: --DBMS_XMLPARSER.parseBuffer(l_parser,p_enigma_response);
4959: -- fix for bug 9834092
4960: DBMS_XMLPARSER.parseClob(l_parser,p_enigma_response);
4961: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
4962: -- get all elements
4956: END IF;
4957: l_parser := DBMS_XMLPARSER.newParser;
4958: --DBMS_XMLPARSER.parseBuffer(l_parser,p_enigma_response);
4959: -- fix for bug 9834092
4960: DBMS_XMLPARSER.parseClob(l_parser,p_enigma_response);
4961: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
4962: -- get all elements
4963: nl := XMLDOM.getElementsByTagName(l_indomdoc, '*');
4964: len1 := XMLDOM.getLength(nl);
4957: l_parser := DBMS_XMLPARSER.newParser;
4958: --DBMS_XMLPARSER.parseBuffer(l_parser,p_enigma_response);
4959: -- fix for bug 9834092
4960: DBMS_XMLPARSER.parseClob(l_parser,p_enigma_response);
4961: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
4962: -- get all elements
4963: nl := XMLDOM.getElementsByTagName(l_indomdoc, '*');
4964: len1 := XMLDOM.getLength(nl);
4965: -- loop through elements
5014: x_pdf_table(l_index) := l_pdf_rec;
5015: END IF;
5016: END LOOP;
5017: DBMS_XMLDOM.freeDocument(l_indomdoc);
5018: DBMS_XMLPARSER.freeParser(l_parser);
5019: END parse_enigma_response;
5020:
5021: PROCEDURE APPLY_TRANSFORMATION(
5022: p_indoc IN CLOB,
5027: x_return_status OUT NOCOPY VARCHAR2,
5028: x_msg_count OUT NOCOPY NUMBER,
5029: x_msg_data OUT NOCOPY VARCHAR2
5030: )IS
5031: l_parser DBMS_XMLPARSER.parser;
5032: l_indomdoc DBMS_XMLDOM.DOMDocument;
5033: l_xsltdomdoc DBMS_XMLDOM.DOMDocument;
5034: l_xsl DBMS_XSLPROCESSOR.stylesheet;
5035: l_outdomdocf DBMS_XMLDOM.DOMDocumentFragment;
5045: fnd_log.string (
5046: fnd_log.level_statement, 'ahl.plsql.'||g_pkg_name||'.'||'APPLY_TRANSFORMATION' ,'Starting transformation');
5047: END IF;
5048: l_vchar_header := '';
5049: l_parser := DBMS_XMLPARSER.newParser;
5050: DBMS_XMLPARSER.parseClob(l_parser, p_indoc);
5051: -- following statement commented since input is clob and not a input xml full path
5052: --DBMS_XMLPARSER.parse(l_parser,p_xml_input_fullpath);
5053: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5046: fnd_log.level_statement, 'ahl.plsql.'||g_pkg_name||'.'||'APPLY_TRANSFORMATION' ,'Starting transformation');
5047: END IF;
5048: l_vchar_header := '';
5049: l_parser := DBMS_XMLPARSER.newParser;
5050: DBMS_XMLPARSER.parseClob(l_parser, p_indoc);
5051: -- following statement commented since input is clob and not a input xml full path
5052: --DBMS_XMLPARSER.parse(l_parser,p_xml_input_fullpath);
5053: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5054: --DBMS_XMLPARSER.parse(l_parser, p_xsl_full_path);
5048: l_vchar_header := '';
5049: l_parser := DBMS_XMLPARSER.newParser;
5050: DBMS_XMLPARSER.parseClob(l_parser, p_indoc);
5051: -- following statement commented since input is clob and not a input xml full path
5052: --DBMS_XMLPARSER.parse(l_parser,p_xml_input_fullpath);
5053: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5054: --DBMS_XMLPARSER.parse(l_parser, p_xsl_full_path);
5055: DBMS_XMLPARSER.parseClob(l_parser, p_xsl_doc);
5056: l_xsltdomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5049: l_parser := DBMS_XMLPARSER.newParser;
5050: DBMS_XMLPARSER.parseClob(l_parser, p_indoc);
5051: -- following statement commented since input is clob and not a input xml full path
5052: --DBMS_XMLPARSER.parse(l_parser,p_xml_input_fullpath);
5053: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5054: --DBMS_XMLPARSER.parse(l_parser, p_xsl_full_path);
5055: DBMS_XMLPARSER.parseClob(l_parser, p_xsl_doc);
5056: l_xsltdomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5057: l_xsl := DBMS_XSLPROCESSOR.newStyleSheet(l_xsltdomdoc, '');
5050: DBMS_XMLPARSER.parseClob(l_parser, p_indoc);
5051: -- following statement commented since input is clob and not a input xml full path
5052: --DBMS_XMLPARSER.parse(l_parser,p_xml_input_fullpath);
5053: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5054: --DBMS_XMLPARSER.parse(l_parser, p_xsl_full_path);
5055: DBMS_XMLPARSER.parseClob(l_parser, p_xsl_doc);
5056: l_xsltdomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5057: l_xsl := DBMS_XSLPROCESSOR.newStyleSheet(l_xsltdomdoc, '');
5058: l_proc := DBMS_XSLPROCESSOR.newProcessor;
5051: -- following statement commented since input is clob and not a input xml full path
5052: --DBMS_XMLPARSER.parse(l_parser,p_xml_input_fullpath);
5053: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5054: --DBMS_XMLPARSER.parse(l_parser, p_xsl_full_path);
5055: DBMS_XMLPARSER.parseClob(l_parser, p_xsl_doc);
5056: l_xsltdomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5057: l_xsl := DBMS_XSLPROCESSOR.newStyleSheet(l_xsltdomdoc, '');
5058: l_proc := DBMS_XSLPROCESSOR.newProcessor;
5059:
5052: --DBMS_XMLPARSER.parse(l_parser,p_xml_input_fullpath);
5053: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5054: --DBMS_XMLPARSER.parse(l_parser, p_xsl_full_path);
5055: DBMS_XMLPARSER.parseClob(l_parser, p_xsl_doc);
5056: l_xsltdomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5057: l_xsl := DBMS_XSLPROCESSOR.newStyleSheet(l_xsltdomdoc, '');
5058: l_proc := DBMS_XSLPROCESSOR.newProcessor;
5059:
5060: DBMS_LOB.createTemporary( l_clob, true );
5075: DBMS_LOB.close(l_clob_file);
5076: DBMS_LOB.close(l_clob);
5077: DBMS_XMLDOM.freeDocument(l_indomdoc);
5078: DBMS_XMLDOM.freeDocument(l_xsltdomdoc);
5079: DBMS_XMLPARSER.freeParser(l_parser);
5080: DBMS_XSLPROCESSOR.freeProcessor(l_proc);
5081: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)THEN
5082: fnd_log.string (
5083: fnd_log.level_statement, 'ahl.plsql.'||g_pkg_name||'.'||'APPLY_TRANSFORMATION' ,'done transformation');
5102: x_return_status OUT NOCOPY VARCHAR2,
5103: x_msg_count OUT NOCOPY NUMBER,
5104: x_msg_data OUT NOCOPY VARCHAR2
5105: )IS
5106: l_parser DBMS_XMLPARSER.parser;
5107: l_indomdoc DBMS_XMLDOM.DOMDocument;
5108: l_xsltdomdoc DBMS_XMLDOM.DOMDocument;
5109: l_xsl DBMS_XSLPROCESSOR.stylesheet;
5110: l_outdomdocf DBMS_XMLDOM.DOMDocumentFragment;
5120: fnd_log.string (
5121: fnd_log.level_statement, 'ahl.plsql.'||g_pkg_name||'.'||'APPLY_TRANSFORMATION' ,'Starting transformation');
5122: END IF;
5123: l_vchar_header := '';
5124: l_parser := DBMS_XMLPARSER.newParser;
5125: -- following statement commented since input is a input xml full path and not a clob
5126: --DBMS_XMLPARSER.parseBuffer(l_parser, p_indoc);
5127:
5128: DBMS_XMLPARSER.parse(l_parser,p_xml_input_fullpath);
5122: END IF;
5123: l_vchar_header := '';
5124: l_parser := DBMS_XMLPARSER.newParser;
5125: -- following statement commented since input is a input xml full path and not a clob
5126: --DBMS_XMLPARSER.parseBuffer(l_parser, p_indoc);
5127:
5128: DBMS_XMLPARSER.parse(l_parser,p_xml_input_fullpath);
5129: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5130: DBMS_XMLPARSER.parseClob(l_parser, p_xsl_doc);
5124: l_parser := DBMS_XMLPARSER.newParser;
5125: -- following statement commented since input is a input xml full path and not a clob
5126: --DBMS_XMLPARSER.parseBuffer(l_parser, p_indoc);
5127:
5128: DBMS_XMLPARSER.parse(l_parser,p_xml_input_fullpath);
5129: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5130: DBMS_XMLPARSER.parseClob(l_parser, p_xsl_doc);
5131: l_xsltdomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5132: l_xsl := DBMS_XSLPROCESSOR.newStyleSheet(l_xsltdomdoc, '');
5125: -- following statement commented since input is a input xml full path and not a clob
5126: --DBMS_XMLPARSER.parseBuffer(l_parser, p_indoc);
5127:
5128: DBMS_XMLPARSER.parse(l_parser,p_xml_input_fullpath);
5129: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5130: DBMS_XMLPARSER.parseClob(l_parser, p_xsl_doc);
5131: l_xsltdomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5132: l_xsl := DBMS_XSLPROCESSOR.newStyleSheet(l_xsltdomdoc, '');
5133: l_proc := DBMS_XSLPROCESSOR.newProcessor;
5126: --DBMS_XMLPARSER.parseBuffer(l_parser, p_indoc);
5127:
5128: DBMS_XMLPARSER.parse(l_parser,p_xml_input_fullpath);
5129: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5130: DBMS_XMLPARSER.parseClob(l_parser, p_xsl_doc);
5131: l_xsltdomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5132: l_xsl := DBMS_XSLPROCESSOR.newStyleSheet(l_xsltdomdoc, '');
5133: l_proc := DBMS_XSLPROCESSOR.newProcessor;
5134:
5127:
5128: DBMS_XMLPARSER.parse(l_parser,p_xml_input_fullpath);
5129: l_indomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5130: DBMS_XMLPARSER.parseClob(l_parser, p_xsl_doc);
5131: l_xsltdomdoc := DBMS_XMLPARSER.getDocument(l_parser);
5132: l_xsl := DBMS_XSLPROCESSOR.newStyleSheet(l_xsltdomdoc, '');
5133: l_proc := DBMS_XSLPROCESSOR.newProcessor;
5134:
5135: DBMS_LOB.createTemporary( l_clob, true );
5150: DBMS_LOB.close(l_clob_file);
5151: DBMS_LOB.close(l_clob);
5152: DBMS_XMLDOM.freeDocument(l_indomdoc);
5153: DBMS_XMLDOM.freeDocument(l_xsltdomdoc);
5154: DBMS_XMLPARSER.freeParser(l_parser);
5155: DBMS_XSLPROCESSOR.freeProcessor(l_proc);
5156: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)THEN
5157: fnd_log.string (
5158: fnd_log.level_statement, 'ahl.plsql.'||g_pkg_name||'.'||'APPLY_TRANSFORMATION' ,'Done transformation');