diff --git a/src-modules/module/kb/etl/wiki2html/mwtools.js b/src-modules/module/kb/etl/wiki2html/mwtools.js index 640cec1..7e091fc 100644 --- a/src-modules/module/kb/etl/wiki2html/mwtools.js +++ b/src-modules/module/kb/etl/wiki2html/mwtools.js @@ -179,6 +179,69 @@ this.renderTemplate = function () { internalHyperlinks.push(newLink); } + break; + case "CardWithImgHeaderandFooter": + ret+=""; + for(var i=0; i < templateOptionName.length;i++) + { + if(templateOptionName[i]=="imgsrc") + { + ret+=""+templateOptionValue[i].trim(); + ret+=""; + } + if(templateOptionName[i]=="link") + { + ret+=""; + ret+=wikiLink2Xml(templateOptionValue[i],internalHyperlinks); + + ret+=""; + + + } + if(templateOptionName[i]=="title") + { + ret+=""; + ret+=templateOptionValue[i]; + ret+=""; + + } + if(templateOptionName[i]=="subtitle") + { + ret+=""; + ret+=templateOptionValue[i]; + ret+=""; + + } + /*if(templateOptionName[i]=="link1") + { + ret+=""; + ret+=templateOptionValue[i]; + ret+=""; + + } + + if(templateOptionName[i]=="link2") + { + ret+=""; + ret+=templateOptionValue[i]; + ret+=""; + + }*/ + if(templateOptionName[i]=="content") + { + ret+=""; + ret+=templateOptionValue[i]; + ret+=""; + + } + } + ret+=""; + //register the image src: + //var newLink = new internalHyperlink("","image", templateOptionValue[0], "", templateOptionValue[0],internalHyperlinks); + //internalHyperlinks.push(newLink); + + + break; default: if(templateName.indexOf(" ") > -1) @@ -1900,6 +1963,8 @@ function getHrefEnd(str,foundPos) return hrefEnd; } + + /* find searchstr in str, but not inside [[...]] */ function getCharposOutsideLinks(str,searchstr) @@ -1930,3 +1995,47 @@ function stringStartsWith(str,lookfor) function stringEndsWith(str, lookfor) { return str.indexOf(lookfor, str.length - lookfor.length) !== -1; } + +function wikiLink2Xml(str,internalHyperlinks) +{ + var ret=""; + var href="Link"; + var linkTypeExternal=true; + var linkTagLength=1; + if(stringStartsWith(str,"[[")) + { + linkTypeExternal=false; + linkTagLength=2; + } + var linkContentLeft=str.substr(linkTagLength); + var linkContentRight=linkContentLeft.substring(0,linkContentLeft.length-linkTagLength); + var firstBlankPos=linkContentRight.indexOf(" "); + ret+=""; + if(firstBlankPos >0) + { + href=linkContentRight.substring(0,firstBlankPos); + ret+=href; + + } + else + ret+=linkContentRight; + ret+=""; + + var linkName=""; + ret+=""; + if(firstBlankPos>1) + { + linkName=linkContentRight.substr(firstBlankPos); + ret+=linkName.trim(); + } + ret+=""; + if(!linkTypeExternal) + { + //interne Links verarbeiten + var newLink = new internalHyperlink("","", href.trim(), "", linkName,internalHyperlinks); + internalHyperlinks.push(newLink); + } + + + return ret; +} diff --git a/src-modules/module/kb/etl/wiki2html/parser_stuerzt_ab_wg_zellattributen_und_zwei_Bindestrichen_in_leerer_Zelle.txt b/src-modules/module/kb/etl/wiki2html/parser_stuerzt_ab_wg_zellattributen_und_zwei_Bindestrichen_in_leerer_Zelle.txt new file mode 100644 index 0000000..962ad22 --- /dev/null +++ b/src-modules/module/kb/etl/wiki2html/parser_stuerzt_ab_wg_zellattributen_und_zwei_Bindestrichen_in_leerer_Zelle.txt @@ -0,0 +1,184 @@ + + +'''Modul-Beschreibungen''' + +Jedes SuperX-Modul verfügt über eine eigene '''Modul-Homepage''' mit ausführlicher Modulbeschreibung, die +* Informationen über dessen Nutzen, Verfügbarkeit, Erstinstallation, Update und Versionen sowie +* Zugänge zu den Handbüchern über dessen Bedienung, Konfiguration/Administration, Datenbankstruktur und Schnittstellendetails umfasst. + +Über die folgende Tabelle gelangen Sie rasch zu den modulspezifischen Artikeln, indem Sie das Link-Symbol [[Image:link.svg|20px]] in der betreffenden Zelle anklicken. + +==SuperX-Module: Campus-Management== + +{| class="wikitable" +|- +! Homepage +! Highlights +! Handbücher +! Installation +! Versionen + +|- +| [[Image:Kern_small.png|100px]] [[Moduldokumentation Kernmodul|'''Kern''']] +| +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/kern_modul/f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/kern_modul/f_Installation.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/kern_modul/f_Versionshistorie.htm]] + +|- +| [[Image:APP_small.png|100px]] [[Moduldokumentation Bewerbung_Zulassung|'''Bewerbungen, Zulassungen''']] +| +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/zul_modul/f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/zul_modul/f_Installation.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/zul_modul/f_Versionshistorie.htm]] + +|- +| [[image: StudPruef4_small.png|100px]] [[Moduldokumentation Studierende_Pruefungen|'''Studierende, Prüfungen''']] +| +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/sos_modul/f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/sos_modul/f_Installation.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/sos_modul/f_Versionshistorie.htm]] + +|- +| [[Image:Erfolg_small.png|100px]] [[Moduldokumentation Studienerfolg|'''Studienerfolg''']] +| +* [[Studienerfolg_Akkreditierungsberichte|Akkreditierungsberichte]] +* [[Studienerfolg Bachelor-Master Übergang|Bachelor-Master Übergang]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/erfolg_modul/f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/erfolg_modul/f_Installation.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/erfolg_modul/f_Versionshistorie.htm]] + +|- +| [[Image:Gang_small.png|100px]] [[Moduldokumentation Studiengaenge|'''Studiengänge''']] +| +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/gang_modul/f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/gang_modul/f_Installation.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/gang_modul/f_Versionshistorie.htm]] + +|- +| [[Image:COSTAGE.png|100px]] [[Moduldokumentation COSTAGE| '''COStage (TU Graz CampusOnline)''']] +| +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/costage_modul/f_DokumentationundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/costage_modul/f_Installation.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/costage_modul/f_Versionshistorie.htm]] +|} + +==SuperX-Module: Ressourcen-Management== + +{| class="wikitable zebra" +|- +! Homepage +! Highlights +! Handbücher +! Installation +! Versionen + +|- +| [[Image:SVA2.png|100px]] [[Moduldokumentation Personal,_Stellen|'''Personal, Stellen''']] +| +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/sva_modul/f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/sva_modul/f_Installation.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/sva_modul/f_Versionshistorie.htm]] + +|- +| [[Image:FIN2_small.png|100px]] [[Moduldokumentation Finanzrechnung|'''Finanzen (kam., kfm.)''']] +| +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/fin_modul/f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/fin_modul/f_Installation.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/fin_modul/f_Versionshistorie.htm]] + +|- +| [[Image:KLR2_small.png|100px]] [[Moduldokumentation Kostenrechnung|'''Kostenrechnung''']] +| +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/cob_modul/f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/cob_modul/f_Installation.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/cob_modul/f_Versionshistorie.htm]] + +|- +| [[Image:IVS2_small.png|100px]] [[Moduldokumentation Inventar|'''Inventar''']] +| +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/ivs_modul/f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/ivs_modul/f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/ivs_modul/f_Versionshistorie.htm]] + +|- +| [[Image:BAU2_small.png|100px]] [[Moduldokumentation Bau|'''Flächen, Räume''']] +| +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/bau_modul/f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/bau_modul/f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/bau_modul/f_Versionshistorie.htm]] + +|- +| [[Image:GXstage_small.png|100px]] [[Moduldokumentation GXStage|'''GXStage (SAP kameral)''']] +| +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/gxstage_modul/f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/gxstage_modul/f_Installation.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|-- +|} + +==SuperX-Module: Campus-Ressourcen-Übergreifend== + +{| class="wikitable zebra" +! Homepage +! Highlights +! Handbücher +! Installation +! Versionen + +|- +| [[Image:MAN2_small.png|100px]] [[Moduldokumentation Managementkennzahlen|'''Managementkennzahlen''']] +| +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/man_modul/f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/man_modul/f_Installation.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/man_modul/f_Versionshistorie.htm]] + +|- +| [[Image:KENN2_small.png|100px]] [[Moduldokumentation Grunddaten_und_Kennzahlen|'''Landeskennzahlen''']] +| +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/kenn_modul//f_HandbcherundRessourcen.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/kenn_modul//f_Installation.htm]] +| style="text-align: center;" data-mce-style="text-align: center;"|[[Image:link.svg|20px|link=https://super-ics.de/superx/doku/kenn_modul//f_Versionshistorie.htm]] + +|- +| [[Image:WB_small.png|100px]] [[Moduldokumentation Wissensbasis|'''Wissensbasis''']] +| Zugang: [[Image:link.svg|20px|link=http://wissensbasis.superx-projekt.de/]] +| style="text-align: center;" data-mce-style="text-align: center;"|-- +| style="text-align: center;" data-mce-style="text-align: center;"|-- +| style="text-align: center;" data-mce-style="text-align: center;"|-- +|} + + + diff --git a/src-modules/module/kb/etl/wiki2html/wiki2html.kjb b/src-modules/module/kb/etl/wiki2html/wiki2html.kjb index c98fa88..066b08f 100644 --- a/src-modules/module/kb/etl/wiki2html/wiki2html.kjb +++ b/src-modules/module/kb/etl/wiki2html/wiki2html.kjb @@ -321,7 +321,7 @@ TRANS filename - ${Internal.Job.Filename.Directory}/wiki2xhtml.ktr + ${Internal.Job.Filename.Directory}/wiki2xhtml_nodownload.ktr N N @@ -1155,5 +1155,27 @@ Authentication Method: ${authentication_method} N - + + + Provisorisch _nodownload.ktr + 96 + 224 + 201 + 27 + + -1 + N + N + 0 + 0 + 0 + 255 + 205 + 112 + 100 + 100 + 100 + Y + + diff --git a/src-modules/module/kb/etl/wiki2html/wiki2xhtml_nodownload.ktr b/src-modules/module/kb/etl/wiki2html/wiki2xhtml_nodownload.ktr new file mode 100644 index 0000000..afad687 --- /dev/null +++ b/src-modules/module/kb/etl/wiki2html/wiki2xhtml_nodownload.ktr @@ -0,0 +1,637 @@ + + + wiki2xhtml_nodownload + + + + Normal + 0 + / + + + document_id + 68 + + + + + + + + + + + + + ID_BATCH + Y + ID_BATCH + + + CHANNEL_ID + Y + CHANNEL_ID + + + TRANSNAME + Y + TRANSNAME + + + STATUS + Y + STATUS + + + LINES_READ + Y + LINES_READ + + + + LINES_WRITTEN + Y + LINES_WRITTEN + + + + LINES_UPDATED + Y + LINES_UPDATED + + + + LINES_INPUT + Y + LINES_INPUT + + + + LINES_OUTPUT + Y + LINES_OUTPUT + + + + LINES_REJECTED + Y + LINES_REJECTED + + + + ERRORS + Y + ERRORS + + + STARTDATE + Y + STARTDATE + + + ENDDATE + Y + ENDDATE + + + LOGDATE + Y + LOGDATE + + + DEPDATE + Y + DEPDATE + + + REPLAYDATE + Y + REPLAYDATE + + + LOG_FIELD + Y + LOG_FIELD + + + EXECUTING_SERVER + N + EXECUTING_SERVER + + + EXECUTING_USER + N + EXECUTING_USER + + + CLIENT + N + CLIENT + + + + + +
+ + + + ID_BATCH + Y + ID_BATCH + + + SEQ_NR + Y + SEQ_NR + + + LOGDATE + Y + LOGDATE + + + TRANSNAME + Y + TRANSNAME + + + STEPNAME + Y + STEPNAME + + + STEP_COPY + Y + STEP_COPY + + + LINES_READ + Y + LINES_READ + + + LINES_WRITTEN + Y + LINES_WRITTEN + + + LINES_UPDATED + Y + LINES_UPDATED + + + LINES_INPUT + Y + LINES_INPUT + + + LINES_OUTPUT + Y + LINES_OUTPUT + + + LINES_REJECTED + Y + LINES_REJECTED + + + ERRORS + Y + ERRORS + + + INPUT_BUFFER_ROWS + Y + INPUT_BUFFER_ROWS + + + OUTPUT_BUFFER_ROWS + Y + OUTPUT_BUFFER_ROWS + + + + + +
+ + + ID_BATCH + Y + ID_BATCH + + + CHANNEL_ID + Y + CHANNEL_ID + + + LOG_DATE + Y + LOG_DATE + + + LOGGING_OBJECT_TYPE + Y + LOGGING_OBJECT_TYPE + + + OBJECT_NAME + Y + OBJECT_NAME + + + OBJECT_COPY + Y + OBJECT_COPY + + + REPOSITORY_DIRECTORY + Y + REPOSITORY_DIRECTORY + + + FILENAME + Y + FILENAME + + + OBJECT_ID + Y + OBJECT_ID + + + OBJECT_REVISION + Y + OBJECT_REVISION + + + PARENT_CHANNEL_ID + Y + PARENT_CHANNEL_ID + + + ROOT_CHANNEL_ID + Y + ROOT_CHANNEL_ID + + + + + +
+ + + ID_BATCH + Y + ID_BATCH + + + CHANNEL_ID + Y + CHANNEL_ID + + + LOG_DATE + Y + LOG_DATE + + + TRANSNAME + Y + TRANSNAME + + + STEPNAME + Y + STEPNAME + + + STEP_COPY + Y + STEP_COPY + + + LINES_READ + Y + LINES_READ + + + LINES_WRITTEN + Y + LINES_WRITTEN + + + LINES_UPDATED + Y + LINES_UPDATED + + + LINES_INPUT + Y + LINES_INPUT + + + LINES_OUTPUT + Y + LINES_OUTPUT + + + LINES_REJECTED + Y + LINES_REJECTED + + + ERRORS + Y + ERRORS + + + LOG_FIELD + N + LOG_FIELD + + + + + +
+ + + ID_BATCH + Y + ID_BATCH + + + CHANNEL_ID + Y + CHANNEL_ID + + + LOG_DATE + Y + LOG_DATE + + + METRICS_DATE + Y + METRICS_DATE + + + METRICS_CODE + Y + METRICS_CODE + + + METRICS_DESCRIPTION + Y + METRICS_DESCRIPTION + + + METRICS_SUBJECT + Y + METRICS_SUBJECT + + + METRICS_TYPE + Y + METRICS_TYPE + + + METRICS_VALUE + Y + METRICS_VALUE + + + + + +
+ + 0.0 + 0.0 + + 10000 + 50 + 50 + N + Y + 50000 + Y + + N + 1000 + 100 + + + + + - + 2017/08/22 11:23:11.075 + - + 2017/08/22 11:23:11.075 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + wiki2html + Update src_xml + Y + + + getSrcTitle + wiki2html + Y + + + + Update src_xml + Update + + Y + + 1 + + none + + + eduetl + N + 100 + N + N + + + +
kb_document_source
+ + document_id + document_id + = + + + + src_xml + contentHtml + + + last_input + last_input + + + src_headers + headersStr + + + src_header_levels + headersLevelsStr + + + internal_hyperlinks + internalHyperlinksStr + + + template_options + templateOptionsStr + + + + + + + + + 560 + 144 + Y + + + + getSrcTitle + TableInput + + Y + + 1 + + none + + + eduetl + select S.document_id, S.src_title, S.src_text,S.src_api_xml, + S.src_url,W.hostname,W.api_path,W.cookie_name, W.cookie_value, today() as last_input ,S.src_text as result_text +from kb_document_source S, kb_webconnection W +where W.id=S.webconnection_id +and S.document_id=${document_id} + 0 + + N + Y + N + + + + + + + 64 + 48 + Y + + + + wiki2html + ScriptValueMod + + Y + + 1 + + none + + + N + 9 + + + 0 + Script 1 + //Script here +// assuming, that the ua-parser.js is in the transformation directory: +var transformationPath = getVariable("Internal.Transformation.Filename.Directory", ""); +var jsScriptPath = transformationPath + "/mwtools.js"; +LoadScriptFile(jsScriptPath); +//alert("klappt"); + +var newWikiModel = new wikiModel(result_text); + +//var contentHtml=mw2xhtml(result_text); + +var contentHtml=newWikiModel.wikiHtml; +var headersStr=newWikiModel.headersStr; +var headersLevelsStr=newWikiModel.headersLevelsStr; +var internalHyperlinksStr=newWikiModel.internalHyperlinksStr; +var templateOptionsStr=newWikiModel.templateOptionsStr; + + + + + + contentHtml + contentHtml + String + -1 + -1 + N + + + headersStr + headersStr + String + -1 + -1 + N + + + headersLevelsStr + headersLevelsStr + String + -1 + -1 + N + + + internalHyperlinksStr + internalHyperlinksStr + String + -1 + -1 + N + + + templateOptionsStr + templateOptionsStr + String + -1 + -1 + N + + + + + + + + + 320 + 112 + Y + + + + + N +
diff --git a/src-modules/module/kb/etl/xml2html/createBodyPrintversion.ktr b/src-modules/module/kb/etl/xml2html/createBodyPrintversion.ktr index 6fb67b4..e0de3cb 100644 --- a/src-modules/module/kb/etl/xml2html/createBodyPrintversion.ktr +++ b/src-modules/module/kb/etl/xml2html/createBodyPrintversion.ktr @@ -1,5 +1,4 @@ - - + replaceBodyPrintversion @@ -7,7 +6,7 @@ Normal 0 - / + / document_id @@ -429,47 +428,18 @@ N 1000 100 - - - - - - - - + + + + - - 2018/01/19 19:23:22.741 + 2018/01/19 19:23:22.741 - - 2018/01/19 19:23:22.741 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= + 2018/01/19 19:23:22.741 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= N - - - - eduetl - localhost - POSTGRESQL - Native - community - 9998 - superx - Encrypted 2be98afc86aa7f2e4be0b8b49fca3e2f0 - superx_host_iso - - - - FORCE_IDENTIFIERS_TO_LOWERCASEN - FORCE_IDENTIFIERS_TO_UPPERCASEN - IS_CLUSTEREDN - PORT_NUMBER9998 - PRESERVE_RESERVED_WORD_CASEY - QUOTE_ALL_FIELDSN - SUPPORTS_BOOLEAN_DATA_TYPEY - SUPPORTS_TIMESTAMP_DATA_TYPEY - USE_POOLINGN - - + getChapters @@ -505,8 +475,7 @@ N - - + File content @@ -520,7 +489,7 @@ -1 none N - + File size size @@ -533,8 +502,8 @@ -1 none N - - + + 0 Y sourceFileName @@ -547,18 +516,15 @@ - - - - + + 224 80 Y - - + getChapters TableInput @@ -571,7 +537,20 @@ eduetl - select C.id as chapter_tid,D.id as document_id,'${Internal.Transformation.Filename.Directory}/tmp/files_${document_id}/f_' || C.chapter_filename || '.htm' as "sourceFileName", '${Internal.Transformation.Filename.Directory}/tmp/files_${document_id}/f_' || C.chapter_filename || '.htm' as "targetFileName", '${Internal.Transformation.Filename.Directory}/tmp/files_${document_id}/__index_new.htm' as "indexFileName", '#body' || C.id || '#' as body_marker, replace(C.chapter_bodytext,'$','&#36;') as body, --Dollar Zeichen wird maskiert damit Kettle das nicht als Variable interpretiert '<h' || (C.chapter_level+1) || '>' || C.defaulttext ||'</h' || (C.chapter_level+1) || '>' as chapter_header, (select P.target_server || '/' || P.document_root || '/' || P.target_path from kb_output_project P, kb_output_project_part A where P.id=A.output_project_id and A.src_document_id=${document_id}) as target_path, (select '<a href="' || P.pdf_file || '">PDF</a>' from kb_output_project P, kb_output_project_part A where P.id=A.output_project_id and A.src_document_id=${document_id}) as pdf_file, coalesce((select '${Internal.Transformation.Filename.Directory}/' || L.embedded_files_path || '/mwTemplates.xsl' from kb_output_project_layout L, kb_output_project P, kb_output_project_part A where P.id=A.output_project_id and A.src_document_id=${document_id} and P.kb_output_project_layout_id=L.id),'${Internal.Transformation.Filename.Directory}/mwTemplates.xsl') as mwtemplates from kb_chapter C, kb_document D where D.id=C.document_id and D.id=${document_id} order by sortnr; + select C.id as chapter_tid,D.id as document_id,'${Internal.Transformation.Filename.Directory}/tmp/files_${document_id}/f_' || C.chapter_filename || '.htm' as "sourceFileName", +'${Internal.Transformation.Filename.Directory}/tmp/files_${document_id}/f_' || C.chapter_filename || '.htm' as "targetFileName", +'${Internal.Transformation.Filename.Directory}/tmp/files_${document_id}/__index_new.htm' as "indexFileName", +'#body' || C.id || '#' as body_marker, +replace(C.chapter_bodytext,'$','&#36;') as body, --Dollar Zeichen wird maskiert damit Kettle das nicht als Variable interpretiert +'<h' || (C.chapter_level+1) || '>' || C.defaulttext ||'</h' || (C.chapter_level+1) || '>' as chapter_header, +(select P.target_server || '/' || P.document_root || '/' || P.target_path from kb_output_project P, kb_output_project_part A where P.id=A.output_project_id and A.src_document_id=${document_id}) as target_path, +(select '<a href="' || P.pdf_file || '">PDF</a>' from kb_output_project P, kb_output_project_part A where P.id=A.output_project_id and A.src_document_id=${document_id}) as pdf_file, +coalesce((select '${Internal.Transformation.Filename.Directory}/' || L.embedded_files_path || '/mwTemplates.xsl' from kb_output_project_layout L, kb_output_project P, kb_output_project_part A where P.id=A.output_project_id and A.src_document_id=${document_id} +and P.kb_output_project_layout_id=L.id),'${Internal.Transformation.Filename.Directory}/mwTemplates.xsl') as mwtemplates +from kb_chapter C, kb_document D +where D.id=C.document_id +and D.id=${document_id} +order by sortnr; 0 N @@ -579,18 +558,15 @@ N - - - - + + 64 80 Y - - + processTemplates UserDefinedJavaClass @@ -602,14 +578,11 @@ none - - + TRANSFORM_CLASS - Processor - - import java.io.File; import java.io.IOException; import java.io.InputStreamReader; @@ -639,7 +612,7 @@ String body=get(Fields.In, "body").getString(r); String mwTemplateContent=""; -int cursor=body.indexOf("<"+mwTemplateElem); +int cursor=body.indexOf("<"+mwTemplateElem); if(cursor==-1) { //do nothing @@ -649,14 +622,14 @@ putRow(data.outputRowMeta, outputRow); return true; } -while (cursor>-1) { +while (cursor>-1) { String body_vorher=body.substring(0,cursor); -int endTag=body.indexOf(""); -if(endTag >-1) +int endTag=body.indexOf("</"+mwTemplateElem+">"); +if(endTag >-1) { System.out.println("body_vorher:"+body_vorher); -mwTemplateContent=body.substring(cursor,endTag+mwTemplateElem.length()+3).replaceAll("&","&"); +mwTemplateContent=body.substring(cursor,endTag+mwTemplateElem.length()+3).replaceAll("&","&amp;"); System.out.println("mwTemplateContent:"+mwTemplateContent); String body_nachher=body.substring(endTag+mwTemplateElem.length()+3,body.length()); @@ -670,7 +643,7 @@ else { body=body_vorher+body.substring(cursor+mwTemplateElem.length()+2,body.length()); } -cursor=body.indexOf("<"+mwTemplateElem); +cursor=body.indexOf("<"+mwTemplateElem); } Object[] outputRow = createOutputRow(r, data.outputRowMeta.size()); @@ -699,25 +672,25 @@ public static String xsltTransform(String inXml, String xslFile) result=xmlOutWriter.toString(); return result; - }// Ende der Methode]]> - + }// Ende der Methode + - - N - + + N + + + + - - - - + + 400 80 Y - - + Text file output TextFileOutput @@ -729,7 +702,7 @@ return result; none - ${line.separator} + ${line.separator} N N @@ -743,7 +716,7 @@ return result; indexFileName Y - ${Internal.Transformation.Filename.Directory}/tmp_index_content + ${Internal.Transformation.Filename.Directory}/tmp_index_content N N Y @@ -788,21 +761,16 @@ return result; - - - - + + 560 80 Y - - - - - - + + + N diff --git a/src-modules/module/kb/etl/xml2html/mwTemplates.xsl b/src-modules/module/kb/etl/xml2html/mwTemplates.xsl index 8066c93..bd9375d 100644 --- a/src-modules/module/kb/etl/xml2html/mwTemplates.xsl +++ b/src-modules/module/kb/etl/xml2html/mwTemplates.xsl @@ -242,5 +242,51 @@ Verfügbar ab Version siehe + + + + +
+
+
+

+ + + + + + +

+
+ +
+
+
+ +
+
+ +
+ +
+
+ + +
+ +
+
+
+ + +
diff --git a/src-modules/module/kb/etl/xml2html/publishOutputProject.ktr b/src-modules/module/kb/etl/xml2html/publishOutputProject.ktr index 7319663..cc40f16 100644 --- a/src-modules/module/kb/etl/xml2html/publishOutputProject.ktr +++ b/src-modules/module/kb/etl/xml2html/publishOutputProject.ktr @@ -1,5 +1,4 @@ - - + publishOutputProject @@ -7,7 +6,7 @@ Normal 0 - / + / document_id @@ -429,47 +428,18 @@ N 1000 100 - - - - - - - - + + + + - - 2018/01/20 10:53:22.812 + 2018/01/20 10:53:22.812 - - 2018/01/20 10:53:22.812 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= + 2018/01/20 10:53:22.812 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= N - - - - eduetl - localhost - POSTGRESQL - Native - community - 9998 - superx - Encrypted 2be98afc86aa7f2e4be0b8b49fca3e2f0 - superx_host_iso - - - - FORCE_IDENTIFIERS_TO_LOWERCASEN - FORCE_IDENTIFIERS_TO_UPPERCASEN - IS_CLUSTEREDN - PORT_NUMBER9998 - PRESERVE_RESERVED_WORD_CASEY - QUOTE_ALL_FIELDSN - SUPPORTS_BOOLEAN_DATA_TYPEY - SUPPORTS_TIMESTAMP_DATA_TYPEY - USE_POOLINGN - - + getOutputProjectDetails @@ -515,8 +485,7 @@ N - - + homepage_content @@ -530,8 +499,8 @@ -1 none N - - + + 0 Y from_firstchapter_filename @@ -544,18 +513,15 @@ - - - - + + 496 128 Y - - + copyHtmlFiles JobExecutor @@ -570,14 +536,22 @@ filename - ${Internal.Transformation.Filename.Directory}/copyFiles.kjb + ${Internal.Transformation.Filename.Directory}/copyFiles.kjb 1 - fromfrom - toto + + from + from + + + + to + to + + Y @@ -600,18 +574,15 @@ FileName - - - - + + 832 144 Y - - + copyImages JobExecutor @@ -626,14 +597,22 @@ filename - ${Internal.Transformation.Filename.Directory}/copyFiles.kjb + ${Internal.Transformation.Filename.Directory}/copyFiles.kjb 1 - fromfrom_images - toto + + from + from_images + + + + to + to + + Y @@ -656,18 +635,15 @@ FileName - - - - + + 144 256 Y - - + copyLayoutElements JobExecutor @@ -682,14 +658,22 @@ filename - ${Internal.Transformation.Filename.Directory}/copyFiles.kjb + ${Internal.Transformation.Filename.Directory}/copyFiles.kjb 1 - fromfrom_layoutelements - toto + + from + from_layoutelements + + + + to + to + + Y @@ -712,18 +696,15 @@ FileName - - - - + + 304 240 Y - - + getOutputProjectDetails TableInput @@ -736,7 +717,26 @@ eduetl - select D.id,D.defaulttext as document_defaulttext, O.id, R.content as webinfdir, O.document_root, O.target_path, O.homepage, substring(('${Internal.Transformation.Filename.Directory}/tmp/files_' || D.id || '/f_' || (select C.chapter_filename from kb_chapter C where C.document_id=D.id and C.sortnr=0)|| '.htm' ) from 8 for 255) as from_firstchapter_filename, L.embedded_files_path, substring(('${Internal.Transformation.Filename.Directory}/tmp/files_' || D.id) from 8 for 255) as from, '${Internal.Transformation.Filename.Directory}/' || L.embedded_files_path as from_layoutelements, R.content || '/../' || O.document_root || '/' || O.target_path as to, substring(('${Internal.Transformation.Filename.Directory}/tmp/files_' || D.id || '/' || O.homepage ) from 8 for 255) as to_firstchapter_filename, substring(('${Internal.Transformation.Filename.Directory}/../wiki2html/tmp/files_' || D.id) from 8 for 255) as from_images from sx_repository R, kb_document D, kb_output_project O, kb_output_project_part P, kb_output_project_layout L where R.id='WEBINFDIR' and D.id=P.src_document_id and O.id=P.output_project_id and L.id=O.kb_output_project_layout_id and D.id=${document_id} + select D.id,D.defaulttext as document_defaulttext, +O.id, +R.content as webinfdir, +O.document_root, +O.target_path, +O.homepage, +substring(('${Internal.Transformation.Filename.Directory}/tmp/files_' || D.id || '/f_' || (select C.chapter_filename from kb_chapter C where C.document_id=D.id and C.sortnr=0)|| '.htm' ) from 8 for 255) + as from_firstchapter_filename, +L.embedded_files_path, +substring(('${Internal.Transformation.Filename.Directory}/tmp/files_' || D.id) from 8 for 255) as from, +'${Internal.Transformation.Filename.Directory}/' || L.embedded_files_path as from_layoutelements, +R.content || '/../' || O.document_root || '/' || O.target_path as to, +substring(('${Internal.Transformation.Filename.Directory}/tmp/files_' || D.id || '/' || O.homepage ) from 8 for 255) as to_firstchapter_filename, +substring(('${Internal.Transformation.Filename.Directory}/../wiki2html/tmp/files_' || D.id) from 8 for 255) as from_images +from sx_repository R, kb_document D, kb_output_project O, kb_output_project_part P, kb_output_project_layout L +where R.id='WEBINFDIR' +and D.id=P.src_document_id +and O.id=P.output_project_id +and L.id=O.kb_output_project_layout_id +and D.id=${document_id} 0 N @@ -744,18 +744,15 @@ N - - - - + + 160 96 Y - - + writeHomepage TextFileOutput @@ -814,21 +811,16 @@ - - - - + + 672 144 Y - - - - - - + + + N diff --git a/src-modules/module/kb/etl/xml2html/replaceBody.ktr b/src-modules/module/kb/etl/xml2html/replaceBody.ktr index d3d1a86..8305fc6 100644 --- a/src-modules/module/kb/etl/xml2html/replaceBody.ktr +++ b/src-modules/module/kb/etl/xml2html/replaceBody.ktr @@ -1,5 +1,4 @@ - - + replaceBody @@ -7,7 +6,7 @@ Normal 0 - / + / document_id @@ -429,47 +428,18 @@ N 1000 100 - - - - - - - - + + + + - - 2018/01/19 19:23:22.741 + 2018/01/19 19:23:22.741 - - 2018/01/19 19:23:22.741 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= + 2018/01/19 19:23:22.741 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= N - - - - eduetl - localhost - POSTGRESQL - Native - community - 9998 - superx - Encrypted 2be98afc86aa7f292a20aa77fd0c3fa9e - superx_host_iso - - - - FORCE_IDENTIFIERS_TO_LOWERCASEN - FORCE_IDENTIFIERS_TO_UPPERCASEN - IS_CLUSTEREDN - PORT_NUMBER9998 - PRESERVE_RESERVED_WORD_CASEY - QUOTE_ALL_FIELDSN - SUPPORTS_BOOLEAN_DATA_TYPEY - SUPPORTS_TIMESTAMP_DATA_TYPEY - USE_POOLINGN - - + getChapters @@ -520,8 +490,7 @@ N - - + File content @@ -535,7 +504,7 @@ -1 none N - + File size size @@ -548,8 +517,8 @@ -1 none N - - + + 0 Y sourceFileName @@ -562,18 +531,15 @@ - - - - + + 224 80 Y - - + ReplaceBody ReplaceString @@ -590,7 +556,7 @@ File content file_content_replaced no - #body# + #body# N body @@ -600,18 +566,15 @@ - - - - + + 400 224 Y - - + ReplacePdfFile ReplaceString @@ -628,7 +591,7 @@ file_content_replaced2 file_content_replaced3 no - #pdf_file# + #pdf_file# N pdf_file @@ -638,18 +601,15 @@ - - - - + + 688 80 Y - - + ReplaceTargetPath ReplaceString @@ -666,7 +626,7 @@ file_content_replaced file_content_replaced2 no - #targetpath# + #targetpath# N target_path @@ -676,18 +636,15 @@ - - - - + + 672 224 Y - - + Text file output TextFileOutput @@ -746,18 +703,15 @@ - - - - + + 928 80 Y - - + getChapters TableInput @@ -770,7 +724,18 @@ eduetl - select C.id as chapter_tid,D.id as document_id,'${Internal.Transformation.Filename.Directory}/tmp/files_${document_id}/f_' || C.chapter_filename || '.htm' as "sourceFileName", '${Internal.Transformation.Filename.Directory}/tmp/files_${document_id}/f_' || C.chapter_filename || '.htm' as "targetFileName", '#body' || C.id || '#' as body_marker, replace(C.chapter_bodytext,'$','&#36;') as body, --Dollar Zeichen wird maskiert damit Kettle das nicht als Variable interpretiert (select P.target_server || '/' || P.document_root || '/' || P.target_path from kb_output_project P, kb_output_project_part A where P.id=A.output_project_id and A.src_document_id=${document_id}) as target_path, (select '<a href="' || P.pdf_file || '">PDF</a>' from kb_output_project P, kb_output_project_part A where P.id=A.output_project_id and A.src_document_id=${document_id}) as pdf_file, coalesce((select '${Internal.Transformation.Filename.Directory}/' || L.embedded_files_path || '/mwTemplates.xsl' from kb_output_project_layout L, kb_output_project P, kb_output_project_part A where P.id=A.output_project_id and A.src_document_id=${document_id} and P.kb_output_project_layout_id=L.id),'${Internal.Transformation.Filename.Directory}/mwTemplates.xsl') as mwtemplates from kb_chapter C, kb_document D where D.id=C.document_id and D.id=${document_id} order by sortnr; + select C.id as chapter_tid,D.id as document_id,'${Internal.Transformation.Filename.Directory}/tmp/files_${document_id}/f_' || C.chapter_filename || '.htm' as "sourceFileName", +'${Internal.Transformation.Filename.Directory}/tmp/files_${document_id}/f_' || C.chapter_filename || '.htm' as "targetFileName", +'#body' || C.id || '#' as body_marker, +replace(C.chapter_bodytext,'$','&#36;') as body, --Dollar Zeichen wird maskiert damit Kettle das nicht als Variable interpretiert +(select P.target_server || '/' || P.document_root || '/' || P.target_path from kb_output_project P, kb_output_project_part A where P.id=A.output_project_id and A.src_document_id=${document_id}) as target_path, +(select '<a href="' || P.pdf_file || '">PDF</a>' from kb_output_project P, kb_output_project_part A where P.id=A.output_project_id and A.src_document_id=${document_id}) as pdf_file, +coalesce((select '${Internal.Transformation.Filename.Directory}/' || L.embedded_files_path || '/mwTemplates.xsl' from kb_output_project_layout L, kb_output_project P, kb_output_project_part A where P.id=A.output_project_id and A.src_document_id=${document_id} +and P.kb_output_project_layout_id=L.id),'${Internal.Transformation.Filename.Directory}/mwTemplates.xsl') as mwtemplates +from kb_chapter C, kb_document D +where D.id=C.document_id +and D.id=${document_id} +order by sortnr; 0 N @@ -778,18 +743,15 @@ N - - - - + + 64 80 Y - - + processTemplates UserDefinedJavaClass @@ -801,14 +763,11 @@ none - - + TRANSFORM_CLASS - Processor - - import java.io.File; import java.io.IOException; import java.io.InputStreamReader; @@ -838,7 +797,7 @@ String body=get(Fields.In, "body").getString(r); String mwTemplateContent=""; -int cursor=body.indexOf("<"+mwTemplateElem); +int cursor=body.indexOf("<"+mwTemplateElem); if(cursor==-1) { //do nothing @@ -848,14 +807,14 @@ putRow(data.outputRowMeta, outputRow); return true; } -while (cursor>-1) { +while (cursor>-1) { String body_vorher=body.substring(0,cursor); -int endTag=body.indexOf(""); -if(endTag >-1) +int endTag=body.indexOf("</"+mwTemplateElem+">"); +if(endTag >-1) { System.out.println("body_vorher:"+body_vorher); -mwTemplateContent=body.substring(cursor,endTag+mwTemplateElem.length()+3).replaceAll("&","&"); +mwTemplateContent=body.substring(cursor,endTag+mwTemplateElem.length()+3).replaceAll("&","&amp;"); System.out.println("mwTemplateContent:"+mwTemplateContent); String body_nachher=body.substring(endTag+mwTemplateElem.length()+3,body.length()); @@ -869,7 +828,7 @@ else { body=body_vorher+body.substring(cursor+mwTemplateElem.length()+2,body.length()); } -cursor=body.indexOf("<"+mwTemplateElem); +cursor=body.indexOf("<"+mwTemplateElem); } Object[] outputRow = createOutputRow(r, data.outputRowMeta.size()); @@ -898,28 +857,26 @@ public static String xsltTransform(String inXml, String xslFile) result=xmlOutWriter.toString(); return result; - }// Ende der Methode]]> - + }// Ende der Methode + - - N - + + N + + + + - - - - + + 400 80 Y - - - - - - + + + N diff --git a/src-modules/module/kb/etl/xml2html/writeDocumentHtml.ktr b/src-modules/module/kb/etl/xml2html/writeDocumentHtml.ktr new file mode 100644 index 0000000..09d0c88 --- /dev/null +++ b/src-modules/module/kb/etl/xml2html/writeDocumentHtml.ktr @@ -0,0 +1,547 @@ + + + writeDocumentHtml + + + + Normal + 0 + / + + + document_id + 243 + + + + + + + + + + + + + ID_BATCH + Y + ID_BATCH + + + CHANNEL_ID + Y + CHANNEL_ID + + + TRANSNAME + Y + TRANSNAME + + + STATUS + Y + STATUS + + + LINES_READ + Y + LINES_READ + + + + LINES_WRITTEN + Y + LINES_WRITTEN + + + + LINES_UPDATED + Y + LINES_UPDATED + + + + LINES_INPUT + Y + LINES_INPUT + + + + LINES_OUTPUT + Y + LINES_OUTPUT + + + + LINES_REJECTED + Y + LINES_REJECTED + + + + ERRORS + Y + ERRORS + + + STARTDATE + Y + STARTDATE + + + ENDDATE + Y + ENDDATE + + + LOGDATE + Y + LOGDATE + + + DEPDATE + Y + DEPDATE + + + REPLAYDATE + Y + REPLAYDATE + + + LOG_FIELD + Y + LOG_FIELD + + + EXECUTING_SERVER + N + EXECUTING_SERVER + + + EXECUTING_USER + N + EXECUTING_USER + + + CLIENT + N + CLIENT + + + + + +
+ + + + ID_BATCH + Y + ID_BATCH + + + SEQ_NR + Y + SEQ_NR + + + LOGDATE + Y + LOGDATE + + + TRANSNAME + Y + TRANSNAME + + + STEPNAME + Y + STEPNAME + + + STEP_COPY + Y + STEP_COPY + + + LINES_READ + Y + LINES_READ + + + LINES_WRITTEN + Y + LINES_WRITTEN + + + LINES_UPDATED + Y + LINES_UPDATED + + + LINES_INPUT + Y + LINES_INPUT + + + LINES_OUTPUT + Y + LINES_OUTPUT + + + LINES_REJECTED + Y + LINES_REJECTED + + + ERRORS + Y + ERRORS + + + INPUT_BUFFER_ROWS + Y + INPUT_BUFFER_ROWS + + + OUTPUT_BUFFER_ROWS + Y + OUTPUT_BUFFER_ROWS + + + + + +
+ + + ID_BATCH + Y + ID_BATCH + + + CHANNEL_ID + Y + CHANNEL_ID + + + LOG_DATE + Y + LOG_DATE + + + LOGGING_OBJECT_TYPE + Y + LOGGING_OBJECT_TYPE + + + OBJECT_NAME + Y + OBJECT_NAME + + + OBJECT_COPY + Y + OBJECT_COPY + + + REPOSITORY_DIRECTORY + Y + REPOSITORY_DIRECTORY + + + FILENAME + Y + FILENAME + + + OBJECT_ID + Y + OBJECT_ID + + + OBJECT_REVISION + Y + OBJECT_REVISION + + + PARENT_CHANNEL_ID + Y + PARENT_CHANNEL_ID + + + ROOT_CHANNEL_ID + Y + ROOT_CHANNEL_ID + + + + + +
+ + + ID_BATCH + Y + ID_BATCH + + + CHANNEL_ID + Y + CHANNEL_ID + + + LOG_DATE + Y + LOG_DATE + + + TRANSNAME + Y + TRANSNAME + + + STEPNAME + Y + STEPNAME + + + STEP_COPY + Y + STEP_COPY + + + LINES_READ + Y + LINES_READ + + + LINES_WRITTEN + Y + LINES_WRITTEN + + + LINES_UPDATED + Y + LINES_UPDATED + + + LINES_INPUT + Y + LINES_INPUT + + + LINES_OUTPUT + Y + LINES_OUTPUT + + + LINES_REJECTED + Y + LINES_REJECTED + + + ERRORS + Y + ERRORS + + + LOG_FIELD + N + LOG_FIELD + + + + + +
+ + + ID_BATCH + Y + ID_BATCH + + + CHANNEL_ID + Y + CHANNEL_ID + + + LOG_DATE + Y + LOG_DATE + + + METRICS_DATE + Y + METRICS_DATE + + + METRICS_CODE + Y + METRICS_CODE + + + METRICS_DESCRIPTION + Y + METRICS_DESCRIPTION + + + METRICS_SUBJECT + Y + METRICS_SUBJECT + + + METRICS_TYPE + Y + METRICS_TYPE + + + METRICS_VALUE + Y + METRICS_VALUE + + + + + +
+ + 0.0 + 0.0 + + 10000 + 50 + 50 + N + Y + 50000 + Y + + N + 1000 + 100 + + + + + - + 2018/01/03 21:21:10.720 + - + 2018/01/03 21:21:10.720 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + getDocument + Text file output + Y + + + + getDocument + TableInput + + Y + + 1 + + none + + + eduetl + select '<html><head><title>' ||D.defaulttext || '</title><LINK REL="stylesheet" type="text/css" href="superx.css"></LINK><meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body><h1>' ||D.defaulttext || '</h1>' || D.content_xhtml || '</body></html>' as content_xhtml +from kb_document D +where D.id=${document_id} +; + 0 + + N + Y + N + + + + + + + 112 + 64 + Y + + + + Text file output + TextFileOutput + + Y + + 1 + + none + + + + TEST + N + N +
N
+
N
+ UNIX + None + UTF-8 + + N + + Y + + ${Internal.Transformation.Filename.Directory}/tmp/files_${document_id}/__index + N + N + N + htm + N + N + N + N + N + N + + Y + N + N + 0 + + + + content_xhtml + String + + + + + + none + -1 + -1 + + + + + + + + + 112 + 192 + Y + +
+ + + N + diff --git a/src-modules/module/kb/etl/xml2html/writePrintVersion.ktr b/src-modules/module/kb/etl/xml2html/writePrintVersion.ktr index a286704..1a20f1d 100644 --- a/src-modules/module/kb/etl/xml2html/writePrintVersion.ktr +++ b/src-modules/module/kb/etl/xml2html/writePrintVersion.ktr @@ -1,5 +1,4 @@ - - + writeDocumentHtml @@ -7,7 +6,7 @@ Normal 0 - / + / document_id @@ -424,47 +423,18 @@ N 1000 100 - - - - - - - - + + + + - - 2018/01/03 21:21:10.720 + 2018/01/03 21:21:10.720 - - 2018/01/03 21:21:10.720 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= + 2018/01/03 21:21:10.720 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= N - - - - eduetl - localhost - POSTGRESQL - Native - community - 9998 - superx - Encrypted 2be98afc86aa7f2e4be0b8b49fca3e2f0 - superx_host_iso - - - - FORCE_IDENTIFIERS_TO_LOWERCASEN - FORCE_IDENTIFIERS_TO_UPPERCASEN - IS_CLUSTEREDN - PORT_NUMBER9998 - PRESERVE_RESERVED_WORD_CASEY - QUOTE_ALL_FIELDSN - SUPPORTS_BOOLEAN_DATA_TYPEY - SUPPORTS_TIMESTAMP_DATA_TYPEY - USE_POOLINGN - - + getDocument @@ -493,8 +463,8 @@ none - ${line.separator} - + ${line.separator} + N N
N
@@ -507,7 +477,7 @@ Y - ${Internal.Transformation.Filename.Directory}/tmp/files_${document_id}/__index + ${Internal.Transformation.Filename.Directory}/tmp/files_${document_id}/__index N N N @@ -564,18 +534,15 @@ - - - - + + 208 288 Y - - + getDocument TableInput @@ -588,7 +555,11 @@ eduetl - select '<html><head><title>' ||D.defaulttext || '</title><LINK REL="stylesheet" type="text/css" href="superx.css"></LINK><meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body>' as prefix, '</body></html>' as suffix from kb_document D where D.id=${document_id} ; + select '<html><head><title>' ||D.defaulttext || '</title><LINK REL="stylesheet" type="text/css" href="superx.css"></LINK><meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body>' as prefix, +'</body></html>' as suffix +from kb_document D +where D.id=${document_id} +; 0 N @@ -596,18 +567,15 @@ N - - - - + + 112 64 Y - - + Merge Join MergeJoin @@ -619,27 +587,22 @@ none -LEFT OUTER -getDocument -Load file content in memory - - - - + LEFT OUTER + getDocument + Load file content in memory + + - - - - + + 208 144 Y - - + Load file content in memory LoadFileInput @@ -659,12 +622,12 @@ UTF-8 - ${Internal.Transformation.Filename.Directory}/tmp_index_content.htm + ${Internal.Transformation.Filename.Directory}/tmp_index_content.htm N N - + index_content @@ -678,8 +641,8 @@ -1 none N - - +
+ 0N @@ -692,21 +655,16 @@ - - - - + + 336 64 Y - - - - - - + + + N diff --git a/src-modules/module/kb/etl/xml2html/xml2html.kjb b/src-modules/module/kb/etl/xml2html/xml2html.kjb index 1022540..d4acb75 100644 --- a/src-modules/module/kb/etl/xml2html/xml2html.kjb +++ b/src-modules/module/kb/etl/xml2html/xml2html.kjb @@ -1,302 +1,300 @@ - - + xml2html 0 - / + / - - 2018/01/03 09:48:55.241 + 2018/01/03 09:48:55.241 - - 2018/01/03 09:48:55.241 - - - document_id - 46 - - - - - - - - -
- - - - - ID_JOB - Y - ID_JOB - - - CHANNEL_ID - Y - CHANNEL_ID - - - JOBNAME - Y - JOBNAME - - - STATUS - Y - STATUS - - - LINES_READ - Y - LINES_READ - - - LINES_WRITTEN - Y - LINES_WRITTEN - - - LINES_UPDATED - Y - LINES_UPDATED - - - LINES_INPUT - Y - LINES_INPUT - - - LINES_OUTPUT - Y - LINES_OUTPUT - - - LINES_REJECTED - Y - LINES_REJECTED - - - ERRORS - Y - ERRORS - - - STARTDATE - Y - STARTDATE - - - ENDDATE - Y - ENDDATE - - - LOGDATE - Y - LOGDATE - - - DEPDATE - Y - DEPDATE - - - REPLAYDATE - Y - REPLAYDATE - - - LOG_FIELD - Y - LOG_FIELD - - - EXECUTING_SERVER - N - EXECUTING_SERVER - - - EXECUTING_USER - N - EXECUTING_USER - - - START_JOB_ENTRY - N - START_JOB_ENTRY - - - CLIENT - N - CLIENT - - - - - -
- - - ID_BATCH - Y - ID_BATCH - - - CHANNEL_ID - Y - CHANNEL_ID - - - LOG_DATE - Y - LOG_DATE - - - JOBNAME - Y - TRANSNAME - - - JOBENTRYNAME - Y - STEPNAME - - - LINES_READ - Y - LINES_READ - - - LINES_WRITTEN - Y - LINES_WRITTEN - - - LINES_UPDATED - Y - LINES_UPDATED - - - LINES_INPUT - Y - LINES_INPUT - - - LINES_OUTPUT - Y - LINES_OUTPUT - - - LINES_REJECTED - Y - LINES_REJECTED - - - ERRORS - Y - ERRORS - - - RESULT - Y - RESULT - - - NR_RESULT_ROWS - Y - NR_RESULT_ROWS - - - NR_RESULT_FILES - Y - NR_RESULT_FILES - - - LOG_FIELD - N - LOG_FIELD - - - COPY_NR - N - COPY_NR - - - - - -
- - - ID_BATCH - Y - ID_BATCH - - - CHANNEL_ID - Y - CHANNEL_ID - - - LOG_DATE - Y - LOG_DATE - - - LOGGING_OBJECT_TYPE - Y - LOGGING_OBJECT_TYPE - - - OBJECT_NAME - Y - OBJECT_NAME - - - OBJECT_COPY - Y - OBJECT_COPY - - - REPOSITORY_DIRECTORY - Y - REPOSITORY_DIRECTORY - - - FILENAME - Y - FILENAME - - - OBJECT_ID - Y - OBJECT_ID - - - OBJECT_REVISION - Y - OBJECT_REVISION - - - PARENT_CHANNEL_ID - Y - PARENT_CHANNEL_ID - - - ROOT_CHANNEL_ID - Y - ROOT_CHANNEL_ID - - - N - + 2018/01/03 09:48:55.241 + + + document_id + 46 + + + + + + + +
+ + + + + ID_JOB + Y + ID_JOB + + + CHANNEL_ID + Y + CHANNEL_ID + + + JOBNAME + Y + JOBNAME + + + STATUS + Y + STATUS + + + LINES_READ + Y + LINES_READ + + + LINES_WRITTEN + Y + LINES_WRITTEN + + + LINES_UPDATED + Y + LINES_UPDATED + + + LINES_INPUT + Y + LINES_INPUT + + + LINES_OUTPUT + Y + LINES_OUTPUT + + + LINES_REJECTED + Y + LINES_REJECTED + + + ERRORS + Y + ERRORS + + + STARTDATE + Y + STARTDATE + + + ENDDATE + Y + ENDDATE + + + LOGDATE + Y + LOGDATE + + + DEPDATE + Y + DEPDATE + + + REPLAYDATE + Y + REPLAYDATE + + + LOG_FIELD + Y + LOG_FIELD + + + EXECUTING_SERVER + N + EXECUTING_SERVER + + + EXECUTING_USER + N + EXECUTING_USER + + + START_JOB_ENTRY + N + START_JOB_ENTRY + + + CLIENT + N + CLIENT + + + + + +
+ + + ID_BATCH + Y + ID_BATCH + + + CHANNEL_ID + Y + CHANNEL_ID + + + LOG_DATE + Y + LOG_DATE + + + JOBNAME + Y + TRANSNAME + + + JOBENTRYNAME + Y + STEPNAME + + + LINES_READ + Y + LINES_READ + + + LINES_WRITTEN + Y + LINES_WRITTEN + + + LINES_UPDATED + Y + LINES_UPDATED + + + LINES_INPUT + Y + LINES_INPUT + + + LINES_OUTPUT + Y + LINES_OUTPUT + + + LINES_REJECTED + Y + LINES_REJECTED + + + ERRORS + Y + ERRORS + + + RESULT + Y + RESULT + + + NR_RESULT_ROWS + Y + NR_RESULT_ROWS + + + NR_RESULT_FILES + Y + NR_RESULT_FILES + + + LOG_FIELD + N + LOG_FIELD + + + COPY_NR + N + COPY_NR + + + + + +
+ + + ID_BATCH + Y + ID_BATCH + + + CHANNEL_ID + Y + CHANNEL_ID + + + LOG_DATE + Y + LOG_DATE + + + LOGGING_OBJECT_TYPE + Y + LOGGING_OBJECT_TYPE + + + OBJECT_NAME + Y + OBJECT_NAME + + + OBJECT_COPY + Y + OBJECT_COPY + + + REPOSITORY_DIRECTORY + Y + REPOSITORY_DIRECTORY + + + FILENAME + Y + FILENAME + + + OBJECT_ID + Y + OBJECT_ID + + + OBJECT_REVISION + Y + OBJECT_REVISION + + + PARENT_CHANNEL_ID + Y + PARENT_CHANNEL_ID + + + ROOT_CHANNEL_ID + Y + ROOT_CHANNEL_ID + + + N + CreateTmpfolder CREATE_FOLDER - ${Internal.Job.Filename.Directory}/tmp + ${Internal.Job.Filename.Directory}/tmp N N Y @@ -328,7 +326,7 @@ CreateResultFolder CREATE_FOLDER - ${Internal.Job.Filename.Directory}/tmp/files_${document_id} + ${Internal.Job.Filename.Directory}/tmp/files_${document_id} N N Y @@ -342,7 +340,7 @@ TRANS filename - ${Internal.Job.Filename.Directory}/writeChapters.ktr + ${Internal.Job.Filename.Directory}/writeChapters.ktr N N @@ -375,8 +373,8 @@ transformChaptersToHtml SHELL - ${Internal.Job.Filename.Directory}/transformChapters.x - ${Internal.Job.Filename.Directory} + ${Internal.Job.Filename.Directory}/transformChapters.x + ${Internal.Job.Filename.Directory} N N N @@ -388,9 +386,9 @@ N + + + + +<% +//HttpSession session=request.getSession(true); +if (request.getCharacterEncoding() == null) + request.setCharacterEncoding("UTF-8"); +Object userobject=request.getSession().getAttribute("UserID"); +String userid; +String filter=""; +String sql=""; +String href=""; +String id=""; +if(userobject == null) +{ +%> + + +<% +} +else + userid=userobject.toString(); +Object mandantobject=request.getSession().getAttribute("MandantenID"); +String mandantenid=""; +if(mandantobject != null) + mandantenid=mandantobject.toString(); +//der superx-Default-Mandant ist bei dbforms ein Leerstring +if(mandantenid.equals("default")) + mandantenid=""; +String db_form_name="kb_chunk"; +String erlaubt="0"; +%> +<%@ include file="/edit/check_authentication.inc" %> +<% +if(erlaubt.equals("0")) +{ +%> + + +<% +} + +String keyfieldsused="false"; +Object kf=request.getParameter("keyfieldsused"); +if(kf != null) +keyfieldsused=kf.toString(); + + + +String sachgebiete_id = request.getParameter("sachgebiete_id"); +if(sachgebiete_id != null && !sachgebiete_id.equals("null")){ + filter +="sachgebiete_id="+sachgebiete_id; +} +%> + +<% +String systeminfo_id = request.getParameter("systeminfo_id"); +if(systeminfo_id != null && !systeminfo_id.equals("null")){ + filter +=",systeminfo_id="+systeminfo_id; +} +%> + +<% +String topic_id = request.getParameter("topic_id"); +if(topic_id != null && !topic_id.equals("null")){ + filter +=",topic_id="+topic_id; +} + +String rs = request.getParameter("rs"); +if(rs != null && !rs.equals("null")){ + filter ="id="+ de.superx.bin.SxDBUtils.replaceString(rs,",",",|id="); +} +String submission_type = request.getParameter("submission_type"); + +%> +<%@ page import ="java.util.Hashtable" %> + + + + +
+ +
+
    + + + +
  1. +<% +if(currentRow_kb_chunk != null && currentRow_kb_chunk.get("id").toString() != null) +{ +id=currentRow_kb_chunk.get("id").toString(); +href=response.encodeURL("/superx/edit/kb/kb_chunk_view.jsp?id="+id+"&submission_type="+submission_type+"&docroot=http://www.superx-projekt.de/doku"); +out.println(""+currentRow_kb_chunk.get("defaulttext").toString()+""); +} +%> +
  2. +
    +
+ + diff --git a/superx/edit/kb/kb_chunk_view_public_list.jsp b/superx/edit/kb/kb_chunk_view_public_list.jsp new file mode 100644 index 0000000..cebbf92 --- /dev/null +++ b/superx/edit/kb/kb_chunk_view_public_list.jsp @@ -0,0 +1,230 @@ +<%@ taglib uri="/WEB-INF/dbforms.tld" prefix="db" %> +<%@ page import ="de.superx.util.*" %> +<%@ page import ="java.io.*, javax.script.*" %> +<%@ page import ="org.dbforms.config.DbFormsConfigRegistry,java.sql.Connection,java.sql.Statement,java.sql.ResultSet" %> + +<%@page pageEncoding="utf-8" contentType="text/html; charset=UTF-8" %> + + + + + + + +Formular Meldungen + + + + + +<% +//HttpSession session=request.getSession(true); +if (request.getCharacterEncoding() == null) + request.setCharacterEncoding("UTF-8"); + +Object mandantobject=request.getSession().getAttribute("MandantenID"); +String mandantenid=""; +if(mandantobject != null) + mandantenid=mandantobject.toString(); +//der superx-Default-Mandant ist bei dbforms ein Leerstring +if(mandantenid.equals("default")) + mandantenid=""; +String db_form_name="kb_chunk"; +String erlaubt="0"; +String filter=""; +String id=""; +String href=""; +String info_text=""; +String info_text_html=""; +String paragraph=""; +int maxlength=300; +int counter=0; +String keyfieldsused="false"; +Object kf=request.getParameter("keyfieldsused"); +if(kf != null) +keyfieldsused=kf.toString(); + + + +String sachgebiete_id = request.getParameter("sachgebiete_id"); +if(sachgebiete_id != null && !sachgebiete_id.equals("null") && SqlStringUtils.checkValidKeyEntry(sachgebiete_id)){ + filter +=",sachgebiete_id="+sachgebiete_id; +} +%> + +<% +String systeminfo_id = request.getParameter("systeminfo_id"); +if(systeminfo_id != null && !systeminfo_id.equals("null") && SqlStringUtils.checkValidKeyEntry(systeminfo_id)){ + filter +=",systeminfo_id="+systeminfo_id; +} +%> + +<% +String topic_id = request.getParameter("topic_id"); +if(topic_id == null || topic_id.equals("null")){ + topic_id=""; +} +String searchphrase = request.getParameter("searchphrase"); +if(searchphrase != null && !searchphrase.equals("null") && SqlStringUtils.checkValidKeyEntry(searchphrase)){ + filter +=",defaulttext~%"+searchphrase+"%"; + filter +=",|info_text~%"+searchphrase+"%"; + //filter +=",defaulttext="+searchphrase+""; +} +else + searchphrase=""; + +String submission_type_filter = "submission_type=1";//request.getParameter("submission_type"); +String topic_str=""; +String topic_str_sub=""; +String topic_filter=""; +String webinfdir=getServletContext().getRealPath("/")+"WEB-INF"; +String moduleDir=webinfdir+"/conf/edustore/db/module"; +if(System.getProperty("MODULE_PFAD") != null + && !System.getProperty("MODULE_PFAD").toString().equals("")) + moduleDir=System.getProperty("MODULE_PFAD").toString(); + +%> + +<%@ include file="/edit/kb/kb_head.inc" %> +<% +//Daten aus Datenbank werden in Variablen gespeichert +if(topic_id != null && !topic_id.equals("")&& SqlStringUtils.checkValidKeyEntry(topic_id)){ +Connection conmm=null; +//out.println("Getting Connection for mandantenid="+mandantenid); +try { + +conmm = DbFormsConfigRegistry.instance().lookup().getConnection(mandantenid); +//System.out.println("Got Connection"); +Statement st; + +st=conmm.createStatement(); + +ResultSet rs; + +rs = st.executeQuery("select defaulttext,longtext from kb_keyword where id="+topic_id); +while (rs.next()) +{ +if(rs.getObject(1) !=null) + topic_str=rs.getObject(1).toString(); +if(rs.getObject(2) !=null) + topic_str_sub=rs.getObject(2).toString(); +} +rs.close(); + +rs = st.executeQuery("select kb_chunk_id from kb_chunk2keyword where kb_keyword_id="+topic_id); +while (rs.next()) +{ if(rs.getObject(1) !=null) + topic_filter+=rs.getObject(1).toString()+","; +} +rs.close(); + + +st.close(); + +conmm.close(); + +} //Check DB connection +catch (Exception e) { +out.print("Fehler bei Datenverbindung: "+e+ " MandantID"+mandantenid); +} + +if(topic_filter != null && !topic_filter.equals("")){ + topic_filter =",id="+ de.superx.bin.SxDBUtils.replaceString(topic_filter,",",",|id="); +} + +} + +%> +

FAQ <%= topic_str %>

+

<%= topic_str_sub %>

+ + + + + + + + + + +<% +counter++; +%> + + + +
Filtern:
<%= counter %> + +" style="cursor: pointer;color:blue;" title="Details...">
+<% +if(currentRow_kb_chunk != null && currentRow_kb_chunk.get("id").toString() != null) +{ +id=currentRow_kb_chunk.get("id").toString(); +info_text=currentRow_kb_chunk.get("info_text").toString(); +href=response.encodeURL("/superx/edit/kb/kb_chunk_view_detail.jsp?id="+id+"&submission_type=problem&docroot=http://www.superx-projekt.de/doku"); + +//out.println("" +currentRow_kb_chunk.get("defaulttext").toString()+""); +} +// create a script engine manager +ScriptEngineManager factory = new ScriptEngineManager(); +// create a JavaScript engine +ScriptEngine engine = factory.getEngineByName("JavaScript"); +engine.eval(new FileReader(moduleDir+"/kb/etl/wiki2html/mwtools.js")); +Invocable inv = (Invocable) engine; +// invoke the function +info_text_html= (String) inv.invokeFunction("mw2xhtml", info_text ); +out.println("
"+info_text_html); +%> + + +<% +if(currentRow_kb_chunk2relation != null +&& currentRow_kb_chunk2relation.get("kb_chunk_id_to") != null +&& currentRow_kb_chunk2relation.get("kb_chunk_id_to").toString() != null +) +{ +href=response.encodeURL("/superx/edit/kb/kb_chunk_view_detail.jsp?id="+currentRow_kb_chunk2relation.get("kb_chunk_id_to").toString()+"&submission_type=loesung&docroot=http://www.superx-projekt.de/doku"); +out.println("

Antwort...

"); +} +%> +
+
+
+
+
+ +<%@ include file="/edit/kb/kb_foot.inc" %> + + +