1: package body ecx_print_local as
2: -- $Header: ECXLXMLB.pls 120.4.12010000.2 2008/08/22 20:00:06 cpeixoto ship $
3:
4: l_procedure PLS_INTEGER := ecx_debug.g_procedure;
5: l_statement PLS_INTEGER := ecx_debug.g_statement;
35: procedure print_xml_fragment (var_pos IN pls_integer,
36: print_tag IN boolean);
37: procedure append_clob is
38:
39: i_method_name varchar2(2000) := 'ecx_print_local.append_clob';
40: i_writeamount number;
41: i_length number;
42: i_temp varchar2(32767);
43:
100: when ecx_utils.program_exit then
101: raise ECX_UTILS.PROGRAM_EXIT;
102:
103: when others then
104: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_PRINT_LOCAL.APPEND_CLOB');
105: if(l_unexpectedEnabled) then
106: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || '- ECX_PRINT_LOCAL.APPEND_CLOB',i_method_name);
107: end if;
108: raise ECX_UTILS.PROGRAM_EXIT;
102:
103: when others then
104: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_PRINT_LOCAL.APPEND_CLOB');
105: if(l_unexpectedEnabled) then
106: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || '- ECX_PRINT_LOCAL.APPEND_CLOB',i_method_name);
107: end if;
108: raise ECX_UTILS.PROGRAM_EXIT;
109: end append_clob;
110:
115: value IN varchar2
116: )
117: is
118:
119: i_method_name varchar2(2000) := 'ecx_print_local.element_value';
120:
121: begin
122:
123: If clob_value is not null Then
135: raise ECX_UTILS.PROGRAM_EXIT;
136: when ecx_utils.program_exit then
137: raise ECX_UTILS.PROGRAM_EXIT;
138: when others then
139: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_PRINT_LOCAL.ELEMENT_VALUE');
140: if(l_unexpectedEnabled) then
141: ecx_debug.log(l_unexpected,'ECX', SQLERRM || '- ECX_PRINT_LOCAL.ELEMENT_VALUE',i_method_name);
142: end if;
143: raise ECX_UTILS.PROGRAM_EXIT;
137: raise ECX_UTILS.PROGRAM_EXIT;
138: when others then
139: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_PRINT_LOCAL.ELEMENT_VALUE');
140: if(l_unexpectedEnabled) then
141: ecx_debug.log(l_unexpected,'ECX', SQLERRM || '- ECX_PRINT_LOCAL.ELEMENT_VALUE',i_method_name);
142: end if;
143: raise ECX_UTILS.PROGRAM_EXIT;
144: end element_value;
145:
151: value IN varchar2
152: )
153: is
154:
155: i_method_name varchar2(2000) := 'ecx_print_local.cdata_element_value';
156:
157: begin
158:
159: if (clob_value is not null) or
177: raise ECX_UTILS.PROGRAM_EXIT;
178: when ecx_utils.program_exit then
179: raise ECX_UTILS.PROGRAM_EXIT;
180: when others then
181: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_PRINT_LOCAL.CDATA_ELEMENT_VALUE');
182: if(l_unexpectedEnabled) then
183: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || '- ECX_PRINT_LOCAL.CDATA_ELEMENT_VALUE',
184: i_method_name);
185: end if;
179: raise ECX_UTILS.PROGRAM_EXIT;
180: when others then
181: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_PRINT_LOCAL.CDATA_ELEMENT_VALUE');
182: if(l_unexpectedEnabled) then
183: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || '- ECX_PRINT_LOCAL.CDATA_ELEMENT_VALUE',
184: i_method_name);
185: end if;
186: raise ECX_UTILS.PROGRAM_EXIT;
187: end cdata_element_value;
188:
189: procedure print_node_stack
190: is
191:
192: i_method_name varchar2(2000) := 'ecx_print_local.print_node_stack';
193:
194: begin
195:
196: if (l_node_stack.COUNT > 0)
219: i_last_stack_id IN pls_integer
220: )
221: is
222:
223: i_method_name varchar2(2000) := 'ecx_print_local.pop_discont_elements';
224:
225:
226: begin
227:
274: ecx_debug.pop(i_method_name);
275: end if;
276: raise ECX_UTILS.PROGRAM_EXIT;
277: when others then
278: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.POP_DISCONT_ELEMENTS');
279: if(l_unexpectedEnabled) then
280: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.POP_DISCONT_ELEMENTS',i_method_name);
281: end if;
282: if (l_procedureEnabled) then
276: raise ECX_UTILS.PROGRAM_EXIT;
277: when others then
278: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.POP_DISCONT_ELEMENTS');
279: if(l_unexpectedEnabled) then
280: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.POP_DISCONT_ELEMENTS',i_method_name);
281: end if;
282: if (l_procedureEnabled) then
283: ecx_debug.pop(i_method_name);
284: end if;
304: i_ext_level IN pls_integer
305: )
306: is
307:
308: i_method_name varchar2(2000) := 'ecx_print_local.print_discont_elements';
309:
310: curr_parent_id pls_integer;
311: curr_id pls_integer;
312: curr_level pls_integer;
372: ecx_debug.pop(i_method_name);
373: end if;
374: raise ECX_UTILS.PROGRAM_EXIT;
375: when others then
376: ecx_debug.setErrorInfo(2, 30, SQLERRM ||' - ECX_PRINT_LOCAL.PRINT_DISCONT_ELEMENTS');
377: if(l_unexpectedEnabled) then
378: ecx_debug.log(l_unexpected,'ECX', SQLERRM ||' - ECX_PRINT_LOCAL.PRINT_DISCONT_ELEMENTS',i_method_name);
379: end if;
380: if (l_procedureEnabled) then
374: raise ECX_UTILS.PROGRAM_EXIT;
375: when others then
376: ecx_debug.setErrorInfo(2, 30, SQLERRM ||' - ECX_PRINT_LOCAL.PRINT_DISCONT_ELEMENTS');
377: if(l_unexpectedEnabled) then
378: ecx_debug.log(l_unexpected,'ECX', SQLERRM ||' - ECX_PRINT_LOCAL.PRINT_DISCONT_ELEMENTS',i_method_name);
379: end if;
380: if (l_procedureEnabled) then
381: ecx_debug.pop(i_method_name);
382: end if;
392: i_element_id IN pls_integer
393: ) return boolean
394: is
395:
396: i_method_name varchar2(2000) := 'ecx_print_local.is_descendant';
397: curr_pid pls_integer;
398: begin
399: if (l_procedureEnabled) then
400: ecx_debug.push(i_method_name);
451: ecx_debug.pop(i_method_name);
452: end if;
453: raise ECX_UTILS.PROGRAM_EXIT;
454: when others then
455: ecx_debug.setErrorInfo(2, 30, SQLERRM ||' - ECX_PRINT_LOCAL.IS_DESCENDANT');
456: if(l_unexpectedEnabled) then
457: ecx_debug.log(l_unexpected,'ECX', SQLERRM ||' - ECX_PRINT_LOCAL.IS_DESCENDANT',i_method_name);
458: end if;
459: if (l_procedureEnabled) then
453: raise ECX_UTILS.PROGRAM_EXIT;
454: when others then
455: ecx_debug.setErrorInfo(2, 30, SQLERRM ||' - ECX_PRINT_LOCAL.IS_DESCENDANT');
456: if(l_unexpectedEnabled) then
457: ecx_debug.log(l_unexpected,'ECX', SQLERRM ||' - ECX_PRINT_LOCAL.IS_DESCENDANT',i_method_name);
458: end if;
459: if (l_procedureEnabled) then
460: ecx_debug.pop(i_method_name);
461: end if;
466: procedure xmlPOPALL(
467: x_xmldoc OUT NOCOPY clob)
468: is
469:
470: i_method_name varchar2(2000) := 'ecx_print_local.xmlPOPALL';
471:
472: last_stack_id pls_integer;
473:
474: begin
539: end if;
540: raise ECX_UTILS.PROGRAM_EXIT;
541:
542: when others then
543: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_PRINT_LOCAL.xmlPOPALL');
544: if(l_unexpectedEnabled) then
545: ecx_debug.log(l_unexpected,'ECX', SQLERRM || '- ECX_PRINT_LOCAL.xmlPOPALL',i_method_name);
546: end if;
547: if dbms_lob.istemporary(i_xmldoc) = 1 then
541:
542: when others then
543: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_PRINT_LOCAL.xmlPOPALL');
544: if(l_unexpectedEnabled) then
545: ecx_debug.log(l_unexpected,'ECX', SQLERRM || '- ECX_PRINT_LOCAL.xmlPOPALL',i_method_name);
546: end if;
547: if dbms_lob.istemporary(i_xmldoc) = 1 then
548: dbms_lob.freetemporary(i_xmldoc);
549: i_xmldoc := null;
579: (
580: tag_name IN varchar2
581: )
582: is
583: i_method_name varchar2(2000) := 'ecx_print_local.element_open';
584: begin
585: i_tmpxml(i_tmpxml.COUNT+1) := i_elestarttag||tag_name||' ';
586: exception
587: when value_error then
592: raise ECX_UTILS.PROGRAM_EXIT;
593: when ecx_utils.program_exit then
594: raise ECX_UTILS.PROGRAM_EXIT;
595: when others then
596: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_PRINT_LOCAL.ELEMENT_OPEN');
597: if(l_unexpectedEnabled) then
598: ecx_debug.log(l_unexpected,'ECX', SQLERRM || '- ECX_PRINT_LOCAL.ELEMENT_OPEN',i_method_name);
599: end if;
600: raise ECX_UTILS.PROGRAM_EXIT;
594: raise ECX_UTILS.PROGRAM_EXIT;
595: when others then
596: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_PRINT_LOCAL.ELEMENT_OPEN');
597: if(l_unexpectedEnabled) then
598: ecx_debug.log(l_unexpected,'ECX', SQLERRM || '- ECX_PRINT_LOCAL.ELEMENT_OPEN',i_method_name);
599: end if;
600: raise ECX_UTILS.PROGRAM_EXIT;
601: end;
602:
602:
603: procedure element_close
604: is
605:
606: i_method_name varchar2(2000) := 'ecx_print_local.element_close';
607: begin
608: i_tmpxml(i_tmpxml.COUNT+1) := i_eleendtag;
609: exception
610: when value_error then
615: raise ECX_UTILS.PROGRAM_EXIT;
616: when ecx_utils.program_exit then
617: raise ECX_UTILS.PROGRAM_EXIT;
618: when others then
619: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_CLOSE');
620: if(l_unexpectedEnabled) then
621: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_CLOSE',i_method_name);
622: end if;
623: raise ECX_UTILS.PROGRAM_EXIT;
617: raise ECX_UTILS.PROGRAM_EXIT;
618: when others then
619: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_CLOSE');
620: if(l_unexpectedEnabled) then
621: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_CLOSE',i_method_name);
622: end if;
623: raise ECX_UTILS.PROGRAM_EXIT;
624: end element_close;
625:
630: clob_value IN clob
631: )
632: is
633:
634: i_method_name varchar2(2000) := 'ecx_print_local.element_node_open';
635:
636: begin
637: if (clob_value is not null) or
638: (value is not null ) Then
655: raise ECX_UTILS.PROGRAM_EXIT;
656: when ecx_utils.program_exit then
657: raise ECX_UTILS.PROGRAM_EXIT;
658: when others then
659: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_NODE_OPEN');
660: if(l_unexpectedEnabled) then
661: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_NODE_OPEN',i_method_name);
662: end if;
663: raise ECX_UTILS.PROGRAM_EXIT;
657: raise ECX_UTILS.PROGRAM_EXIT;
658: when others then
659: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_NODE_OPEN');
660: if(l_unexpectedEnabled) then
661: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_NODE_OPEN',i_method_name);
662: end if;
663: raise ECX_UTILS.PROGRAM_EXIT;
664: end element_node_open;
665:
668: (
669: tag_name IN varchar2
670: )
671: is
672: i_method_name varchar2(2000) := 'ecx_print_local.element_node_close';
673:
674: begin
675: i_tmpxml(i_tmpxml.COUNT+1) := i_eleclosetag||tag_name||i_eleendtag;
676: exception
682: raise ECX_UTILS.PROGRAM_EXIT;
683: when ecx_utils.program_exit then
684: raise ECX_UTILS.PROGRAM_EXIT;
685: when others then
686: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_NODE_CLOSE');
687: if(l_unexpectedEnabled) then
688: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_NODE_CLOSE',i_method_name);
689: end if;
690: raise ECX_UTILS.PROGRAM_EXIT;
684: raise ECX_UTILS.PROGRAM_EXIT;
685: when others then
686: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_NODE_CLOSE');
687: if(l_unexpectedEnabled) then
688: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_NODE_CLOSE',i_method_name);
689: end if;
690: raise ECX_UTILS.PROGRAM_EXIT;
691: end element_node_close;
692:
697: value IN varchar2,
698: clob_value IN clob
699: )
700: is
701: i_method_name varchar2(2000) := 'ecx_print_local.cdata_element_node_open';
702:
703: i pls_integer:=1;
704: begin
705: if (clob_value is not null) or
718: exception
719: when ecx_utils.program_exit then
720: raise ECX_UTILS.PROGRAM_EXIT;
721: when others then
722: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.CDATA_ELEMENT_NODE_OPEN');
723: if(l_unexpectedEnabled) then
724: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.CDATA_ELEMENT_NODE_OPEN',
725: i_method_name);
726: end if;
720: raise ECX_UTILS.PROGRAM_EXIT;
721: when others then
722: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.CDATA_ELEMENT_NODE_OPEN');
723: if(l_unexpectedEnabled) then
724: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.CDATA_ELEMENT_NODE_OPEN',
725: i_method_name);
726: end if;
727: raise ECX_UTILS.PROGRAM_EXIT;
728: end;
734: value IN varchar2,
735: clob_value IN clob
736: )
737: is
738: i_method_name varchar2(2000) := 'ecx_print_local.cdata_element_node_close';
739:
740: begin
741: i_tmpxml(i_tmpxml.COUNT+1) := i_eleclosetag||tag_name||i_eleendtag;
742:
743: exception
744: when ecx_utils.program_exit then
745: raise ECX_UTILS.PROGRAM_EXIT;
746: when others then
747: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.CDATA_ELEMENT_NODE_CLOSE');
748: if(l_unexpectedEnabled) then
749: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.CDATA_ELEMENT_NODE_CLOSE',
750: i_method_name);
751: end if;
745: raise ECX_UTILS.PROGRAM_EXIT;
746: when others then
747: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.CDATA_ELEMENT_NODE_CLOSE');
748: if(l_unexpectedEnabled) then
749: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.CDATA_ELEMENT_NODE_CLOSE',
750: i_method_name);
751: end if;
752: raise ECX_UTILS.PROGRAM_EXIT;
753: end;
759: value IN varchar2
760: )
761: is
762:
763: i_method_name varchar2(2000) := 'ecx_print_local.element_node';
764: i_temp varchar2(32767);
765:
766: begin
767: i_temp := value;
790: raise ECX_UTILS.PROGRAM_EXIT;
791: when ecx_utils.program_exit then
792: raise ECX_UTILS.PROGRAM_EXIT;
793: when others then
794: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_NODE');
795: if(l_unexpectedEnabled) then
796: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_NODE',
797: i_method_name);
798: end if;
792: raise ECX_UTILS.PROGRAM_EXIT;
793: when others then
794: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_NODE');
795: if(l_unexpectedEnabled) then
796: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.ELEMENT_NODE',
797: i_method_name);
798: end if;
799: raise ECX_UTILS.PROGRAM_EXIT;
800: end element_node;
804: attribute_name IN varchar2,
805: attribute_value IN varchar2
806: )
807: is
808: i_method_name varchar2(2000) := 'ecx_print_local.attribute_node';
809: i_temp varchar2(32767);
810: begin
811: i_temp := attribute_value;
812: /**
836: raise ECX_UTILS.PROGRAM_EXIT;
837: when ecx_utils.program_exit then
838: raise ECX_UTILS.PROGRAM_EXIT;
839: when others then
840: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.ATTRIBUTE_NODE');
841: if(l_unexpectedEnabled) then
842: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.ATTRIBUTE_NODE',i_method_name);
843: end if;
844: raise ECX_UTILS.PROGRAM_EXIT;
838: raise ECX_UTILS.PROGRAM_EXIT;
839: when others then
840: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.ATTRIBUTE_NODE');
841: if(l_unexpectedEnabled) then
842: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.ATTRIBUTE_NODE',i_method_name);
843: end if;
844: raise ECX_UTILS.PROGRAM_EXIT;
845: end;
846:
849: attribute_name IN varchar2,
850: attribute_value IN varchar2
851: )
852: is
853: i_method_name varchar2(2000) := 'ecx_print_local.attribute_node_close';
854: i_temp varchar2(32767);
855:
856: begin
857: i_temp := attribute_value;
886: raise ECX_UTILS.PROGRAM_EXIT;
887: when ecx_utils.program_exit then
888: raise ECX_UTILS.PROGRAM_EXIT;
889: when others then
890: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.ATTRIBUTE_NODE_CLOSE');
891: if(l_unexpectedEnabled) then
892: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.ATTRIBUTE_NODE_CLOSE',
893: i_method_name);
894: end if;
888: raise ECX_UTILS.PROGRAM_EXIT;
889: when others then
890: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.ATTRIBUTE_NODE_CLOSE');
891: if(l_unexpectedEnabled) then
892: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.ATTRIBUTE_NODE_CLOSE',
893: i_method_name);
894: end if;
895: raise ECX_UTILS.PROGRAM_EXIT;
896: end;
901: attribute_string in varchar2 :=NULL
902: )
903: is
904:
905: i_method_name varchar2(2000) := 'ecx_print_local.pi_node';
906: begin
907: i_tmpxml(i_tmpxml.COUNT+1) := i_pistart||pi||' '||attribute_string||' '||i_piend;
908: exception
909: when ecx_utils.program_exit then
908: exception
909: when ecx_utils.program_exit then
910: raise ECX_UTILS.PROGRAM_EXIT;
911: when others then
912: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.PI_NODE');
913: if(l_unexpectedEnabled) then
914: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.PI_NODE',i_method_name);
915: end if;
916: raise ECX_UTILS.PROGRAM_EXIT;
910: raise ECX_UTILS.PROGRAM_EXIT;
911: when others then
912: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.PI_NODE');
913: if(l_unexpectedEnabled) then
914: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.PI_NODE',i_method_name);
915: end if;
916: raise ECX_UTILS.PROGRAM_EXIT;
917: end pi_node;
918:
922: filename IN varchar2,
923: dtd_url IN varchar2
924: )
925: is
926: i_method_name varchar2(2000) := 'ecx_print_local.document_node';
927: begin
928: if filename is not null
929: then
930: i_tmpxml(i_tmpxml.COUNT+1) := '
944: exception
945: when ecx_utils.program_exit then
946: raise ECX_UTILS.PROGRAM_EXIT;
947: when others then
948: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.DOCUMENT_NODE');
949: if(l_unexpectedEnabled) then
950: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.DOCUMENT_NODE',i_method_name);
951: end if;
952: raise ECX_UTILS.PROGRAM_EXIT;
946: raise ECX_UTILS.PROGRAM_EXIT;
947: when others then
948: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.DOCUMENT_NODE');
949: if(l_unexpectedEnabled) then
950: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.DOCUMENT_NODE',i_method_name);
951: end if;
952: raise ECX_UTILS.PROGRAM_EXIT;
953: end document_node;
954:
956: (
957: value IN varchar2
958: )
959: is
960: i_method_name varchar2(2000) := 'ecx_print_local.comment_node';
961: begin
962: i_tmpxml(i_tmpxml.COUNT+1) := i_commstart||' '||value||' '||i_commend;
963: exception
964: when ecx_utils.program_exit then
963: exception
964: when ecx_utils.program_exit then
965: raise ECX_UTILS.PROGRAM_EXIT;
966: when others then
967: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.COMMENT_NODE');
968: if(l_unexpectedEnabled) then
969: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.COMMENT_NODE',i_method_name);
970: end if;
971: raise ECX_UTILS.PROGRAM_EXIT;
965: raise ECX_UTILS.PROGRAM_EXIT;
966: when others then
967: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.COMMENT_NODE');
968: if(l_unexpectedEnabled) then
969: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.COMMENT_NODE',i_method_name);
970: end if;
971: raise ECX_UTILS.PROGRAM_EXIT;
972: end comment_node;
973:
974:
975: -- This procedure prints any nodes waiting to be printed on l_node_stack
976: procedure print_waiting_nodes
977: is
978: i_method_name varchar2(2000) := 'ecx_print_local.print_waiting_nodes';
979: i_last_node_printed pls_integer;
980: begin
981: if(l_procedureEnabled) then
982: ecx_debug.PUSH(i_method_name);
1024: ecx_debug.pop(i_method_name);
1025: end if;
1026: raise ECX_UTILS.PROGRAM_EXIT;
1027: when others then
1028: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_WAITING_NODES');
1029: if(l_statementEnabled) then
1030: ecx_debug.log(l_statement, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_WAITING_NODES',
1031: i_method_name);
1032: ecx_debug.log(l_statement, 'resetting first_time',i_method_name);
1026: raise ECX_UTILS.PROGRAM_EXIT;
1027: when others then
1028: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_WAITING_NODES');
1029: if(l_statementEnabled) then
1030: ecx_debug.log(l_statement, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_WAITING_NODES',
1031: i_method_name);
1032: ecx_debug.log(l_statement, 'resetting first_time',i_method_name);
1033: end if;
1034: ecx_print_local.first_time_printing := true;
1030: ecx_debug.log(l_statement, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_WAITING_NODES',
1031: i_method_name);
1032: ecx_debug.log(l_statement, 'resetting first_time',i_method_name);
1033: end if;
1034: ecx_print_local.first_time_printing := true;
1035: if (l_procedureEnabled)
1036: then
1037: ecx_debug.pop(i_method_name);
1038: end if;
1041:
1042: -- This procedure prints any nodes waiting to be printed on l_node_stack. This procedure is called by an attribute.
1043: procedure print_waiting_nodes_attr
1044: is
1045: i_method_name varchar2(2000) := 'ecx_print_local.print_waiting_nodes_attr';
1046: i_last_node_printed pls_integer;
1047: begin
1048: if(l_procedureEnabled) then
1049: ecx_debug.PUSH(i_method_name);
1096: ecx_debug.pop(i_method_name);
1097: end if;
1098: raise ECX_UTILS.PROGRAM_EXIT;
1099: when others then
1100: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_WAITING_NODES_ATTR');
1101: if(l_statementEnabled) then
1102: ecx_debug.log(l_statement, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_WAITING_NODES_ATTR',
1103: i_method_name);
1104: ecx_debug.log(l_statement, 'resetting first_time',i_method_name);
1098: raise ECX_UTILS.PROGRAM_EXIT;
1099: when others then
1100: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_WAITING_NODES_ATTR');
1101: if(l_statementEnabled) then
1102: ecx_debug.log(l_statement, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_WAITING_NODES_ATTR',
1103: i_method_name);
1104: ecx_debug.log(l_statement, 'resetting first_time',i_method_name);
1105: end if;
1106: ecx_print_local.first_time_printing := true;
1102: ecx_debug.log(l_statement, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_WAITING_NODES_ATTR',
1103: i_method_name);
1104: ecx_debug.log(l_statement, 'resetting first_time',i_method_name);
1105: end if;
1106: ecx_print_local.first_time_printing := true;
1107: if (l_procedureEnabled)
1108: then
1109: ecx_debug.pop(i_method_name);
1110: end if;
1114: Function get_suppress_profile return boolean is
1115:
1116: i_string varchar2(2000);
1117: l_suppress varchar2(1) := 'N';
1118: i_method_name varchar2(2000) := 'ecx_print_local.get_suppress_profile';
1119: begin
1120: if (l_procedureEnabled) then
1121: ecx_debug.push(i_method_name);
1122: end if;
1156: end if;
1157: raise ECX_UTILS.PROGRAM_EXIT;
1158: when others
1159: then
1160: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.GET_SUPPRESS_PROFILE');
1161: if(l_unexpectedEnabled)
1162: then
1163: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.GET_SUPPRESS_PROFILE',
1164: i_method_name);
1159: then
1160: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.GET_SUPPRESS_PROFILE');
1161: if(l_unexpectedEnabled)
1162: then
1163: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.GET_SUPPRESS_PROFILE',
1164: i_method_name);
1165: ecx_debug.log(l_unexpected, 'resetting first_time',i_method_name);
1166: end if;
1167: ecx_print_local.first_time_printing := true;
1163: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.GET_SUPPRESS_PROFILE',
1164: i_method_name);
1165: ecx_debug.log(l_unexpected, 'resetting first_time',i_method_name);
1166: end if;
1167: ecx_print_local.first_time_printing := true;
1168: if (l_procedureEnabled)
1169: then
1170: ecx_debug.pop(i_method_name);
1171: end if;
1178: i_level IN pls_integer,
1179: i_index IN pls_integer
1180: )
1181: is
1182: i_method_name varchar2(2000) := 'ecx_print_local.print_new_level';
1183: i pls_integer := i_index;
1184: j pls_integer :=1;
1185: k pls_integer :=0;
1186: do_printing Boolean := false;
1349: end if;
1350:
1351: elsif ecx_utils.g_target(i).attribute_type = 1
1352: then
1353: if (ecx_print_local.first_time_printing)
1354: then
1355: do_printing := true;
1356: ecx_print_local.first_time_printing := false;
1357: suppress_profile := get_suppress_profile;
1352: then
1353: if (ecx_print_local.first_time_printing)
1354: then
1355: do_printing := true;
1356: ecx_print_local.first_time_printing := false;
1357: suppress_profile := get_suppress_profile;
1358: /* Reinitialize the clob, so that it would not have left over
1359: data from previous run */
1360: if dbms_lob.istemporary(i_xmldoc) = 1 then
1459: if(l_statementEnabled) then
1460: ecx_debug.log(l_statement,'last_node_printed = ', last_node_printed, i_method_name);
1461: end if;
1462: end if;
1463: ecx_print_local.last_printed := ecx_utils.g_target(i).attribute_id;
1464: if(l_statementEnabled) then
1465: ecx_debug.log(l_statement,'last_printed ', last_printed,i_method_name);
1466: end if;
1467:
1633: if(l_statementEnabled) then
1634: ecx_debug.log(l_statement, 'last_node_printed = ', last_node_printed,i_method_name);
1635: end if;
1636: end if;
1637: ecx_print_local.last_printed := ecx_utils.g_target(i).attribute_id;
1638: if(l_statementEnabled) then
1639: ecx_debug.log(l_statement, 'last_printed', last_printed,i_method_name);
1640: end if;
1641: end if;
1655: when ecx_utils.program_exit then
1656: if (l_procedureEnabled) then
1657: ecx_debug.pop(i_method_name);
1658: end if;
1659: ecx_print_local.suppress_profile := false;
1660: raise ECX_UTILS.PROGRAM_EXIT;
1661: when others then
1662: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_NEW_LEVEL');
1663: if(l_unexpectedEnabled) then
1658: end if;
1659: ecx_print_local.suppress_profile := false;
1660: raise ECX_UTILS.PROGRAM_EXIT;
1661: when others then
1662: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_NEW_LEVEL');
1663: if(l_unexpectedEnabled) then
1664: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_NEW_LEVEL',
1665: i_method_name);
1666: ecx_debug.log(l_unexpected, 'resetting first_time',i_method_name);
1660: raise ECX_UTILS.PROGRAM_EXIT;
1661: when others then
1662: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_NEW_LEVEL');
1663: if(l_unexpectedEnabled) then
1664: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_NEW_LEVEL',
1665: i_method_name);
1666: ecx_debug.log(l_unexpected, 'resetting first_time',i_method_name);
1667: end if;
1668: ecx_print_local.first_time_printing := true;
1664: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_NEW_LEVEL',
1665: i_method_name);
1666: ecx_debug.log(l_unexpected, 'resetting first_time',i_method_name);
1667: end if;
1668: ecx_print_local.first_time_printing := true;
1669: ecx_print_local.suppress_profile := false;
1670: if (l_procedureEnabled) then
1671: ecx_debug.pop(i_method_name);
1672: end if;
1665: i_method_name);
1666: ecx_debug.log(l_unexpected, 'resetting first_time',i_method_name);
1667: end if;
1668: ecx_print_local.first_time_printing := true;
1669: ecx_print_local.suppress_profile := false;
1670: if (l_procedureEnabled) then
1671: ecx_debug.pop(i_method_name);
1672: end if;
1673: raise ECX_UTILS.PROGRAM_EXIT;
1678: p_value IN Varchar2,
1679: x_value OUT NOCOPY Varchar2
1680: ) is
1681:
1682: i_method_name varchar2(2000) := 'ecx_print_local.escape_spec_char';
1683:
1684: begin
1685: if (p_value is null) then
1686: return;
1700: raise ECX_UTILS.PROGRAM_EXIT;
1701: when ecx_utils.program_exit then
1702: raise ECX_UTILS.PROGRAM_EXIT;
1703: when others then
1704: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.escape_spec_char');
1705: if(l_unexpectedEnabled) then
1706: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.escape_spec_char',i_method_name);
1707: end if;
1708: raise ecx_utils.program_exit;
1702: raise ECX_UTILS.PROGRAM_EXIT;
1703: when others then
1704: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.escape_spec_char');
1705: if(l_unexpectedEnabled) then
1706: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.escape_spec_char',i_method_name);
1707: end if;
1708: raise ecx_utils.program_exit;
1709: end escape_spec_char;
1710:
1712: p_value IN Varchar2,
1713: x_value OUT NOCOPY Varchar2
1714: ) is
1715:
1716: i_method_name varchar2(2000) := 'ecx_print_local.replace_spec_char';
1717:
1718: begin
1719: if(l_statementEnabled) then
1720: ecx_debug.log(l_statement, 'p_value', p_value,i_method_name);
1745: ecx_debug.log(l_statement,'x_value', x_value,i_method_name);
1746: end if;
1747: exception
1748: when others then
1749: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.replace_spec_char');
1750: if(l_unexpectedEnabled) then
1751: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.replace_spec_char',i_method_name);
1752: end if;
1753: raise ecx_utils.program_exit;
1747: exception
1748: when others then
1749: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_PRINT_LOCAL.replace_spec_char');
1750: if(l_unexpectedEnabled) then
1751: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_PRINT_LOCAL.replace_spec_char',i_method_name);
1752: end if;
1753: raise ecx_utils.program_exit;
1754: end replace_spec_char;
1755: procedure get_chunks
1758: is_cdata IN boolean
1759: )
1760: is
1761:
1762: i_method_name varchar2(2000) := 'ecx_print_local.get_chunks';
1763:
1764: i pls_integer:=1;
1765: clength pls_integer:=0;
1766: i_temp varchar2(32767);
1789: raise ECX_UTILS.PROGRAM_EXIT;
1790: when ecx_utils.program_exit then
1791: raise ECX_UTILS.PROGRAM_EXIT;
1792: When Others Then
1793: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.GET_CHUNKS');
1794: if(l_unexpectedEnabled) then
1795: ecx_debug.log(l_unexpected, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.GET_CHUNKS',
1796: i_method_Name);
1797: end if;
1791: raise ECX_UTILS.PROGRAM_EXIT;
1792: When Others Then
1793: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.GET_CHUNKS');
1794: if(l_unexpectedEnabled) then
1795: ecx_debug.log(l_unexpected, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.GET_CHUNKS',
1796: i_method_Name);
1797: end if;
1798: raise ecx_utils.program_exit;
1799: End;
1806: is_cdata IN boolean
1807: )
1808: is
1809:
1810: i_method_name varchar2(2000) := 'ecx_print_local.get_chunks';
1811:
1812: i pls_integer:=1;
1813: clength pls_integer:=0;
1814: i_temp varchar2(32767);
1834: raise ECX_UTILS.PROGRAM_EXIT;
1835: when ecx_utils.program_exit then
1836: raise ECX_UTILS.PROGRAM_EXIT;
1837: When Others Then
1838: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.GET_CHUNKS');
1839: if(l_unexpectedEnabled) then
1840: ecx_debug.log(l_unexpected,'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.GET_CHUNKS',
1841: i_method_name);
1842: end if;
1836: raise ECX_UTILS.PROGRAM_EXIT;
1837: When Others Then
1838: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.GET_CHUNKS');
1839: if(l_unexpectedEnabled) then
1840: ecx_debug.log(l_unexpected,'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.GET_CHUNKS',
1841: i_method_name);
1842: end if;
1843: raise ecx_utils.program_exit;
1844: End;
1845:
1846:
1847: FUNCTION has_fragment (var_pos IN pls_integer) return boolean
1848: is
1849: i_method_name varchar2(2000) := 'ecx_print_local.has_fragment';
1850: flag varchar2(1):= 'N';
1851: BEGIN
1852:
1853: if (ecx_utils.g_xml_frag.count >0 and ecx_utils.g_target(var_pos).value is
1871: return FALSE;
1872: end if;
1873: exception
1874: When Others Then
1875: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.HAS_FRAGMENT');
1876: if(l_unexpectedEnabled) then
1877: ecx_debug.log(l_unexpected,'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.HAS_FRAGMENT',
1878: i_method_name);
1879: end if;
1873: exception
1874: When Others Then
1875: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.HAS_FRAGMENT');
1876: if(l_unexpectedEnabled) then
1877: ecx_debug.log(l_unexpected,'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.HAS_FRAGMENT',
1878: i_method_name);
1879: end if;
1880: raise ecx_utils.program_exit;
1881:
1882: end;
1883:
1884: FUNCTION has_fragment_value (var_pos IN pls_integer) return boolean
1885: is
1886: i_method_name varchar2(2000) := 'ecx_print_local.has_fragment_value';
1887: flag varchar2(1):= 'N';
1888: BEGIN
1889: if (ecx_utils.g_xml_frag.count >0 and ecx_utils.g_target(var_pos).value is
1890: null and ecx_utils.g_target(var_pos).clob_value is null) then
1907: end if;
1908: EXCEPTION
1909: When Others Then
1910: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' -
1911: ECX_PRINT_LOCAL.HAS_FRAGMENT_VALUE');
1912: if(l_unexpectedEnabled) then
1913: ecx_debug.log(l_unexpected,'ECX', ecx_utils.i_errbuf || SQLERRM || ' -
1914: ECX_PRINT_LOCAL.HAS_FRAGMENT_VALUE',
1915: i_method_name);
1910: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' -
1911: ECX_PRINT_LOCAL.HAS_FRAGMENT_VALUE');
1912: if(l_unexpectedEnabled) then
1913: ecx_debug.log(l_unexpected,'ECX', ecx_utils.i_errbuf || SQLERRM || ' -
1914: ECX_PRINT_LOCAL.HAS_FRAGMENT_VALUE',
1915: i_method_name);
1916: end if;
1917: raise ecx_utils.program_exit;
1918:
1920:
1921: PROCEDURE print_xml_fragment (var_pos IN pls_integer,
1922: print_tag IN boolean)
1923: is
1924: i_method_name varchar2(2000) := 'ecx_print_local.print_xml_fragment';
1925: begin
1926: if (l_procedureEnabled) then
1927: ecx_debug.push(i_method_name);
1928: end if;
1951: ecx_debug.pop(i_method_name);
1952: end if;
1953: EXCEPTION
1954: When Others Then
1955: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_XML_FRAGMENT');
1956: if(l_unexpectedEnabled) then
1957: ecx_debug.log(l_unexpected,'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_XML_FRAGMENT',
1958: i_method_name);
1959: end if;
1953: EXCEPTION
1954: When Others Then
1955: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_XML_FRAGMENT');
1956: if(l_unexpectedEnabled) then
1957: ecx_debug.log(l_unexpected,'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_PRINT_LOCAL.PRINT_XML_FRAGMENT',
1958: i_method_name);
1959: end if;
1960: raise ecx_utils.program_exit;
1961: end;
1959: end if;
1960: raise ecx_utils.program_exit;
1961: end;
1962:
1963: end ecx_print_local;