123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>Untitle</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <source>
- <source/>
- </source>
- <destination>
- <destination/>
- </destination>
- </root>
- </instance>
- <script type="javascript">
- <![CDATA[
- //Replace
- function fReplace(strStep1, strDelete)
- {
- var t1, t2;
- var flag1 = 0;
- var flag2 = 0;
- t1=strStep1.replace(strDelete, "");
- for (var i=0;i<=900;i++){
- if ((i%2)== 0){
- t2=t1.replace(strDelete, "");
- flag1 = 0;
- flag2 = 1;
- }else{
- t1=t2.replace(strDelete, "");
- flag1 = 1;
- flag2 = 0;
- }
- }
- if (flag1==1){return t1;}
-
- if (flag2==1){return t2;}
- }
- ]]>
- </script>
- </model>
- </xhtml:head>
- <xhtml:body>
- <button id="button1" style="left:25px; top:480px; width:110px; height:40px; ">
- <caption>실행</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var xmlArray, temp, strSource, strStep1;
- var xmlTypeArr, strXmlType;
- temp=model.getValue("/root/source/source");
- xmlTypeArr=temp.split("submit id=");
- temp=fReplace(xmlTypeArr[1], '"');
- strXmlType=temp.substr(0, 2);
-
-
- temp=model.getValue("/root/source/source");
- strSource=temp.replace('\"', '');
- xmlArray=strSource.split("--");
-
- strStep1 = "/** \n";
- strStep1 = strStep1 + " * <p>"+xmlArray[1]+"</p>\n";
- strStep1 = strStep1 + " * "+xmlArray[1]+"\n";
- strStep1 = strStep1 + " * \n";
- strStep1 = strStep1 + " * @param pVOs ValueObjectAssembler\n";
- var strSource=model.getValue("/root/source/source");
- var xmlArray=strSource.split("table id=");
- var xmlArray2 = xmlArray[1].split("count_ref");
- strStep1 = strStep1 + " * <p>"+xmlArray2[0]+" : 입력데이터\n";
- strStep1 = strStep1 + " * <ul>\n";
-
- var xmlArray=xmlArray2[1];
- var xmlArray2=xmlArray.split("column id=");
- for (var i=1;i<xmlArray2.length;i++){
- xmlArray = xmlArray2[i].split("desc=");
- var temp = xmlArray[1].split("ref=");
- strStep1 = strStep1 + " * <li>"+xmlArray[0]+" "+temp[0]+"\n";
-
- }
- strStep1 = strStep1 + " * </ul>\n";
- if ((strXmlType=="TR") || (strXmlType=="tr")){
- strStep1 = strStep1 + " * @return ValueObjectAssembler\n";
- temp=model.getValue("/root/source/source");
- strSource=temp.replace('\"', '');
- xmlArray=strSource.split("output path");
- xmlArray2=xmlArray[1].split("table id=");
- xmlArray=xmlArray2[1].split("count_ref");
- strStep1 = strStep1 + " * <p>"+xmlArray[0]+" : 출력데이터\n";
- strStep1 = strStep1 + " * <ul>\n";
- var xmlArray=xmlArray2[1];
- var xmlArray2=xmlArray.split("column id=");
- for (var i=1;i<xmlArray2.length;i++){
-
- xmlArray = xmlArray2[i].split("desc=");
- var temp = xmlArray[1].split("ref=");
- strStep1 = strStep1 + " * <li>"+xmlArray[0]+" "+temp[0]+"\n";
-
- }
- var strStep2;
- strStep2=fReplace(strStep1, '"string"');
- strStep1=fReplace(strStep2, '"CDATA"');
- strStep2=fReplace(strStep1, 'type=');
- strStep1=fReplace(strStep2, "=");
- strStep2=fReplace(strStep1, '"int"');
- strStep1=fReplace(strStep2, '"cdata"');
- strStep2=fReplace(strStep1, '"STRING"');
- strStep1=fReplace(strStep2, '"');
- strStep1 = strStep1 + " * </ul>\n";
- strStep1 = strStep1 + " * @throws LiveException\n";
- strStep1 = strStep1 + " */\n";
-
- }else{
- var strStep2;
- strStep2=fReplace(strStep1, '"string"');
- strStep1=fReplace(strStep2, '"CDATA"');
- strStep2=fReplace(strStep1, 'type=');
- strStep1=fReplace(strStep2, "=");
- strStep2=fReplace(strStep1, '"int"');
- strStep1=fReplace(strStep2, '"cdata"');
- strStep2=fReplace(strStep1, '"STRING"');
- strStep1=fReplace(strStep2, '"');
-
- strStep1 = strStep1 + " * @return int\n";
- strStep1 = strStep1 + " * @throws LiveException\n";
- strStep1 = strStep1 + " */\n";
- }
- model.setValue("/root/destination/destination", strStep1);
- model.refresh();
-
- ]]>
- </script>
- </button>
- <textarea id="textarea1" ref="/root/source/source" style="left:10px; top:60px; width:415px; height:400px; "/>
- <textarea id="textarea2" ref="/root/destination/destination" style="left:455px; top:60px; width:430px; height:400px; "/>
- <button id="button2" style="left:150px; top:480px; width:110px; height:40px; ">
- <caption>지우기</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- model.setValue("/root/source/source", "");
- model.setValue("/root/destination/destination", "");
- model.refresh();
- ]]>
- </script>
- </button>
- <caption id="caption4" class="tit_2" style="left:15px; top:20px; width:179px; height:25px; ">map 파일을 붙여 넣어 주세요.</caption>
- <caption id="caption1" class="tit_2" style="left:455px; top:20px; width:179px; height:25px; ">처리된 내용입니다.</caption>
- </xhtml:body>
- </xhtml:html>
|