[ofbiz-framework] branch trunk updated: Improved: Remove Compdoc functionality from content manager (OFBIZ-10476)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch trunk updated: Improved: Remove Compdoc functionality from content manager (OFBIZ-10476)

mbrohl
This is an automated email from the ASF dual-hosted git repository.

mbrohl pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 662a3f9  Improved: Remove Compdoc functionality from content manager (OFBIZ-10476)
662a3f9 is described below

commit 662a3f9d1c60fcf1d4787600129f9ae8e28b011b
Author: Michael Brohl <[hidden email]>
AuthorDate: Thu Feb 11 23:30:17 2021 +0100

    Improved: Remove Compdoc functionality from content manager
    (OFBIZ-10476)
---
 .../content/config/ContentEntityLabels.xml         |   42 -
 applications/content/config/ContentUiLabels.xml    |  453 +------
 .../content/minilang/compdoc/CompDocServices.xml   |  836 -------------
 applications/content/servicedef/services.xml       |  215 ----
 .../ofbiz/content/ContentManagementServices.java   |   66 -
 .../ofbiz/content/compdoc/CompDocEvents.java       |  243 ----
 .../ofbiz/content/compdoc/CompDocServices.java     |  377 ------
 .../content/webapp/content/WEB-INF/controller.xml  |  168 ---
 applications/content/widget/CommonScreens.xml      |   23 -
 applications/content/widget/SurveyScreens.xml      |   10 -
 .../content/widget/compdoc/CompDocForms.xml        |  597 ---------
 .../content/widget/compdoc/CompDocMenus.xml        |  276 -----
 .../content/widget/compdoc/CompDocScreens.xml      | 1264 --------------------
 .../content/widget/compdoc/CompDocTemplateTree.xml |  157 ---
 .../content/widget/content/ContentMenus.xml        |    2 -
 .../datamodel/data/demo/ContentDemoData.xml        |   93 --
 .../datamodel/data/seed/ContentSeedData.xml        |    4 -
 .../datamodel/entitydef/content-entitymodel.xml    |   92 --
 .../order/widget/ordermgr/CustRequestForms.xml     |    2 +-
 .../widget/partymgr/CommunicationEventForms.xml    |    2 +-
 .../product/widget/facility/FacilityForms.xml      |    2 +-
 framework/security/config/SecurityEntityLabels.xml |    7 -
 22 files changed, 4 insertions(+), 4927 deletions(-)

diff --git a/applications/content/config/ContentEntityLabels.xml b/applications/content/config/ContentEntityLabels.xml
index 3ddbd6b..2085983 100644
--- a/applications/content/config/ContentEntityLabels.xml
+++ b/applications/content/config/ContentEntityLabels.xml
@@ -216,20 +216,6 @@
         <value xml:lang="zh">作者</value>
         <value xml:lang="zh-TW">作者</value>
     </property>
-    <property key="ContentAssocType.description.COMPDOC_PART">
-        <value xml:lang="da">Sammensat dokumentdel</value>
-        <value xml:lang="de">Zusammengesetzter Dokumentteil</value>
-        <value xml:lang="en">Composite Document Part</value>
-        <value xml:lang="fr">Partie du document composé</value>
-        <value xml:lang="it">Parte Documento Composito</value>
-        <value xml:lang="ja">複合文書の一部</value>
-        <value xml:lang="pt">Parte do documento composto</value>
-        <value xml:lang="ro">Parte Document Compus</value>
-        <value xml:lang="th">ประกอบด้วยส่วนของเอกสาร</value>
-        <value xml:lang="vi">Tài liệu thành phần</value>
-        <value xml:lang="zh">合成文档部分</value>
-        <value xml:lang="zh-TW">複合檔部分</value>
-    </property>
     <property key="ContentAssocType.description.DEPARTMENT">
         <value xml:lang="da">Afdeling</value>
         <value xml:lang="de">Abteilung</value>
@@ -1130,34 +1116,6 @@
         <value xml:lang="zh">博客的根</value>
         <value xml:lang="zh-TW">部落格的頂層</value>
     </property>
-    <property key="ContentType.description.COMPDOC_INSTANCE">
-        <value xml:lang="da">Sammensat dokumentinstans</value>
-        <value xml:lang="de">Zusammengesetzte Dokumenteninstanz</value>
-        <value xml:lang="en">Composite Document Instance</value>
-        <value xml:lang="fr">Exemple de document composé</value>
-        <value xml:lang="it">Istanza Documento Composito</value>
-        <value xml:lang="ja">複合文書インスタンス</value>
-        <value xml:lang="pt">Instância de documento composto</value>
-        <value xml:lang="ro">Istanza Document Compus</value>
-        <value xml:lang="th">ตัวอย่างส่วนประกอบของเอกสาร</value>
-        <value xml:lang="vi">Khởi tạo tài liệu kết hợp</value>
-        <value xml:lang="zh">合成文档实例</value>
-        <value xml:lang="zh-TW">複合檔實例</value>
-    </property>
-    <property key="ContentType.description.COMPDOC_TEMPLATE">
-        <value xml:lang="da">Sammensat dokumentskabelon</value>
-        <value xml:lang="de">Zusammengesetzte Dokumentenvorlage</value>
-        <value xml:lang="en">Composite Document Template</value>
-        <value xml:lang="fr">Gabarit de document composé</value>
-        <value xml:lang="it">Template Documento Composito</value>
-        <value xml:lang="ja">複合文書テンプレート</value>
-        <value xml:lang="pt">Modelo de documento composto</value>
-        <value xml:lang="ro">Template Document Compus</value>
-        <value xml:lang="th">รูปแบบส่วนประกอบของเอกสาร</value>
-        <value xml:lang="vi">Biểu mẫu tài liệu kết hợp</value>
-        <value xml:lang="zh">合成文档模板</value>
-        <value xml:lang="zh-TW">複合檔模板</value>
-    </property>
     <property key="ContentType.description.CONTENT_LIST">
         <value xml:lang="da">Indholdsfortegnelse</value>
         <value xml:lang="de">Liste Inhalt</value>
diff --git a/applications/content/config/ContentUiLabels.xml b/applications/content/config/ContentUiLabels.xml
index a446f5b..03675ef 100644
--- a/applications/content/config/ContentUiLabels.xml
+++ b/applications/content/config/ContentUiLabels.xml
@@ -587,186 +587,7 @@
         <value xml:lang="zh">克隆版式</value>
         <value xml:lang="zh-TW">複製佈局</value>
     </property>
-    <property key="ContentCompDoc">
-        <value xml:lang="ar">Composite document</value>
-        <value xml:lang="da">Sammensat dokument</value>
-        <value xml:lang="de">Zusammengesetztes Dokument (CompDoc)</value>
-        <value xml:lang="en">CompDoc</value>
-        <value xml:lang="es">ComponerDoc</value>
-        <value xml:lang="fr">Document composite</value>
-        <value xml:lang="it">Composizione documenti</value>
-        <value xml:lang="ja">複合文書</value>
-        <value xml:lang="nl">Samengesteld document (CompDoc)</value>
-        <value xml:lang="pt">Documento composto (CompDoc)</value>
-        <value xml:lang="ro">CompDoc</value>
-        <value xml:lang="th">เอกสารคอมพิวเตอร์</value>
-        <value xml:lang="vi">Tài liệu kết hợp</value>
-        <value xml:lang="zh">合成文档</value>
-        <value xml:lang="zh-TW">複合檔</value>
-    </property>
-    <property key="ContentCompDocAddDocumentInstancePageForTemplate">
-        <value xml:lang="da">Tilføj sammensat dokument sideforekomst for skabelon</value>
-        <value xml:lang="en">Add Composite Document Instance Page for Template</value>
-        <value xml:lang="fr">Ajouter une page, instance de document composite pour modèle</value>
-        <value xml:lang="it">Aggiungi composizione documenti pagina istanza per template.</value>
-        <value xml:lang="ja">テンプレートに複合文書インスタンスページを追加</value>
-        <value xml:lang="nl">Toevoegen deel samengesteld document aan sjabloon.</value>
-        <value xml:lang="pt">Adicionar instância de página de documento composto para modelo</value>
-        <value xml:lang="vi">Thêm Trang khởi tạo Tài liệu kết hợp (Composite Document Instance Page) cho Biểu mẫu (Template)</value>
-        <value xml:lang="zh">为模板添加合成文档实例页面</value>
-        <value xml:lang="zh-TW">為模板增加複合檔實例頁面</value>
-    </property>
-    <property key="ContentCompDocAfter">
-        <value xml:lang="da">Agter</value>
-        <value xml:lang="en">+Aft</value>
-        <value xml:lang="fr">+Après</value>
-        <value xml:lang="it">+Dopo</value>
-        <value xml:lang="ja">+後</value>
-        <value xml:lang="nl">+Na</value>
-        <value xml:lang="pt">+Depois</value>
-        <value xml:lang="vi">+Sau</value>
-        <value xml:lang="zh">+之后</value>
-        <value xml:lang="zh-TW">+之後</value>
-    </property>
-    <property key="ContentCompDocApprovalStatus">
-        <value xml:lang="da">Status for godkendelse</value>
-        <value xml:lang="en">Approval Status</value>
-        <value xml:lang="fr">Statut de l'approbation</value>
-        <value xml:lang="it">Stato approvazione</value>
-        <value xml:lang="ja">承認ステータス</value>
-        <value xml:lang="pt">Status de aprovação</value>
-        <value xml:lang="vi">Trạng thái duyệt</value>
-        <value xml:lang="zh">审批状态</value>
-        <value xml:lang="zh-TW">審核狀態</value>
-    </property>
-    <property key="ContentCompDocApprovals">
-        <value xml:lang="da">Godkendelser</value>
-        <value xml:lang="de">Genehmigungen</value>
-        <value xml:lang="en">Approvals</value>
-        <value xml:lang="fr">Approbations</value>
-        <value xml:lang="it">Approvazioni</value>
-        <value xml:lang="ja">承認</value>
-        <value xml:lang="nl">Goedkeuringen</value>
-        <value xml:lang="pt">Aprovações</value>
-        <value xml:lang="th">อนุญาต</value>
-        <value xml:lang="vi">Duyệt</value>
-        <value xml:lang="zh">审批</value>
-        <value xml:lang="zh-TW">審核</value>
-    </property>
-    <property key="ContentCompDocApprovalsFor">
-        <value xml:lang="da">Godkendelse af indhold for</value>
-        <value xml:lang="de">Inhalt Genehmigungen für</value>
-        <value xml:lang="en">Content Approvals for</value>
-        <value xml:lang="fr">Approbations de contenu pour</value>
-        <value xml:lang="it">Approvazioni Contenuto</value>
-        <value xml:lang="ja">コンテンツの承認</value>
-        <value xml:lang="nl">Goedkeuringen content voor</value>
-        <value xml:lang="pt">Aprovações de Conteúdo para</value>
-        <value xml:lang="th">หัวข้อความคิดเห็นสำหรับ</value>
-        <value xml:lang="vi">Nội dung xét duyệt cho</value>
-        <value xml:lang="zh">内容审批:</value>
-        <value xml:lang="zh-TW">內容審核:</value>
-    </property>
-    <property key="ContentCompDocBefore">
-        <value xml:lang="da">Før</value>
-        <value xml:lang="en">+Bef</value>
-        <value xml:lang="fr">+Avant</value>
-        <value xml:lang="it">+Prima</value>
-        <value xml:lang="ja">+前</value>
-        <value xml:lang="nl">+Voor</value>
-        <value xml:lang="pt">+Antes</value>
-        <value xml:lang="vi">+Sau</value>
-        <value xml:lang="zh">+之前</value>
-        <value xml:lang="zh-TW">+之前</value>
-    </property>
-    <property key="ContentCompDocChild">
-        <value xml:lang="da">Barn</value>
-        <value xml:lang="en">+Child</value>
-        <value xml:lang="fr">+Enfant</value>
-        <value xml:lang="it">+Figlio</value>
-        <value xml:lang="ja">+下位(子)</value>
-        <value xml:lang="pt">+filho</value>
-        <value xml:lang="vi">+Thành phần</value>
-        <value xml:lang="zh">+下级</value>
-        <value xml:lang="zh-TW">+下層</value>
-    </property>
-    <property key="ContentCompDocContentRoleEditPage">
-        <value xml:lang="da">Indholdsrolle redigér side</value>
-        <value xml:lang="en">Content Role Edit Page</value>
-        <value xml:lang="fr">Page d'étition des rôles de contenu</value>
-        <value xml:lang="it">Pagina aggiornamento ruolo contenuto composizione documenti</value>
-        <value xml:lang="ja">コンテンツロール編集ページ</value>
-        <value xml:lang="pt">Página de edição de papel de conteúdo</value>
-        <value xml:lang="vi">Cập nhật vai trò</value>
-        <value xml:lang="zh">内容角色编辑页面</value>
-        <value xml:lang="zh-TW">內容角色編輯頁面</value>
-    </property>
-    <property key="ContentCompDocCurrentInstance">
-        <value xml:lang="da">Sammensat dokument nuværende instans</value>
-        <value xml:lang="en">Comp Doc Current Instance</value>
-        <value xml:lang="fr">Instance courante de document composite</value>
-        <value xml:lang="it">Istanza attuale</value>
-        <value xml:lang="ja">複合文書の現在のインスタンス</value>
-        <value xml:lang="pt">Instância atual do Documento composto (CompDoc)</value>
-        <value xml:lang="vi">Tài liệu kết hợp hiện tại</value>
-        <value xml:lang="zh">合成文档当前实例</value>
-        <value xml:lang="zh-TW">複合檔目前實例</value>
-    </property>
-    <property key="ContentCompDocCurrentTemplate">
-        <value xml:lang="da">Nuværende skabelon sammensat dokument</value>
-        <value xml:lang="en">Current Template CompDoc</value>
-        <value xml:lang="fr">Modèle courant de document composite</value>
-        <value xml:lang="it">Template attuale</value>
-        <value xml:lang="ja">現在のテンプレート複合文書</value>
-        <value xml:lang="pt">Modelo atual de CompDoc</value>
-        <value xml:lang="vi">Biểu mẫu của Tài liệu kết hợp hiện tại</value>
-        <value xml:lang="zh">合成文档当前模板</value>
-        <value xml:lang="zh-TW">複合檔目前模板</value>
-    </property>
-    <property key="ContentCompDocDown">
-        <value xml:lang="da">v Ned</value>
-        <value xml:lang="en">v Dn</value>
-        <value xml:lang="fr">v Bas</value>
-        <value xml:lang="it">v Giù</value>
-        <value xml:lang="ja">v 下</value>
-        <value xml:lang="pt">v Dn</value>
-        <value xml:lang="vi">Tải về (v Dn)</value>
-        <value xml:lang="zh">v 下</value>
-        <value xml:lang="zh-TW">v 下</value>
-    </property>
-    <property key="ContentCompDocGeneratePDF">
-        <value xml:lang="da">Generer sammensat PDF</value>
-        <value xml:lang="en">Generate Composite PDF</value>
-        <value xml:lang="fr">Générer un document PDF composite</value>
-        <value xml:lang="it">Genera PDF composizione</value>
-        <value xml:lang="ja">複合PDFの生成</value>
-        <value xml:lang="pt">Gerar PDF composto</value>
-        <value xml:lang="vi">Sinh định dạng PDF</value>
-        <value xml:lang="zh">生成PDF</value>
-        <value xml:lang="zh-TW">產生PDF</value>
-    </property>
-    <property key="ContentCompDocGoBack">
-        <value xml:lang="da">Gå tilbage til roden af sammensat dokument</value>
-        <value xml:lang="en">Go Back to CompDoc Root</value>
-        <value xml:lang="fr">Retourner à la racine du document composite</value>
-        <value xml:lang="it">Torna indietro alla composizione documenti</value>
-        <value xml:lang="ja">複合文書ルートに戻る</value>
-        <value xml:lang="pt">Voltar à raiz do CompDoc</value>
-        <value xml:lang="vi">Trở về Trang gốc Tài liệu kết hợp</value>
-        <value xml:lang="zh">返回合成文档根目录</value>
-        <value xml:lang="zh-TW">返回複合檔根目錄</value>
-    </property>
-    <property key="ContentCompDocInstanceAlreadyExists">
-        <value xml:lang="en">Instance compdoc Content for ${parameters.rootInstanceContentId} already exists</value>
-        <value xml:lang="fr">L'instance de composition de document pour ${parameters.rootInstanceContentId} existe déjà</value>
-        <value xml:lang="it">Istanza composizione documenti contenuto per ${parameters.rootInstanceContentId} esiste già</value>
-        <value xml:lang="ja">${parameters.rootInstanceContentId} の複合文書コンテンツインスタンスはすでに存在します</value>
-        <value xml:lang="pt">Instância do conteúdo de Compdoc para ${parameters.rootInstanceContentId} já existe</value>
-        <value xml:lang="vi">Tài liệu kết hợp ${parameters.rootInstanceContentId} đã tồn tại</value>
-        <value xml:lang="zh">对应${parameters.rootInstanceContentId}的实例compdoc内容已经存在</value>
-        <value xml:lang="zh-TW">對應${parameters.rootInstanceContentId}的實例compdoc內容已經存在</value>
-    </property>
-    <property key="ContentCompDocParentContentId">
+    <property key="ContentParentContentId">
         <value xml:lang="da">Forældre inholds ID</value>
         <value xml:lang="de">Übergeordneter Inhalt</value>
         <value xml:lang="en">Parent Content ID</value>
@@ -778,130 +599,6 @@
         <value xml:lang="zh">上级内容标识</value>
         <value xml:lang="zh-TW">上層內容識別</value>
     </property>
-    <property key="ContentCompDocRev">
-        <value xml:lang="da">rev.</value>
-        <value xml:lang="de">Ver.</value>
-        <value xml:lang="en">rev.</value>
-        <value xml:lang="fr">Ver.</value>
-        <value xml:lang="it">rev.</value>
-        <value xml:lang="ja">Ver.</value>
-        <value xml:lang="pt">Rev.</value>
-        <value xml:lang="th">รายได้</value>
-        <value xml:lang="vi">Phiên bản</value>
-        <value xml:lang="zh">版本</value>
-        <value xml:lang="zh-TW">版本</value>
-    </property>
-    <property key="ContentCompDocRevisionItemEditPage">
-        <value xml:lang="da">Punkt til revision rediger side</value>
-        <value xml:lang="de">Seite zum Bearbeiten Inhalt Version</value>
-        <value xml:lang="en">Revision Item Edit Page</value>
-        <value xml:lang="fr">Page de modification de révision d'article</value>
-        <value xml:lang="it">Riga Revisione Pagina Aggiornamento per Contenuto</value>
-        <value xml:lang="ja">リビジョンアイテム編集ページ</value>
-        <value xml:lang="pt">Página de edição do Item de revisão</value>
-        <value xml:lang="th">ปรับปรุงรายการในหน้าแก้ไข</value>
-        <value xml:lang="vi">Trang cập nhật phiên bản</value>
-        <value xml:lang="zh">修订明细编辑页面</value>
-        <value xml:lang="zh-TW">修訂細項編輯頁面</value>
-    </property>
-    <property key="ContentCompDocRevisionListPageForContent">
-        <value xml:lang="da">Revisionsliste indholdsside</value>
-        <value xml:lang="de">Seite mit Liste der Versionen des Inhalts</value>
-        <value xml:lang="en">Revision List Page For Content</value>
-        <value xml:lang="fr">Page de liste de révision pour le contenu</value>
-        <value xml:lang="it">Lista Revisioni Pagina per Contenuto</value>
-        <value xml:lang="ja">コンテンツのリビジョン一覧ページ</value>
-        <value xml:lang="pt">Página de lista de revisão para conteúdo</value>
-        <value xml:lang="th">ปรับปรุงหน้ารายการสำหรับหัวข้อ</value>
-        <value xml:lang="vi">Danh sách các phiên bản</value>
-        <value xml:lang="zh">内容的修订列表页面</value>
-        <value xml:lang="zh-TW">內容的修訂清單頁面</value>
-    </property>
-    <property key="ContentCompDocRevisions">
-        <value xml:lang="da">Revisioner</value>
-        <value xml:lang="de">Versionen</value>
-        <value xml:lang="en">Revisions</value>
-        <value xml:lang="fr">Révisions</value>
-        <value xml:lang="it">Revisioni</value>
-        <value xml:lang="ja">リビジョン</value>
-        <value xml:lang="pt">Revisões</value>
-        <value xml:lang="th">ปรับปรุงใหม่</value>
-        <value xml:lang="vi">Phiên bản</value>
-        <value xml:lang="zh">版本</value>
-        <value xml:lang="zh-TW">版本</value>
-    </property>
-    <property key="ContentCompDocStartApprovalProcess">
-        <value xml:lang="da">Start godkendelsesprocess</value>
-        <value xml:lang="en">Start Approval Proces</value>
-        <value xml:lang="fr">Démarrer le processus d'approbation</value>
-        <value xml:lang="it">Inizio processo approvazione</value>
-        <value xml:lang="ja">承認プロセスを開始</value>
-        <value xml:lang="pt">Iniciar o processo de aprovação</value>
-        <value xml:lang="vi">Bắt đầu quá trình xét duyệt</value>
-        <value xml:lang="zh">启动审批流程</value>
-        <value xml:lang="zh-TW">啟動審核流程</value>
-    </property>
-    <property key="ContentCompDocTemplateName">
-        <value xml:lang="da">Sammensat dokument skabelonnavn</value>
-        <value xml:lang="en">Comp Doc Template Name</value>
-        <value xml:lang="fr">Nom du modèle de document composite</value>
-        <value xml:lang="it">Nome template composizione documenti</value>
-        <value xml:lang="ja">複合文書テンプレート名称</value>
-        <value xml:lang="pt">Nome do Modelo de CompDoc </value>
-        <value xml:lang="vi">Tên biểu mẫu Tài liệu kết hợp</value>
-        <value xml:lang="zh">合成文档模板名称</value>
-        <value xml:lang="zh-TW">複合檔模板名稱</value>
-    </property>
-    <property key="ContentCompDocUp">
-        <value xml:lang="da">^ Op</value>
-        <value xml:lang="en">^ Up</value>
-        <value xml:lang="fr">^ Haut</value>
-        <value xml:lang="it">^ Sù</value>
-        <value xml:lang="ja">^ 上</value>
-        <value xml:lang="pt">^ Cima</value>
-        <value xml:lang="vi">Tải lên (^ Up)</value>
-        <value xml:lang="zh">^ 上</value>
-        <value xml:lang="zh-TW">^ 上</value>
-    </property>
-    <property key="ContentCompDocViewInstances">
-        <value xml:lang="da">Se instanser</value>
-        <value xml:lang="de">Instanz Anzeigen</value>
-        <value xml:lang="en">View Instances</value>
-        <value xml:lang="fr">Exemples de vue</value>
-        <value xml:lang="it">Mostra Istanze di CompDoc</value>
-        <value xml:lang="ja">インスタンスの表示</value>
-        <value xml:lang="pt">Exibir Instâncias</value>
-        <value xml:lang="th">ดูตัวอย่าง</value>
-        <value xml:lang="vi">Xem các Khởi tạo</value>
-        <value xml:lang="zh">浏览实例</value>
-        <value xml:lang="zh-TW">檢視實例</value>
-    </property>
-    <property key="ContentCompDocViewTree">
-        <value xml:lang="da">Se træ</value>
-        <value xml:lang="de">Baum anzeigen</value>
-        <value xml:lang="en">View Tree</value>
-        <value xml:lang="fr">Voir l'arborescence</value>
-        <value xml:lang="it">Mostra Albero</value>
-        <value xml:lang="ja">ツリーの表示</value>
-        <value xml:lang="pt">Exibir árvore</value>
-        <value xml:lang="th">แสดงแผนผังรูปต้นไม้</value>
-        <value xml:lang="vi">Xem cây</value>
-        <value xml:lang="zh">树状浏览</value>
-        <value xml:lang="zh-TW">樹狀檢視</value>
-    </property>
-    <property key="ContentCompDocViewWaitingApprovals">
-        <value xml:lang="da">Se manglende godkendelser</value>
-        <value xml:lang="de">Auf Freigabe wartende Genehmigungen zeigen</value>
-        <value xml:lang="en">View Waiting Approvals</value>
-        <value xml:lang="fr">Voir les approbations en attente</value>
-        <value xml:lang="it">Mostra Approvazioni in Attesa</value>
-        <value xml:lang="ja">承認待ちの表示</value>
-        <value xml:lang="pt">Ver aprovações pendentes</value>
-        <value xml:lang="th">รอการอนุมัติ</value>
-        <value xml:lang="vi">Xem các Đợi duyệt</value>
-        <value xml:lang="zh">浏览待审</value>
-        <value xml:lang="zh-TW">檢視待審核</value>
-    </property>
     <property key="ContentCompanyName">
         <value xml:lang="ar">أوفبيز: مسير المحتوى</value>
         <value xml:lang="da">OFBiz: Indholdsadministration</value>
@@ -1145,17 +842,6 @@
         <value xml:lang="zh">新建文章</value>
         <value xml:lang="zh-TW">新建文章</value>
     </property>
-    <property key="ContentCreateNewRootCompDocTemplate">
-        <value xml:lang="da">Opret skabelon for nyt sammensat roddokument</value>
-        <value xml:lang="en">Create New Root CompDoc Template</value>
-        <value xml:lang="fr">Créer une nouvelle racine de modèle de document composite</value>
-        <value xml:lang="it">Creare un nuovo template CompDoc Root</value>
-        <value xml:lang="ja">新規ルート複合文書テンプレートを作成</value>
-        <value xml:lang="pt">Criar novo modelo de raiz CompDoc</value>
-        <value xml:lang="vi">Tạo mới biểu mẫu cho tài liệu kết hợp gốc</value>
-        <value xml:lang="zh">新建根合成文档模板</value>
-        <value xml:lang="zh-TW">新建根複合檔模板</value>
-    </property>
     <property key="ContentDataBaseText">
         <value xml:lang="da">Database tekst</value>
         <value xml:lang="en">DataBase Text</value>
@@ -5938,17 +5624,6 @@
         <value xml:lang="zh">新建属性</value>
         <value xml:lang="zh-TW">新建屬性</value>
     </property>
-    <property key="PageTitleAddCompDocInstance">
-        <value xml:lang="da">Tilføj sammensat dokument instans</value>
-        <value xml:lang="en">Add CompDoc Instance</value>
-        <value xml:lang="fr">Ajouter une instance de document composite</value>
-        <value xml:lang="it">Aggiungi Istanza CompDoc</value>
-        <value xml:lang="ja">複合文書インスタンスを追加</value>
-        <value xml:lang="pt">Adicionar instância de CompDoc</value>
-        <value xml:lang="vi">Thêm khởi tạo tài liệu</value>
-        <value xml:lang="zh">添加合成文档实例</value>
-        <value xml:lang="zh-TW">增加複合檔實例</value>
-    </property>
     <property key="PageTitleAddCompositeDocumentInstance">
         <value xml:lang="da">Tilføj sammensat dokument instans del side</value>
         <value xml:lang="en">Add Composite Document Instance Part Page</value>
@@ -6188,19 +5863,6 @@
         <value xml:lang="zh">创建这个模板的实例</value>
         <value xml:lang="zh-TW">新建這個模板的實例</value>
     </property>
-    <property key="PageTitleCreateNewRootCompDocTemplate">
-        <value xml:lang="da">Opret ny rodskabelon for sammensat dokument</value>
-        <value xml:lang="de">Neue Basis CompDoc Vorlage erstellen</value>
-        <value xml:lang="en">Create New Root CompDoc Template</value>
-        <value xml:lang="fr">Créer un nouveau modèle de racine de document composite</value>
-        <value xml:lang="it">Nuovo template radice CompDoc</value>
-        <value xml:lang="ja">新規ルート複合文書テンプレートを作成</value>
-        <value xml:lang="pt">Criar novo modelo de raiz de CompDoc</value>
-        <value xml:lang="th">สร้างที่มาของ Template เอกสารใหม่</value>
-        <value xml:lang="vi">Tạo cây gốc Biểu mẫu tài liệu kết hợp</value>
-        <value xml:lang="zh">创建新的根合成文档的模板</value>
-        <value xml:lang="zh-TW">新建的根複合檔的模板</value>
-    </property>
     <property key="PageTitleCreateSurvey">
         <value xml:lang="ar">إستحداث تصويت</value>
         <value xml:lang="da">Opret rundspørge</value>
@@ -6287,32 +5949,6 @@
         <value xml:lang="zh">内容管理系统内容编辑</value>
         <value xml:lang="zh-TW">內容管理系統內容編輯</value>
     </property>
-    <property key="PageTitleEditCompDocInstance">
-        <value xml:lang="da">Ret forekomst af sammensat dokument</value>
-        <value xml:lang="de">CompDoc Instanz bearbeiten</value>
-        <value xml:lang="en">Edit CompDoc Instance</value>
-        <value xml:lang="fr">Modifier l'instance de document composite</value>
-        <value xml:lang="it">Aggiorna Istanza CompDoc</value>
-        <value xml:lang="ja">複合文書インスタンスを編集</value>
-        <value xml:lang="pt">Editar a instância de CompDoc</value>
-        <value xml:lang="th">แก้ไขตัวอย่างเอกสาร</value>
-        <value xml:lang="vi">Cập nhật khởi tạo (của tài liệu kết hợp)</value>
-        <value xml:lang="zh">编辑合成文档实例</value>
-        <value xml:lang="zh-TW">編輯複合檔實例</value>
-    </property>
-    <property key="PageTitleEditCompDocTemplate">
-        <value xml:lang="da">Ret template for sammensat dokument</value>
-        <value xml:lang="de">CompDoc Vorlage bearbeiten</value>
-        <value xml:lang="en">Edit CompDoc Template</value>
-        <value xml:lang="fr">Modifier le modèle de document composite</value>
-        <value xml:lang="it">Aggiorna Template CompDoc</value>
-        <value xml:lang="ja">複合文書テンプレートを編集</value>
-        <value xml:lang="pt">Editar modelo de CompDoc</value>
-        <value xml:lang="th">แก้ไข Template เอกสาร</value>
-        <value xml:lang="vi">Sửa đổi biểu mẫu</value>
-        <value xml:lang="zh">编辑合成文档模板</value>
-        <value xml:lang="zh-TW">編輯複合檔模板</value>
-    </property>
     <property key="PageTitleEditContent">
         <value xml:lang="ar">تعرير محتوى</value>
         <value xml:lang="da">Ret indhold</value>
@@ -6863,22 +6499,6 @@
         <value xml:lang="zh">编辑版式子内容</value>
         <value xml:lang="zh-TW">編輯佈局子內容</value>
     </property>
-    <property key="PageTitleEditRootCompDoc">
-        <value xml:lang="ar">تحرير وثيقة مركبة للجذر</value>
-        <value xml:lang="da">Ret sammensat roddokument</value>
-        <value xml:lang="de">Basis zusammengesetztes Dokument bearbeiten</value>
-        <value xml:lang="en">Edit Root Composite Document</value>
-        <value xml:lang="es">Modificar Documento compuesto Raíz</value>
-        <value xml:lang="fr">Modifier la racine du document composite</value>
-        <value xml:lang="it">Aggiorna Radice Documento Composito</value>
-        <value xml:lang="ja">ルート複合文書を編集</value>
-        <value xml:lang="pt">Editar a raiz do documento composto</value>
-        <value xml:lang="ro">Actualizeaza Radacina Document Compus</value>
-        <value xml:lang="th">แก้ไขส่วนประกอบของเอกสาร</value>
-        <value xml:lang="vi">Sửa đổi Gốc của Tài liệu kết hợp</value>
-        <value xml:lang="zh">编辑根合成文档</value>
-        <value xml:lang="zh-TW">編輯根複合檔</value>
-    </property>
     <property key="PageTitleEditSurvey">
         <value xml:lang="ar">تحرير تصويت</value>
         <value xml:lang="da">Ret rundspørge</value>
@@ -7039,22 +6659,6 @@
         <value xml:lang="zh">查找内容管理系统内容</value>
         <value xml:lang="zh-TW">尋找內容管理系統內容</value>
     </property>
-    <property key="PageTitleFindCompDoc">
-        <value xml:lang="ar">إيجاد وثيقة مركبة</value>
-        <value xml:lang="da">Find sammensat dokument</value>
-        <value xml:lang="de">CompDoc suchen</value>
-        <value xml:lang="en">Find CompDoc</value>
-        <value xml:lang="fr">Rechercher le document composite</value>
-        <value xml:lang="it">Ricerca composizione documenti</value>
-        <value xml:lang="ja">複合文書を検索</value>
-        <value xml:lang="nl">Zoeken samengesteld document</value>
-        <value xml:lang="pt">Localizar CompDoc</value>
-        <value xml:lang="ro">Cauta CompDoc</value>
-        <value xml:lang="th">ค้นหาเอกสารคอมพิวเตอร์</value>
-        <value xml:lang="vi">Tìm kiếm tài liệu kết hợp</value>
-        <value xml:lang="zh">查找合成文档</value>
-        <value xml:lang="zh-TW">尋找複合檔</value>
-    </property>
     <property key="PageTitleFindContent">
         <value xml:lang="ar">إيجاد محتوى</value>
         <value xml:lang="da">Søg indhold</value>
@@ -7477,61 +7081,6 @@
         <value xml:lang="zh">上传图片</value>
         <value xml:lang="zh-TW">上傳圖片</value>
     </property>
-    <property key="PageTitleViewCompDocContent">
-        <value xml:lang="da">Vis sammensat dokument indhold</value>
-        <value xml:lang="en">View CompDoc Content</value>
-        <value xml:lang="fr">Voir le contenu du document composite</value>
-        <value xml:lang="it">Mostra contenuto composizione documenti</value>
-        <value xml:lang="ja">複合文書の表示</value>
-        <value xml:lang="pt">Exibir o conteúdo de CompDoc</value>
-        <value xml:lang="vi">Xem nội dung tài liệu kết hợp</value>
-        <value xml:lang="zh">浏览合成文档内容</value>
-        <value xml:lang="zh-TW">檢視複合檔內容</value>
-    </property>
-    <property key="PageTitleViewCompDocContentBinary">
-        <value xml:lang="da">Vis sammensat dokument binært</value>
-        <value xml:lang="en">View CompDoc Content Binary</value>
-        <value xml:lang="fr">Voir le contenu du document composite au format binaire</value>
-        <value xml:lang="it">Mostra contenuto binario CompDoc</value>
-        <value xml:lang="ja">複合文書コンテンツバイナリの表示</value>
-        <value xml:lang="pt">Visualizar binário do conteúdo CompDoc</value>
-        <value xml:lang="vi">Xem Tài liệu kiểu nhị phân</value>
-        <value xml:lang="zh">浏览合成文档二进制内容</value>
-        <value xml:lang="zh-TW">檢視複合檔二進位制內容</value>
-    </property>
-    <property key="PageTitleViewCompDocContentHtml">
-        <value xml:lang="da">Vis sammensat dokument Html</value>
-        <value xml:lang="en">View CompDoc Content Html</value>
-        <value xml:lang="fr">Voir le contenu du document composite au format HTML</value>
-        <value xml:lang="it">Mostra contenuto html CompDoc</value>
-        <value xml:lang="ja">複合文書コンテンツHTMLの表示</value>
-        <value xml:lang="pt">Visualizar conteúdo Html do CompDoc</value>
-        <value xml:lang="vi">Xem Tài liệu html</value>
-        <value xml:lang="zh">浏览合成文档网页内容</value>
-        <value xml:lang="zh-TW">檢視複合檔網頁內容</value>
-    </property>
-    <property key="PageTitleViewCompDocTemplateTree">
-        <value xml:lang="da">Vis skabelon træ</value>
-        <value xml:lang="en">View Template Tree</value>
-        <value xml:lang="fr">Voir l'arborescence modèle</value>
-        <value xml:lang="it">Mostra albero template</value>
-        <value xml:lang="ja">テンプレートツリーの表示</value>
-        <value xml:lang="pt">Exibir modelo de árvore</value>
-        <value xml:lang="vi">Duyệt cây biểu mẫu</value>
-        <value xml:lang="zh">浏览模板树</value>
-        <value xml:lang="zh-TW">檢視模板樹</value>
-    </property>
-    <property key="PageTitleViewCompDocTree">
-        <value xml:lang="da">Vis træ</value>
-        <value xml:lang="en">View Tree</value>
-        <value xml:lang="fr">Voir l'arborescence</value>
-        <value xml:lang="it">Mostra albero</value>
-        <value xml:lang="ja">ツリーの表示</value>
-        <value xml:lang="pt">Exibir árvore</value>
-        <value xml:lang="vi">Duyệt cây</value>
-        <value xml:lang="zh">浏览树</value>
-        <value xml:lang="zh-TW">檢視樹</value>
-    </property>
     <property key="PageTitleViewSurveyResponses">
         <value xml:lang="ar">مشاهدة أجوبة التصويت</value>
         <value xml:lang="da">Vis rundpørge svar</value>
diff --git a/applications/content/minilang/compdoc/CompDocServices.xml b/applications/content/minilang/compdoc/CompDocServices.xml
deleted file mode 100644
index fe608a9..0000000
--- a/applications/content/minilang/compdoc/CompDocServices.xml
+++ /dev/null
@@ -1,836 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd">
-
-    <simple-method method-name="genCompDocInstance" short-description="Create CompDoc">
-        <entity-one entity-name="Content" value-field="rootTemplateContent">
-            <field-map field-name="contentId" from-field="parameters.instanceOfContentId"/>
-        </entity-one>
-        <log level="info" message="genCompDocInstance> rootTemplateContent: ${rootTemplateContent}"/>
-
-        <!--  if not passed in, get latest template contentRevisionSeqId from db -->
-        <if-empty field="parameters.contentRevisionSeqId">
-            <entity-condition entity-name="ContentRevision" list="contentRevisionList">
-                <condition-list>
-                    <condition-expr field-name="contentId" operator="equals" from-field="parameters.instanceOfContentId"/>
-                </condition-list>
-                <order-by field-name="-contentRevisionSeqId"/>
-            </entity-condition>
-            <if-not-empty field="contentRevisionList">
-                <set from-field="contentRevisionList[0].contentRevisionSeqId" field="contentRevisionSeqId"/>
-                <else>
-                    <set value="" field="contentRevisionSeqId"/>
-                </else>
-            </if-not-empty>
-            <else>
-                <set from-field="parameters.contentRevisionSeqId" field="contentRevisionSeqId"/>
-            </else>
-        </if-empty>
-        <log level="info" message="genCompDocInstance> contentRevisionSeqId: ${contentRevisionSeqId}"/>
-
-        <make-value entity-name="Content" value-field="rootInstanceContent"/>
-        <if-empty field="parameters.rootInstanceContentId">
-            <sequenced-id sequence-name="Content" field="rootInstanceContent.contentId"/>
-            <log level="info" message="genCompDocInstance 2> rootInstanceContent: ${rootInstanceContent}"/>
-            <else>
-                <!--  check to see if it already exists, error if so -->
-                <entity-one entity-name="Content" value-field="existingContent">
-                    <field-map field-name="contentId" from-field="parameters.rootInstanceContentId"/>
-                </entity-one>
-                <if-not-empty field="existingContent">
-                    <add-error>
-                        <fail-property resource="ContentUiLabels" property="ContentCompDocInstanceAlreadyExists"/>
-                    </add-error>
-                    <check-errors/>
-                </if-not-empty>
-                <set from-field="parameters.rootInstanceContentId" field="rootInstanceContent.contentId"/>
-            </else>
-        </if-empty>
-
-        <!--  populate fields -->
-        <set from-field="parameters.contentName" field="rootInstanceContent.contentName" default-value="${rootTemplateContent.contentName}"/>
-        <now-timestamp field="nowTimestamp"/>
-        <set from-field="parameters.instanceOfContentId" field="rootInstanceContent.instanceOfContentId"/>
-        <set from-field="nowTimestamp" field="rootInstanceContent.createdDate"/>
-        <set from-field="nowTimestamp" field="rootInstanceContent.lastModifiedDate"/>
-        <set from-field="rootInstanceContent.createdByUserLogin" field="parameters.userLogin.userLoginId"/>
-        <set from-field="rootInstanceContent.lastModifiedByUserLogin" field="parameters.userLogin.userLoginId"/>
-        <set value="COMPDOC_INSTANCE" field="rootInstanceContent.contentTypeId"/>
-        <create-value value-field="rootInstanceContent"/>
-
-        <log level="info" message="genCompDocInstance 3> rootInstanceContent: ${rootInstanceContent}"/>
-        <field-to-result field="rootInstanceContent.contentId" result-name="contentId"/>
-        <set from-field="parameters.instanceOfContentId" field="parentTemplateContentId"/>
-        <set from-field="rootInstanceContent.contentId" field="parentInstanceContentId"/>
-        <log level="info" message="genCompDocInstance 4> parentTemplateContentId: ${parentTemplateContentId}"/>
-        <log level="info" message="genCompDocInstance 5> parentInstanceContentId: ${parentInstanceContentId}"/>
-        <set from-field="parentInstanceContentId" field="revisionMap.contentId"/>
-        <set from-field="parentInstanceContentId" field="revisionMap.itemContentId"/>
-        <set from-field="parameters.userLogin" field="revisionMap.userLogin"/>
-        <log level="info" message="revisionMap : ${revisionMap}"/>
-        <call-service service-name="persistContentRevisionAndItem" in-map-name="revisionMap">
-            <result-to-result result-name="contentRevisionSeqId"/>
-            <result-to-field result-name="contentRevisionSeqId"/>
-        </call-service>
-
-        <!--  This is for traversing tree and creating empty instance content entities
-        <call-simple-method method-name="genInstanceChildCompDocs"/>
-        -->
-        <set from-field="revisionMap.contentId" field="cloneMap.contentId"/>
-        <set from-field="contentRevisionSeqId" field="cloneMap.contentRevisionSeqId"/>
-        <set from-field="parameters.userLogin" field="cloneMap.userLogin"/>
-        <!-- Not for INSTANCE CompDocs. They will be generated on demand.
-        <call-service service-name="cloneContentApprovals" in-map-name="cloneMap">
-        </call-service>
-            -->
-    </simple-method>
-
-    <simple-method method-name="genInstanceChildCompDocs" short-description="Create CompDoc">
-        <set from-field="parentTemplateContentId" field="thisTemplateContentId"/>
-        <set from-field="parentInstanceContentId" field="thisInstanceContentId"/>
-        <log level="info" message="genInstanceChildCompDocs 0> thisTemplateContentId: ${thisTemplateContentId}"/>
-        <log level="info" message="genInstanceChildCompDocs 1> thisInstanceContentId: ${thisInstanceContentId}"/>
-        <entity-condition entity-name="ContentAssoc" list="contentAssocList">
-            <condition-list combine="and">
-                <condition-expr field-name="contentIdTo" operator="equals" from-field="thisTemplateContentId"/>
-                <condition-expr field-name="contentAssocTypeId" operator="equals" value="COMPDOC_PART"/>
-                <condition-list combine="or">
-                    <condition-expr field-name="thruDate" operator="greater" from-field="nowTimestamp"/>
-                    <condition-expr field-name="thruDate" operator="equals" value=""/>
-                </condition-list>
-            </condition-list>
-        </entity-condition>
-        <log level="info" message="genInstanceChildCompDocs 1> contentAssocList: ${contentAssocList}"/>
-
-        <iterate list="contentAssocList" entry="templateContentAssoc">
-            <clone-value value-field="templateContent" new-value-field="instanceContent"/>
-
-            <sequenced-id sequence-name="Content" field="instanceContent.contentId"/>
-
-            <set value="TEMPLATE" field="instanceContent.contentTypeId"/>
-            <create-value value-field="instanceContent"/>
-            <make-value entity-name="ContentAssoc" value-field="instanceContentAssoc"/>
-            <set from-field="thisInstanceContentId" field="instanceContentAssoc.contentIdTo"/>
-            <set from-field="instanceContent.contentId" field="instanceContentAssoc.contentId"/>
-            <set value="COMPDOC_PART" field="instanceContentAssoc.contentAssocTypeId"/>
-            <set from-field="nowTimestamp" field="instanceContentAssoc.fromDate"/>
-            <create-value value-field="instanceContent"/>
-            <!--  recursively call this method -->
-            <set from-field="templateContentAssoc.contentId" field="parentTemplateContentId"/>
-            <set from-field="instanceContent.contentId" field="parentInstanceContentId"/>
-            <call-simple-method method-name="genInstanceChildCompDocs"/>
-        </iterate>
-    </simple-method>
-
-    <simple-method method-name="persistCompDoc" short-description="Create CompDoc">
-        <!--  create the compdoc Content entity -->
-        <set-service-fields service-name="persistContentAndAssoc" map="parameters" to-map="persistMap"/>
-        <if-not-empty field="parameters.mimeTypeId">
-            <if>
-                <condition>
-                    <or>
-                        <if-compare field="parameters.mimeTypeId" operator="equals" value="application/msword"/>
-                        <if-compare field="parameters.mimeTypeId" operator="equals" value="application/pdf"/>
-                        <if-compare field="parameters.mimeTypeId" operator="equals" value="application/octet-stream"/>
-                    </or>
-                </condition>
-                <then>
-                    <set value="IMAGE_OBJECT" field="persistMap.dataResourceTypeId"/>
-                </then>
-                <else-if>
-                    <condition>
-                        <or>
-                            <if-compare field="parameters.mimeTypeId" operator="equals" value="image/jpeg"/>
-                            <if-compare field="parameters.mimeTypeId" operator="equals" value="image/gif"/>
-                            <if-compare field="parameters.mimeTypeId" operator="equals" value="image/tiff"/>
-                            <if-compare field="parameters.mimeTypeId" operator="equals" value="image/png"/>
-                        </or>
-                    </condition>
-                    <then>
-                        <set value="IMAGE_OBJECT" field="persistMap.dataResourceTypeId"/>
-                    </then>
-                </else-if>
-                <else-if>
-                    <condition>
-                        <if-compare field="parameters.mimeTypeId" operator="equals" value="application/vnd.ofbiz.survey"/>
-                    </condition>
-                    <then>
-                        <set value="SURVEY" field="persistMap.dataResourceTypeId"/>
-                    </then>
-                </else-if>
-                <else-if>
-                    <condition>
-                        <if-compare field="parameters.mimeTypeId" operator="equals" value="application/vnd.ofbiz.survey.response"/>
-                    </condition>
-                    <then>
-                        <set value="SURVEY_RESPONSE" field="persistMap.dataResourceTypeId"/>
-                    </then>
-                </else-if>
-                <else>
-                    <set value="ELECTRONIC_TEXT" field="persistMap.dataResourceTypeId"/>
-                </else>
-            </if>
-        </if-not-empty>
-
-        <set from-field="parameters.userLogin" field="persistMap.userLogin"/>
-        <log level="info" message="persistMap : ${persistMap}"/>
-        <call-service service-name="persistContentAndAssoc" in-map-name="persistMap">
-            <results-to-map map-name="pResults"/>
-        </call-service>
-        <!--  put all the result fields in this service's result -->
-        <field-to-result field="pResults.contentRevisionSeqId" result-name="contentRevisionSeqId"/>
-        <field-to-result field="pResults.contentId" result-name="contentId"/>
-        <field-to-result field="pResults.dataResourceId" result-name="dataResourceId"/>
-        <field-to-result field="pResults.drDataResourceId" result-name="drDataResourceId"/>
-        <field-to-result field="pResults.caContentIdTo" result-name="caContentIdTo"/>
-        <field-to-result field="pResults.caContentId" result-name="caContentId"/>
-        <field-to-result field="pResults.caContentAssocTypeId" result-name="caContentAssocTypeId"/>
-        <field-to-result field="pResults.caFromDate" result-name="caFromDate"/>
-        <field-to-result field="pResults.caSequenceNum" result-name="caSequenceNum"/>
-        <field-to-result field="pResults.roleTypeList" result-name="roleTypeList"/>
-
-        <log level="info" message="pResults : ${pResults}"/>
-        <if-not-empty field="pResults.contentIdTo">
-            <set from-field="pResults.contentIdTo" field="resequenceMap.contentIdTo"/>
-            <set value="COMPDOC_PART" field="resequenceMap.typeList[]"/>
-            <set value="10" field="resequenceMap.seqInc" type="Integer"/>
-            <call-service service-name="resequence" in-map-name="resequenceMap"/>
-        </if-not-empty>
-
-        <if>
-            <condition>
-                <or>
-                    <if-compare field="persistMap.contentTypeId" operator="equals" value="COMPDOC_TEMPLATE"/>
-                    <if-compare field="persistMap.contentTypeId" operator="equals" value="COMPDOC_INSTANCE"/>
-                    <if-compare field="persistMap.contentTypeId" operator="equals" value="TEMPLATE"/>
-                    <if-compare field="persistMap.contentTypeId" operator="equals" value="DOCUMENT"/>
-                </or>
-            </condition>
-            <then>
-                <!--  if no rootTemplateContentId exists, this must be a root op, so set contentId = itemContentId -->
-                <set from-field="pResults.contentId" field="revisionMap.contentId"/>
-            </then>
-        </if>
-
-        <set field="revisionMap.contentId" from-field="parameters.rootContentId" default-value="${pResults.caContentIdTo}"/>
-        <set field="revisionMap.contentId" from-field="revisionMap.contentId" default-value="${pResults.contentId}"/>
-        <set field="revisionMap.itemContentId" from-field="pResults.contentId"/>
-        <set field="revisionMap.userLogin" from-field="parameters.userLogin"/>
-        <log level="info" message="revisionMap : ${revisionMap}"/>
-        <call-service service-name="persistContentRevisionAndItem" in-map-name="revisionMap">
-            <result-to-result result-name="contentRevisionSeqId"/>
-            <result-to-field result-name="contentRevisionSeqId"/>
-        </call-service>
-
-        <if>
-            <condition>
-                <or>
-                    <if-compare field="persistMap.contentTypeId" operator="equals" value="COMPDOC_TEMPLATE"/>
-                    <if-compare field="persistMap.contentTypeId" operator="equals" value="TEMPLATE"/>
-                </or>
-            </condition>
-            <then>
-                <set field="cloneMap.contentId" from-field="revisionMap.contentId"/>
-                <set field="cloneMap.contentRevisionSeqId" from-field="contentRevisionSeqId"/>
-                <set field="cloneMap.userLogin" from-field="parameters.userLogin"/>
-                <call-service service-name="cloneTemplateContentApprovals" in-map-name="cloneMap"/>
-            </then>
-        </if>
-    </simple-method>
-
-    <simple-method method-name="persistCompDocContent" short-description="Persist a CompDoc DataResource and data">
-        <entity-one entity-name="Content" value-field="content" use-cache="false"/>
-        <set from-field="content.dataResourceId" field="oldDataResourceId"/>
-
-        <log level="info" message="persistCompDocContent(0).content : ${content}"/>
-        <set-service-fields service-name="persistDataResourceAndData" map="parameters" to-map="persistMap"/>
-        <clear-field field="persistMap.dataResourceId"/>
-        <clear-field field="persistMap.drDataResourceId"/>
-
-        <log level="info" message="persistCompDocContent(0.2).persistMap : ${persistMap}"/>
-        <call-service service-name="persistDataResourceAndData" in-map-name="persistMap">
-            <result-to-field result-name="dataResourceId" field="newDataResourceId"/>
-        </call-service>
-
-        <log level="info" message="persistCompDocContent(1).newDataResourceId : ${newDataResourceId}"/>
-        <set from-field="newDataResourceId" field="content.dataResourceId"/>
-        <store-value value-field="content"/>
-        <set from-field="parameters.rootContentId" field="revisionMap.contentId"/>
-        <set from-field="parameters.contentId" field="revisionMap.itemContentId"/>
-        <set from-field="parameters.userLogin" field="revisionMap.userLogin"/>
-        <set from-field="oldDataResourceId" field="revisionMap.oldDataResourceId"/>
-        <set from-field="newDataResourceId" field="revisionMap.newDataResourceId"/>
-
-        <log level="info" message="persistCompDocContent(2).revisionMap : ${revisionMap}"/>
-        <call-service service-name="persistContentRevisionAndItem" in-map-name="revisionMap">
-            <result-to-result result-name="contentRevisionSeqId"/>
-            <result-to-field result-name="contentRevisionSeqId"/>
-        </call-service>
-        <log level="info" message="persistCompDocContent(3).contentRevisionSeqId : ${contentRevisionSeqId}"/>
-    </simple-method>
-
-    <simple-method method-name="persistCompDocPdf2Survey" short-description="Upload/save PDF, create Survey, populate Content">
-        <set field="pdfMap.contentTypeId" value="TEMPLATE"/>
-        <set field="pdfMap.dataResourceTypeId" value="IMAGE_OBJECT"/>
-        <set field="pdfMap.mimeTypeId" value="application/vnd.ofbiz.survey"/>
-        <set field="pdfMap.drMimeTypeId" value="application/vnd.ofbiz.survey"/>
-        <set field="pdfMap.imageData" from-field="parameters.imageData"/>
-        <set field="pdfMap._imageData_contentType" from-field="parameters._imageData_contentType"/>
-        <set field="pdfMap._imageData_fileName" from-field="parameters._imageData_fileName"/>
-        <set field="pdfMap.contentName" from-field="parameters.pdfName"/>
-
-        <log level="info" message="persistCompDocPdf2Survey(1).pdfMap : ${pdfMap}"/>
-        <call-service service-name="persistContentAndAssoc" in-map-name="pdfMap">
-            <result-to-field result-name="contentId" field="acroFormContentId"/>
-        </call-service>
-
-        <log level="info" message="persistCompDocPdf2Survey(2).acroFormContentId : ${acroFormContentId}"/>
-        <set field="acroMap.contentId" from-field="acroFormContentId"/>
-        <call-service service-name="buildSurveyFromPdf" in-map-name="acroMap">
-            <result-to-field result-name="surveyId" field="surveyId"/>
-        </call-service>
-
-        <log level="info" message="persistCompDocPdf2Survey(3).surveyId : ${surveyId}"/>
-        <set-service-fields service-name="persistCompDocContent" map="parameters" to-map="persistMap"/>
-        <set field="persistMap.relatedDetailId" from-field="surveyId"/>
-        <set field="persistMap.mimeTypeId" value="application/vnd.ofbiz.survey"/>
-        <clear-field field="persistMap._imageData_contentType"/>
-        <clear-field field="persistMap._imageData_fileName"/>
-        <clear-field field="persistMap.imageData"/>
-
-        <log level="info" message="persistCompDocPdf2Survey(4)persistMap : ${persistMap}"/>
-        <call-service service-name="persistCompDocContent" in-map-name="persistMap"></call-service>
-    </simple-method>
-
-    <!-- =============== =============== =============== --><!-- =============== Revision Services =============== --><!-- =============== =============== =============== -->
-
-    <!-- Methods for ContentRevision and ContentRevisionItem -->
-    <simple-method method-name="persistContentRevisionAndItem" short-description="Update ContentRevision and ContentRevisionItem">
-        <entity-condition entity-name="ContentRevision" list="contentRevisionList">
-            <condition-expr field-name="contentId" operator="equals" from-field="parameters.contentId"/>
-            <order-by field-name="contentRevisionSeqId DESC"/>
-        </entity-condition>
-        <log level="info" message="contentRevisionList: ${contentRevisionList}"/>
-        <if-not-empty field="contentRevisionList">
-            <set field="newEntity" from-field="contentRevisionList[0]"/>
-            <set field="incrementedSeq" from-field="newEntity.contentRevisionSeqId"/>
-            <else>
-                <make-value entity-name="ContentRevision" value-field="newEntity"/>
-            </else>
-        </if-not-empty>
-        <log level="info" message="incrementedSeq(0): ${incrementedSeq}"/>
-        <log level="info" message="ContentRevision(0): ${newEntity}"/>
-        <if-not-empty field="incrementedSeq">
-            <calculate field="incrementedSeq" type="Long">
-                <calcop operator="add">
-                    <calcop operator="get" field="incrementedSeq"/>
-                    <number value="1"/>
-                </calcop>
-            </calculate>
-            <else>
-                <set field="incrementedSeq" value="1" type="Long"/>
-            </else>
-        </if-not-empty>
-        <calculate field="numericPadding" type="Integer">
-            <number value="6"/>
-        </calculate>
-        <call-class-method method-name="padNumberWithLeadingZeros" class-name="org.apache.ofbiz.content.compdoc.CompDocEvents" ret-field="paddedSeqId">
-            <field field="incrementedSeq" type="Long"/>
-            <field field="numericPadding" type="Integer"/>
-        </call-class-method>
-        <log level="info" message="incrementedSeq(1): ${incrementedSeq}"/>
-        <log level="info" message="numericPadding(1): ${numericPadding}"/>
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-        <set field="newEntity.contentRevisionSeqId" from-field="paddedSeqId"/>
-        <log level="info" message="ContentRevision(1): ${newEntity}"/>
-        <create-value value-field="newEntity"/>
-        <if-not-empty field="parameters.itemContentId">
-            <make-value entity-name="ContentRevisionItem" value-field="newEntity"/>
-            <set-pk-fields map="parameters" value-field="newEntity"/>
-            <set field="newEntity.contentRevisionSeqId" from-field="paddedSeqId"/>
-            <set-nonpk-fields map="parameters" value-field="newEntity"/>
-            <create-value value-field="newEntity"/>
-            <log level="info" message="ContentRevisionItem(1): ${newEntity}"/>
-        </if-not-empty>
-        <field-to-result field="paddedSeqId" result-name="contentRevisionSeqId"/>
-        <log level="info" message="paddedSeqId: ${paddedSeqId}"/>
-    </simple-method>
-    <simple-method method-name="getRevisionDataResource" short-description="Get version of DataResource that fits overall revision">
-        <entity-condition entity-name="ContentRevisionItem" list="contentRevisionItems" use-cache="true">
-            <condition-list combine="and">
-                <condition-expr field-name="contentId" operator="equals" from-field="parameters.contentId"/>
-                <condition-expr field-name="itemContentId" operator="equals" from-field="parameters.itemContentId"/>
-                <condition-expr field-name="contentRevisionSeqId" operator="less-equals" from-field="parameters.contentRevisionSeqId"/>
-            </condition-list>
-            <order-by field-name="-contentRevisionSeqId"/>
-        </entity-condition>
-        <if-not-empty field="contentRevisionItems">
-            <set field="contentRevisionItem" from-field="contentRevisionItems[0]"/>
-            <entity-one entity-name="Content" value-field="content" use-cache="true">
-                <field-map field-name="contentId" from-field="contentRevisionItem.itemContentId"/>
-            </entity-one>
-            <if-not-empty field="content">
-                <entity-one entity-name="DataResource" value-field="dataResource" use-cache="true">
-                    <field-map field-name="dataResourceId" from-field="content.dataResourceId"/>
-                </entity-one>
-                <field-to-result field="dataResource" result-name="dataResource"/>
-            </if-not-empty>
-        </if-not-empty>
-    </simple-method>
-    <simple-method method-name="getRevisionItemDataResource" short-description="Get version of DataResource that fits overall revision">
-        <entity-one entity-name="ContentRevisionItem" value-field="contentRevisionItem" use-cache="true">
-            <field-map field-name="contentId" from-field="parameters.contentId"/>
-            <field-map field-name="itemContentId" from-field="parameters.itemContentId"/>
-            <field-map field-name="contentRevisionSeqId" from-field="parameters.contentRevisionSeqId"/>
-        </entity-one>
-        <entity-one entity-name="Content" value-field="content" use-cache="true">
-            <field-map field-name="contentId" from-field="contentRevisionItem.itemContentId"/>
-        </entity-one>
-        <if-not-empty field="content">
-            <entity-one entity-name="DataResource" value-field="dataResource" use-cache="true">
-                <field-map field-name="dataResourceId" from-field="content.dataResourceId"/>
-            </entity-one>
-            <field-to-result field="dataResource" result-name="dataResource"/>
-        </if-not-empty>
-    </simple-method>
-
-    <!-- =============== =============== =============== --><!-- =============== Approval Services =============== --><!-- =============== =============== =============== -->
-
-    <simple-method method-name="getApprovalsWithPermissions" short-description="Get ContentApprovals for approval process">
-        <!--  this seems like an awkward way to get the previous ContentApproval entities, but
-              if you are not sure what previous contentRevisionSeqId is, then it is necessary to ask.
-              I think it is worth not assuming it is 1 less than the passed in value, just for ruggedness.
-          -->
-        <entity-condition entity-name="MaxContentApprovalView" list="instanceApprovalList" use-cache="false">
-            <condition-list>
-                <condition-expr field-name="contentId" operator="equals" from-field="parameters.rootContentId"/>
-                <condition-expr field-name="contentRevisionSeqId" operator="less-equals" from-field="parameters.contentRevisionSeqId"/>
-            </condition-list>
-            <select-field field-name="contentId"/>
-            <select-field field-name="partyId"/>
-            <select-field field-name="roleTypeId"/>
-            <select-field field-name="maxContentRevisionSeqId"/>
-        </entity-condition>
-        <log level="info" message="instanceApprovalList: ${instanceApprovalList}"/>
-        <log level="info" message="rootContentId: ${parameters.rootContentId}"/>
-        <log level="info" message="contentRevisionSeqId: ${parameters.contentRevisionSeqId}"/>
-        <set field="inMap2.userLogin" from-field="userLogin"/>
-        <!--  since we don't have a primary key from above, go get one -->
-        <iterate list="instanceApprovalList" entry="maxContentApproval">
-            <log level="info" message="maxContentApproval: ${maxContentApproval}"/>
-            <entity-condition entity-name="ContentApproval" list="contentApprovalList2" use-cache="false">
-                <condition-list>
-                    <condition-expr field-name="contentId" operator="equals" from-field="maxContentApproval.contentId"/>
-                    <condition-expr field-name="contentRevisionSeqId" operator="equals" from-field="maxContentApproval.maxContentRevisionSeqId"/>
-                    <condition-expr field-name="partyId" operator="equals" from-field="maxContentApproval.partyId" ignore-if-empty="true"/>
-                    <condition-expr field-name="roleTypeId" operator="equals" from-field="maxContentApproval.roleTypeId" ignore-if-empty="true"/>
-                </condition-list>
-                <order-by field-name="-sequenceNum"/>
-            </entity-condition>
-            <log level="info" message="contentApprovalList2: ${contentApprovalList2}"/>
-            <if-not-empty field="contentApprovalList2">
-                <set from-field="contentApprovalList2[0].contentApprovalId" field="contentApprovalId"/>
-                <set from-field="contentApprovalList2[0]" field="contentApproval"/>
-                <log level="info" message="contentApproval: ${contentApproval}"/>
-                <set field="contentApprovalList[]" from-field="contentApproval"/>
-            </if-not-empty>
-            <!--
-            <set field="inMap2.contentApprovalId" from-field="contentApproval.contentApprovalId"/>
-            <call-service  service-name="hasApprovalPermission" in-map-name="inMap2">
-                <result-to-field result-name="approvalPermExists"/>
-            </call-service>
-            <set field="gvAndPerm" from-field="contentApproval"/>
-            <set field="gvAndPerm.permission" from-field="openApprovalExists"/>
-            <set field="contentApprovalList[]" from-field="gvAndPerm"/>
-            -->
-        </iterate>
-        <field-to-result field="contentApprovalList"/>
-    </simple-method>
-    <simple-method method-name="cloneTemplateContentApprovals" short-description="Bump the previous ContentApproval approvals up to current CDI">
-        <log level="info" message="cloneTemplateContentApprovals-parameters: ${parameters}"/>
-        <entity-condition entity-name="MaxContentApprovalView" list="maxContentApprovalList">
-            <condition-list combine="and">
-                <condition-expr field-name="contentId" operator="equals" from-field="parameters.contentId"/>
-            </condition-list>
-            <select-field field-name="maxContentRevisionSeqId"/>
-            <select-field field-name="contentId"/>
-            <select-field field-name="partyId"/>
-            <select-field field-name="roleTypeId"/>
-            <order-by field-name="-maxContentRevisionSeqId"/>
-        </entity-condition>
-        <set from-field="maxContentApprovalList[0].maxContentRevisionSeqId" field="latestContentRevisionSeqId"/>
-        <log level="info" message="latestContentRevisionSeqId 0aa: ${latestContentRevisionSeqId}"/>
-        <entity-and entity-name="ContentApproval" list="templateContentApprovalList">
-            <field-map field-name="contentId" from-field="parameters.contentId"/>
-            <field-map field-name="contentRevisionSeqId" from-field="latestContentRevisionSeqId"/>
-        </entity-and>
-        <log level="info" message="templateContentApprovalList 0aa: ${templateContentApprovalList}"/>
-        <iterate list="templateContentApprovalList" entry="templateContentApproval">
-            <clone-value value-field="templateContentApproval" new-value-field="contentApproval"/>
-            <set from-field="parameters.contentRevisionSeqId" field="contentApproval.contentRevisionSeqId"/>
-            <set from-field="parameters.contentId" field="contentApproval.contentId"/>
-
-            <sequenced-id sequence-name="ContentApproval" field="contentApproval.contentApprovalId"/>
-            <clear-field field="contentApproval.approvalStatusId"/>
-            <log level="info" message="contentApproval 2b: ${contentApproval}"/>
-            <create-value value-field="contentApproval"/>
-        </iterate>
-    </simple-method>
-    <simple-method method-name="cloneInstanceContentApprovals" short-description="Bump the previous ContentApproval approvals up to current CDI">
-        <entity-one entity-name="Content" value-field="content">
-            <field-map field-name="contentId" from-field="parameters.contentId"/>
-        </entity-one>
-        <set from-field="parameters.contentId" field="thisContentId"/>
-        <set from-field="parameters.contentRevisionSeqId" field="thisContentRevisionSeqId"/>
-        <log level="info" message="cloneContentApprovals(0)- thisContentRevisionSeqId : ${thisContentRevisionSeqId}"/>
-        <log level="info" message="cloneContentApprovals(0b)- parameters : ${parameters} "/>
-        <now-timestamp field="nowTimestamp"/>
-        <!--  get previous list of ContentApproval -->
-        <entity-condition entity-name="MaxContentApprovalView" list="maxContentApprovalList">
-            <condition-list combine="and">
-                <condition-expr field-name="contentId" operator="equals" from-field="thisContentId"/>
-                <condition-expr field-name="contentRevisionSeqId" operator="less" from-field="thisContentRevisionSeqId" ignore-if-null="true"/>
-            </condition-list>
-            <select-field field-name="maxContentRevisionSeqId"/>
-            <select-field field-name="contentId"/>
-            <select-field field-name="partyId"/>
-            <select-field field-name="roleTypeId"/>
-            <order-by field-name="-maxContentRevisionSeqId"/>
-        </entity-condition>
-        <set from-field="maxContentApprovalList[0].maxContentRevisionSeqId" field="maxContentRevisionSeqId"/>
-        <if>
-            <condition>
-                <if-empty field="maxContentRevisionSeqId"/>
-            </condition>
-            <then>
-                <!--  if an instance track, check to see if there any new or deleted records on the template -->
-                <set from-field="content.instanceOfContentId" field="rootTemplateContentId"/>
-                <log level="info" message="rootTemplateContentId 0aa: ${rootTemplateContentId}"/>
-                <entity-condition entity-name="ContentRevision" list="templateContentRevisionList" use-cache="true">
-                    <condition-list>
-                        <condition-expr field-name="contentId" operator="equals" from-field="rootTemplateContentId"/>
-                    </condition-list>
-                    <order-by field-name="-contentRevisionSeqId"/>
-                </entity-condition>
-                <set from-field="templateContentRevisionList[0].contentRevisionSeqId" field="latestContentRevisionSeqId"/>
-                <log level="info" message="latestContentRevisionSeqId 0aa: ${latestContentRevisionSeqId}"/>
-                <entity-and entity-name="ContentApproval" list="templateContentApprovalList">
-                    <field-map field-name="contentId" from-field="rootTemplateContentId"/>
-                    <field-map field-name="contentRevisionSeqId" from-field="latestContentRevisionSeqId"/>
-                </entity-and>
-                <log level="info" message="templateContentApprovalList 0aa: ${templateContentApprovalList}"/>
-                <iterate list="templateContentApprovalList" entry="templateContentApproval">
-                    <clone-value value-field="templateContentApproval" new-value-field="contentApproval"/>
-                    <set from-field="thisContentRevisionSeqId" field="contentApproval.contentRevisionSeqId"/>
-                    <set from-field="thisContentId" field="contentApproval.contentId"/>
-
-                    <sequenced-id sequence-name="ContentApproval" field="contentApproval.contentApprovalId"/>
-                    <set value="CNTAP_READY" field="contentApproval.approvalStatusId"/>
-                    <set from-field="nowTimestamp" field="contentApproval.approvalDate"/>
-                    <log level="info" message="contentApproval 2b: ${contentApproval}"/>
-                    <create-value value-field="contentApproval"/>
-                </iterate>
-            </then>
-            <else>
-                <set from-field="thisContentId" field="map.contentId"/>
-                <set from-field="thisContentRevisionSeqId" field="map.contentRevisionSeqId"/>
-                <call-service service-name="getFinalApprovalStatus" in-map-name="map">
-                    <result-to-field result-name="approvalStatusId" field="finalApprovalStatusId"/>
-                    <result-to-field result-name="contentApprovalList" field="contentApprovalList"/>
-                </call-service>
-                <!--  determine status of previous approvals --><!-- finalApprovalStatusId is the applicable status from previous approvals -->
-                <log level="info" message="cloneContentApprovals(2)- finalApprovalStatusId : ${finalApprovalStatusId} "/>
-                <log level="info" message="cloneContentApprovals(2b)- contentApprovalList : ${contentApprovalList} "/>
-                <!--  conditionally set the contentApprovalId status of each entity -->
-                <iterate list="contentApprovalList" entry="existingContentApproval">
-                    <clone-value value-field="existingContentApproval" new-value-field="contentApproval"/>
-                    <set from-field="thisContentRevisionSeqId" field="contentApproval.contentRevisionSeqId"/>
-
-                    <sequenced-id sequence-name="ContentApproval" field="contentApproval.contentApprovalId"/>
-                    <set from-field="nowTimestamp" field="contentApproval.approvalDate"/>
-                    <if-compare field="content.contentTypeId" operator="equals" value="COMPDOC_INSTANCE">
-                        <if>
-                            <!-- not rejected, soft rejected or approved, reset to ready -->
-                            <condition>
-                                <or>
-                                    <if-compare field="finalApprovalStatusId" operator="equals" value="CNTAP_REJECTED"/>
-                                    <if-compare field="finalApprovalStatusId" operator="equals" value="CNTAP_APPROVED"/>
-                                </or>
-                            </condition>
-                            <then>
-                                <clear-field field="contentApproval.approvalStatusId"/>
-                            </then>
-                            <else-if>
-                                <!-- soft rejected, reset rejected (shouldn't be any) and soft rejected entities to ready -->
-                                <condition>
-                                    <and>
-                                        <if-compare field="finalApprovalStatusId" operator="equals" value="CNTAP_SOFT_REJ"/>
-                                        <or>
-                                            <if-compare field="existingContentApproval.approvalStatusId" operator="equals" value="CNTAP_SOFT_REJ"/>
-                                            <if-compare field="existingContentApproval.approvalStatusId" operator="equals" value="CNTAP_REJECTED"/>
-                                        </or>
-                                    </and>
-                                </condition>
-                                <then>
-                                    <set value="CNTAP_READY" field="contentApproval.approvalStatusId"/>
-                                </then>
-                            </else-if>
-                            <else-if>
-                                <condition>
-                                    <and>
-                                        <!-- soft rejected and current record is not soft/rejected, keep currentstatus -->
-                                        <if-compare field="finalApprovalStatusId" operator="equals" value="CNTAP_SOFT_REJ"/>
-                                        <if-compare field="existingContentApproval.approvalStatusId" operator="equals" value="CNTAP_APPROVED"/>
-                                    </and>
-                                </condition>
-                                <then>
-                                    <set value="CNTAP_APPROVED" field="contentApproval.approvalStatusId"/>
-                                </then>
-                            </else-if>
-                        </if>
-                        <else>
-                            <set value="CNTAP_READY" field="contentApproval.approvalStatusId"/>
-                        </else>
-                    </if-compare>
-                    <log level="info" message="contentApproval 2: ${contentApproval}"/>
-                    <create-value value-field="contentApproval"/>
-                </iterate>
-                <!--  if an instance track, check to see if there any new or deleted records on the template -->
-                <set from-field="content.instanceOfContentId" field="rootTemplateContentId"/>
-                <log level="info" message="rootTemplateContentId 0aa: ${rootTemplateContentId}"/>
-                <entity-condition entity-name="ContentRevision" list="templateContentRevisionList" use-cache="true">
-                    <condition-list>
-                        <condition-expr field-name="contentId" operator="equals" from-field="rootTemplateContentId"/>
-                    </condition-list>
-                    <order-by field-name="-contentRevisionSeqId"/>
-                </entity-condition>
-                <set from-field="templateContentRevisionList[0].contentRevisionSeqId" field="latestContentRevisionSeqId"/>
-                <log level="info" message="latestContentRevisionSeqId 0aa: ${latestContentRevisionSeqId}"/>
-                <entity-and entity-name="ContentApproval" list="templateContentApprovalList">
-                    <field-map field-name="contentId" from-field="rootTemplateContentId"/>
-                    <field-map field-name="contentRevisionSeqId" from-field="latestContentRevisionSeqId"/>
-                </entity-and>
-                <log level="info" message="templateContentApprovalList 0aa: ${templateContentApprovalList}"/>
-                <iterate list="templateContentApprovalList" entry="templateContentApproval">
-                    <!--  look for this entity in newly created entities -->
-                    <entity-condition entity-name="ContentApproval" list="newContentApprovalList">
-                        <condition-list combine="and">
-                            <condition-expr field-name="contentId" operator="equals" from-field="thisContentId"/>
-                            <condition-expr field-name="contentRevisionSeqId" operator="equals" from-field="thisContentRevisionSeqId"/>
-                            <condition-expr field-name="partyId" operator="equals" from-field="templateContentApproval.partyId" ignore-if-empty="true"/>
-                            <condition-expr field-name="roleTypeId" operator="equals" from-field="templateContentApproval.roleTypeId" ignore-if-empty="true"/>
-                        </condition-list>
-                    </entity-condition>
-                    <if-empty field="newContentApprovalList">
-                        <clone-value value-field="templateContentApproval" new-value-field="contentApproval"/>
-                        <set from-field="thisContentRevisionSeqId" field="contentApproval.contentRevisionSeqId"/>
-                        <set field="contentApproval.contentId" from-field="thisContentId"/>
-
-                        <sequenced-id sequence-name="ContentApproval" field="contentApproval.contentApprovalId"/>
-                        <set field="contentApproval.approvalStatusId" value="CNTAP_READY"/>
-                        <log level="info" message="contentApproval 2b: ${contentApproval}"/>
-                        <create-value value-field="contentApproval"/>
-                    </if-empty>
-                </iterate>
-                <!--  TODO: remove instance approvals that have been deleted from the template set -->
-            </else>
-        </if>
-    </simple-method>
-    <simple-method method-name="hasApprovalPermission" short-description="Determine ContentApproval permission from passed value">
-        <make-value entity-name="ContentApproval" value-field="contentApprovalPK"/>
-        <set field="contentApprovalPK.contentApprovalId" from-field="parameters.contentApprovalId"/>
-        <find-by-primary-key entity-name="ContentApproval" value-field="contentApproval" map="contentApprovalPK" use-cache="true"/>
-        <set field="partyId" from-field="parameters.userLogin.partyId"/>
-        <log level="info" message="contentApproval: ${contentApproval}"/>
-        <if-compare field="contentApproval.partyId" value="${partyId}" operator="equals">
-            <set field="approvalPermExists" value="true"/>
-            <log level="info" message="approvalPermExists: ${approvalPermExists}"/>
-            <field-to-result field="approvalPermExists" result-name="approvalPermExists"/>
-            <return/>
-        </if-compare>
-        <if-not-empty field="contentApproval.roleTypeId">
-            <now-timestamp field="nowTimestamp"/>
-            <entity-condition entity-name="ContentRole" list="contentRoleList">
-                <condition-list combine="and">
-                    <condition-expr field-name="contentId" operator="equals" from-field="contentId"/>
-                    <condition-expr field-name="partyId" operator="equals" from-field="partyId"/>
-                    <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/>
-                    <condition-list combine="or">
-                        <condition-expr field-name="thruDate" operator="greater" from-field="nowTimestamp"/>
-                        <condition-expr field-name="thruDate" value="" operator="equals"/>
-                    </condition-list>
-                </condition-list>
-            </entity-condition>
-            <if-not-empty field="contentRoleList">
-                <set field="approvalPermExists" value="true"/>
-                <field-to-result field="approvalPermExists" result-name="approvalPermExists"/>
-                <return/>
-            </if-not-empty>
-        </if-not-empty>
-        <set field="approvalPermExists" value="false"/>
-        <field-to-result field="approvalPermExists" result-name="approvalPermExists"/>
-        <return/>
-    </simple-method>
-    <simple-method method-name="prepForApproval" short-description="Set ContentApprovals for approval process">
-        <log level="info" message="got into prepForApproval- parameters: ${parameters}"/>
-        <set field="rootContentId" from-field="parameters.rootContentId"/>
-        <!--  bump CDI up one for new approval -->
-        <set field="context2.contentId" from-field="parameters.rootContentId"/>
-        <call-service service-name="persistContentRevisionAndItem" in-map-name="context2">
-            <result-to-field result-name="contentRevisionSeqId" field="contentRevisionSeqId"/>
-            <result-to-result result-name="contentRevisionSeqId" service-result-name="rootContentRevisionSeqId"/>
-        </call-service>
-        <log level="info" message="got into prepForApproval- contentRevisionSeqId: ${contentRevisionSeqId}"/>
-        <!--  create instance approval records for current CDI -->
-        <set from-field="rootContentId" field="context3.contentId"/>
-        <set from-field="contentRevisionSeqId" field="context3.contentRevisionSeqId"/>
-        <log level="info" message="got into prepForApproval(3)- context3: ${context3}"/>
-        <call-service service-name="cloneInstanceContentApprovals" in-map-name="context3"></call-service>
-    </simple-method>
-    <simple-method method-name="getFinalApprovalStatus" short-description="Check to see if any open approval conditions exist">
-        <!-- iterate thru most recent ContentApproval list and determine its ending status -->
-        <entity-and entity-name="ContentApproval" list="contentApprovalList">
-            <field-map field-name="contentId" from-field="parameters.contentId"/>
-            <field-map field-name="contentRevisionSeqId" from-field="parameters.contentRevisionSeqId"/>
-            <order-by field-name="sequenceNum"/>
-        </entity-and>
-        <if>
-            <condition>
-                <not>
-                    <if-empty field="contentApprovalList"/>
-                </not>
-            </condition>
-            <then>
-                <set value="CNTAP_READY" field="finalApprovalStatusId"/>
-                <iterate list="contentApprovalList" entry="existingContentApproval">
-                    <if>
-                        <condition>
-                            <or>
-                                <if-compare field="existingContentApproval.approvalStatusId" operator="equals" value="CNTAP_SOFT_REJ"/>
-                                <if-compare field="existingContentApproval.approvalStatusId" operator="equals" value="CNTAP_REJECTED"/>
-                            </or>
-                        </condition>
-                        <then>
-                            <set from-field="existingContentApproval.approvalStatusId" field="finalApprovalStatusId"/>
-                        </then>
-                        <else-if>
-                            <condition>
-                                <if-compare field="existingContentApproval.approvalStatusId" operator="equals" value="CNTAP_APPROVED"/>
-                            </condition>
-                            <then>
-                                <set value="CNTAP_APPROVED" field="finalApprovalStatusId"/>
-                            </then>
-                        </else-if>
-                        <else-if>
-                            <condition>
-                                <and>
-                                    <if-compare field="existingContentApproval.approvalStatusId" operator="equals" value="CNTAP_READY"/>
-                                    <if-compare field="finalApprovalStatusId" operator="equals" value="CNTAP_APPROVED"/>
-                                </and>
-                            </condition>
-                            <then>
-                                <set value="IN_PROCESS" field="finalApprovalStatusId"/>
-                            </then>
-                        </else-if>
-                    </if>
-                </iterate>
-                <field-to-result field="finalApprovalStatusId" result-name="approvalStatusId"/>
-                <field-to-result field="contentApprovalList" result-name="contentApprovalList"/>
-            </then>
-            <else>
-                <set value="CNTAP_NOT_READY" field="finalApprovalStatusId"/>
-                <field-to-result field="finalApprovalStatusId" result-name="approvalStatusId"/>
-            </else>
-        </if>
-    </simple-method>
-    <simple-method method-name="checkForWaitingApprovals" short-description="Check to see if any approval conditions exist for the passed in user">
-        <set from-field="userLogin.partyId" field="partyId"/>
-        <entity-and entity-name="PartyRole" list="partyRoleList">
-            <field-map field-name="partyId" from-field="partyId"/>
-        </entity-and>
-        <log level="info" message="userLogin.partyId: ${partyId}"/>
-        <iterate list="partyRoleList" entry="partyRole">
-            <set from-field="partyRole.roleTypeId" field="roles[]"/>
-        </iterate>
-        <log level="info" message="roles: ${roles}"/>
-        <!-- find approvals belonging to roles that the user has or to the user -->
-        <entity-condition entity-name="MaxContentApprovalView" list="compdocApprovalList" use-cache="false">
-            <condition-list>
-                <condition-expr field-name="contentRevisionSeqId" operator="less-equals" from-field="parameters.contentRevisionSeqId" ignore-if-empty="true"/>
-                <condition-expr field-name="contentTypeId" operator="equals" value="COMPDOC_INSTANCE"/>
-                <condition-list combine="or">
-                    <condition-expr field-name="partyId" operator="equals" from-field="partyId"/>
-                    <condition-expr field-name="roleTypeId" operator="in" from-field="roles"/>
-                </condition-list>
-            </condition-list>
-            <select-field field-name="contentId"/>
-            <select-field field-name="contentTypeId"/>
-            <select-field field-name="partyId"/>
-            <select-field field-name="roleTypeId"/>
-            <select-field field-name="maxContentRevisionSeqId"/>
-        </entity-condition>
-        <log level="info" message="compdocApprovalList: ${compdocApprovalList}"/>
-        <!-- above query does not get contentApprovalId. For each row find it -->
-        <iterate list="compdocApprovalList" entry="maxContentApproval">
-            <log level="info" message="maxContentApproval: ${maxContentApproval}"/>
-            <entity-condition entity-name="ContentApproval" list="contentApprovalList2" use-cache="false">
-                <condition-list>
-                    <condition-expr field-name="contentId" operator="equals" from-field="maxContentApproval.contentId"/>
-                    <condition-expr field-name="contentRevisionSeqId" operator="equals" from-field="maxContentApproval.maxContentRevisionSeqId"/>
-                    <condition-expr field-name="partyId" operator="equals" from-field="maxContentApproval.partyId" ignore-if-empty="true"/>
-                    <condition-expr field-name="roleTypeId" operator="equals" from-field="maxContentApproval.roleTypeId" ignore-if-empty="true"/>
-                </condition-list>
-                <order-by field-name="-sequenceNum"/>
-            </entity-condition>
-            <log level="info" message="contentApprovalList2: ${contentApprovalList2}"/>
-            <if-not-empty field="contentApprovalList2">
-                <set from-field="contentApprovalList2[0].contentApprovalId" field="contentApprovalId"/>
-                <log level="info" message="contentApproval: ${contentApproval}"/>
-                <set field="contentApprovalIdList[]" from-field="contentApprovalId"/>
-            </if-not-empty>
-        </iterate>
-        <log level="info" message="contentApprovalIdList: ${contentApprovalIdList}"/>
-        <!-- find the entries that match the user's partyId or associated roleTypes -->
-        <entity-condition entity-name="ContentApproval" list="contentApprovalList">
-            <condition-list combine="and">
-                <condition-expr field-name="contentApprovalId" operator="in" from-field="contentApprovalIdList"/>
-                <condition-expr field-name="approvalStatusId" operator="equals" value="CNTAP_READY"/>
-            </condition-list>
-        </entity-condition>
-        <log level="info" message="contentApprovalList: ${contentApprovalList}"/>
-        <field-to-result field="contentApprovalList" result-name="contentApprovalList"/>
-    </simple-method>
-    <simple-method method-name="getMostRecentRevision" short-description="Look for most recent revision for contentId">
-        <entity-condition entity-name="ContentRevision" list="contentRevisions" use-cache="true">
-            <condition-list combine="and">
-                <condition-expr field-name="contentId" operator="equals" from-field="parameters.contentId"/>
-            </condition-list>
-            <order-by field-name="-contentRevisionSeqId"/>
-        </entity-condition>
-        <log level="info" message="contentRevisions: ${contentRevisions}"/>
-        <if-not-empty field="contentRevisions">
-            <set from-field="contentRevisions[0].contentRevisionSeqId" field="mostRecentRevisionSeqId"/>
-        </if-not-empty>
-        <field-to-result field="mostRecentRevisionSeqId" result-name="mostRecentRevisionSeqId"/>
-    </simple-method>
-</simple-methods>
diff --git a/applications/content/servicedef/services.xml b/applications/content/servicedef/services.xml
index 925bcca..18d4a7c 100644
--- a/applications/content/servicedef/services.xml
+++ b/applications/content/servicedef/services.xml
@@ -373,34 +373,6 @@
         <override name="textData" allow-html="any"/>
     </service>
 
-    <service name="persistCompDocContent" engine="simple"
-        transaction-timeout="7200"
-            location="component://content/minilang/compdoc/CompDocServices.xml" invoke="persistCompDocContent" auth="true">
-        <description>Persist a CompDoc DataResource and data</description>
-        <implements service="persistDataResourceAndData"/>
-        <attribute name="contentRevisionSeqId" type="String" mode="OUT" optional="false"/>
-        <attribute name="rootContentId" type="String" mode="IN" optional="true"/>
-    </service>
-
-    <service name="persistCompDocPdf2Survey" engine="simple"
-        transaction-timeout="7200"
-            location="component://content/minilang/compdoc/CompDocServices.xml" invoke="persistCompDocPdf2Survey" auth="true">
-        <description>Upload/save PDF, create Survey, populate Content</description>
-        <implements service="persistCompDocContent"/>
-        <attribute name="pdfName" type="String" mode="IN" optional="true"/>
-    </service>
-
-    <service name="persistContentWithRevision" engine="java"
-        transaction-timeout="7200"
-            location="org.apache.ofbiz.content.ContentManagementServices" invoke="persistContentWithRevision" auth="true">
-        <implements service="persistContentAndAssoc"/>
-        <attribute mode="IN" name="masterRevisionContentId" optional="false" type="String">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingMasterRevisionContentId"/>
-            </type-validate>
-        </attribute>
-    </service>
-
     <service name="findContentParents" engine="java"
         transaction-timeout="7200"
             location="org.apache.ofbiz.content.content.ContentServices" invoke="findContentParents" auth="true">
@@ -854,193 +826,6 @@
         <attribute mode="OUT" name="outputString" optional="true" type="String"/>
     </service>
 
-    <!-- ================ CompDoc Requests ================= -->
-    <service name="persistContentRevisionAndItem" engine="simple"
-        location="component://content/minilang/compdoc/CompDocServices.xml"
-        invoke="persistContentRevisionAndItem" auth="true">
-        <description>Update a ContentRevision and ContentRevisionItem</description>
-        <auto-attributes entity-name="ContentRevision" include="all" mode="IN" optional="true">
-            <exclude field-name="contentRevisionSeqId"/>
-        </auto-attributes>
-        <auto-attributes entity-name="ContentRevisionItem" include="all" mode="IN" optional="true">
-            <exclude field-name="contentRevisionSeqId"/>
-        </auto-attributes>
-        <attribute name="contentRevisionSeqId" type="String" mode="OUT" optional="false">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingContentRevisionSeqId"/>
-            </type-validate>
-        </attribute>
-    </service>
-
-    <service name="prepForApproval" engine="simple"
-        location="component://content/minilang/compdoc/CompDocServices.xml"
-        invoke="prepForApproval" auth="true">
-        <description>Set ContentApprovals for approval process</description>
-        <permission-service service-name="contentManagerPermission" main-action="CREATE"/>
-        <attribute name="rootContentId" type="String" mode="IN" optional="false">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingRootContentId"/>
-            </type-validate>
-        </attribute>
-        <attribute name="rootContentRevisionSeqId" type="String" mode="OUT" optional="false"/>
-    </service>
-
-    <service name="getFinalApprovalStatus" engine="simple"
-        location="component://content/minilang/compdoc/CompDocServices.xml"
-        invoke="getFinalApprovalStatus" auth="true">
-        <description>Set ContentApprovals for approval process</description>
-        <attribute name="contentId" type="String" mode="IN" optional="false">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingContentId"/>
-            </type-validate>
-        </attribute>
-        <attribute name="contentRevisionSeqId" type="String" mode="INOUT" optional="true"/>
-        <attribute name="approvalStatusId" type="String" mode="OUT" optional="true"/>
-        <attribute name="contentApprovalList" type="List" mode="OUT" optional="true"/>
-    </service>
-
-    <service name="getApprovalsWithPermissions" engine="simple"
-        location="component://content/minilang/compdoc/CompDocServices.xml"
-        invoke="getApprovalsWithPermissions" auth="true" >
-        <description>Get a list of ContentApprovals and permission indicators</description>
-        <attribute name="rootContentId" type="String" mode="IN" optional="false">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingRootContentId"/>
-            </type-validate>
-        </attribute>
-        <attribute name="contentRevisionSeqId" type="String" mode="IN" optional="false">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingContentRevisionSeqId"/>
-            </type-validate>
-        </attribute>
-        <attribute name="userLogin" type="org.apache.ofbiz.entity.GenericValue" mode="IN" optional="false">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingUserLogin"/>
-            </type-validate>
-        </attribute>
-        <attribute name="checkPermission" type="String" mode="IN" optional="true"/>
-        <attribute name="contentApprovalList" type="List" mode="OUT" optional="true"/>
-    </service>
-
-    <service name="hasApprovalPermission" engine="simple"
-        location="component://content/minilang/compdoc/CompDocServices.xml"
-        invoke="hasApprovalPermission" auth="true">
-        <description>Determine permission status for record</description>
-        <attribute name="contentApprovalId" type="String" mode="IN" optional="false">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingContentApprovalId"/>
-            </type-validate>
-        </attribute>
-        <attribute name="userLogin" type="org.apache.ofbiz.entity.GenericValue" mode="IN" optional="false">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingUserLogin"/>
-            </type-validate>
-        </attribute>
-        <attribute name="approvalPermExists" type="String" mode="OUT" optional="true"/>
-    </service>
-
-    <service name="genCompDocInstance" engine="simple"
-        location="component://content/minilang/compdoc/CompDocServices.xml"
-        invoke="genCompDocInstance" auth="true">
-        <description>Generate parallel CompDoc Instance tree</description>
-        <attribute name="contentName" type="String" mode="IN" optional="true"/>
-        <attribute name="instanceOfContentId" type="String" mode="IN" optional="true"/>
-        <attribute name="rootInstanceContentId" type="String" mode="IN" optional="true"/>
-        <attribute name="contentId" type="String" mode="OUT" optional="true"/>
-        <attribute name="contentRevisionSeqId" type="String" mode="OUT" optional="false"/>
-    </service>
-
-    <service name="persistCompDoc" engine="simple"
-        location="component://content/minilang/compdoc/CompDocServices.xml"
-        invoke="persistCompDoc" auth="true">
-        <description>Create a CompDoc Template entity and associated ContentRevision/Item entities</description>
-        <implements service="persistContentAndAssoc"/>
-        <attribute name="contentRevisionSeqId" type="String" mode="OUT" optional="false"/>
-        <attribute name="rootContentId" type="String" mode="IN" optional="true"/>
-    </service>
-
-    <service name="cloneTemplateContentApprovals" engine="simple"
-        location="component://content/minilang/compdoc/CompDocServices.xml"
-        invoke="cloneTemplateContentApprovals" auth="true">
-        <description>Bump the previous ContentApproval approvals up to current CDT</description>
-        <attribute name="contentRevisionSeqId" type="String" mode="IN" optional="false">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingContentRevisionSeqId"/>
-            </type-validate>
-        </attribute>
-        <attribute name="contentId" type="String" mode="IN" optional="false">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingContentId"/>
-            </type-validate>
-        </attribute>
-    </service>
-
-    <service name="cloneInstanceContentApprovals" engine="simple"
-        location="component://content/minilang/compdoc/CompDocServices.xml"
-        invoke="cloneInstanceContentApprovals" auth="true">
-        <description>Bump the previous ContentApproval approvals up to current CDI</description>
-        <attribute name="contentRevisionSeqId" type="String" mode="IN" optional="true"/>
-        <attribute name="contentId" type="String" mode="IN" optional="false">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingContentId"/>
-            </type-validate>
-        </attribute>
-    </service>
-
-    <service name="checkForWaitingApprovals" engine="simple"
-        location="component://content/minilang/compdoc/CompDocServices.xml"
-        invoke="checkForWaitingApprovals" auth="true">
-        <description>Check to see if there are any ContentApproval records awaiting this user's action</description>
-        <attribute name="thisUserLogin" type="org.apache.ofbiz.entity.GenericValue" mode="IN" optional="true"/>
-        <attribute name="contentApprovalList" type="List" mode="OUT" optional="true"/>
-    </service>
-
-    <service name="getMostRecentRevision" engine="simple"
-        location="component://content/minilang/compdoc/CompDocServices.xml"
-        invoke="getMostRecentRevision" auth="true">
-        <description>Look for most recent revision for contentId</description>
-        <attribute name="contentId" type="String" mode="IN" optional="false">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingContentId"/>
-            </type-validate>
-        </attribute>
-        <attribute name="mostRecentRevisionSeqId" type="String" mode="OUT" optional="true"/>
-    </service>
-
-    <!-- CompDoc Rendering Services  -->
-    <service name="renderCompDocPdf" engine="java"
-        location="org.apache.ofbiz.content.compdoc.CompDocServices"
-        invoke="renderCompDocPdf" auth="true">
-        <description>Convert all the CompDoc parts into PDF and concatenate and put in CMS</description>
-        <attribute name="contentId" type="String" mode="IN" optional="false">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingContentId"/>
-            </type-validate>
-        </attribute>
-        <attribute name="contentRevisionSeqId" type="String" mode="IN" optional="true"/>
-        <attribute name="webSiteId" type="String" mode="IN" optional="true"/>
-        <attribute name="https" type="String" mode="IN" optional="true"/>
-        <attribute name="rootDir" type="String" mode="IN" optional="true"/>
-        <attribute name="locale" type="java.util.Locale" mode="IN" optional="true"/>
-        <attribute name="outByteBuffer" type="java.nio.ByteBuffer" mode="OUT" optional="false"/>
-    </service>
-    <service name="renderContentPdf" engine="java"
-        location="org.apache.ofbiz.content.compdoc.CompDocServices"
-        invoke="renderContentPdf" auth="true">
-        <description>Convert all the CompDoc parts into PDF and concatenate and put in CMS</description>
-        <attribute name="contentId" type="String" mode="IN" optional="false">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingContentId"/>
-            </type-validate>
-        </attribute>
-        <attribute name="contentRevisionSeqId" type="String" mode="IN" optional="true"/>
-        <attribute name="webSiteId" type="String" mode="IN" optional="true"/>
-        <attribute name="https" type="String" mode="IN" optional="true"/>
-        <attribute name="rootDir" type="String" mode="IN" optional="true"/>
-        <attribute name="locale" type="java.util.Locale" mode="IN" optional="true"/>
-        <attribute name="outByteBuffer" type="java.nio.ByteBuffer" mode="OUT" optional="false"/>
-    </service>
-
     <!-- blog services -->
     <service name="createBlogEntry" engine="simple" auth="true"
         location="component://content/minilang/blog/BlogServices.xml" invoke="createBlogEntry">
diff --git a/applications/content/src/main/java/org/apache/ofbiz/content/ContentManagementServices.java b/applications/content/src/main/java/org/apache/ofbiz/content/ContentManagementServices.java
index a8d4ac0..17f813c 100644
--- a/applications/content/src/main/java/org/apache/ofbiz/content/ContentManagementServices.java
+++ b/applications/content/src/main/java/org/apache/ofbiz/content/ContentManagementServices.java
@@ -1583,72 +1583,6 @@ public class ContentManagementServices {
         return result;
     }
 
-    public static Map<String, Object> persistContentWithRevision(DispatchContext dctx, Map<String, ? extends Object> context) {
-        Map<String, Object> result = null;
-        Delegator delegator = dctx.getDelegator();
-        LocalDispatcher dispatcher = dctx.getDispatcher();
-        GenericValue dataResource = null;
-        String masterRevisionContentId = (String) context.get("masterRevisionContentId");
-        String oldDataResourceId = (String) context.get("drDataResourceId");
-        if (UtilValidate.isEmpty(oldDataResourceId)) {
-            oldDataResourceId = (String) context.get("dataResourceId");
-        }
-        if (UtilValidate.isNotEmpty(oldDataResourceId)) {
-            try {
-                dataResource = EntityQuery.use(delegator).from("DataResource").where("dataResourceId", oldDataResourceId).queryOne();
-            } catch (GenericEntityException e) {
-                Debug.logError(e.toString(), MODULE);
-                return ServiceUtil.returnError(e.toString());
-            }
-        }
-
-        try {
-            ModelService persistContentAndAssocModel = dispatcher.getDispatchContext().getModelService("persistContentAndAssoc");
-            Map<String, Object> ctx = persistContentAndAssocModel.makeValid(context, ModelService.IN_PARAM);
-            if (dataResource != null) {
-                ctx.remove("dataResourceId");
-                ctx.remove("drDataResourceId");
-            }
-            result = dispatcher.runSync("persistContentAndAssoc", ctx);
-            if (ServiceUtil.isError(result)) {
-                return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result));
-            }
-            String contentId = (String) result.get("contentId");
-            List<String> parentList = new LinkedList<>();
-            if (UtilValidate.isEmpty(masterRevisionContentId)) {
-                Map<String, Object> traversMap = new HashMap<>();
-                traversMap.put("contentId", contentId);
-                traversMap.put("direction", "To");
-                traversMap.put("contentAssocTypeId", "COMPDOC_PART");
-                Map<String, Object> traversResult = dispatcher.runSync("traverseContent", traversMap);
-                if (ServiceUtil.isError(traversResult)) {
-                    return ServiceUtil.returnError(ServiceUtil.getErrorMessage(traversResult));
-                }
-                parentList = UtilGenerics.cast(traversResult.get("parentList"));
-            } else {
-                parentList.add(masterRevisionContentId);
-            }
-
-            // Update ContentRevision and ContentRevisionItem
-            Map<String, Object> contentRevisionMap = new HashMap<>();
-            contentRevisionMap.put("itemContentId", contentId);
-            contentRevisionMap.put("newDataResourceId", result.get("dataResourceId"));
-            contentRevisionMap.put("oldDataResourceId", oldDataResourceId);
-            // need committedByPartyId
-            for (String thisContentId : parentList) {
-                contentRevisionMap.put("contentId", thisContentId);
-                result = dispatcher.runSync("persistContentRevisionAndItem", contentRevisionMap);
-                if (ServiceUtil.isError(result)) {
-                    return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result));
-                }
-            }
-        } catch (GenericServiceException e) {
-            Debug.logError(e.toString(), MODULE);
-            return ServiceUtil.returnError(e.toString());
-        }
-        return result;
-    }
-
     private static String validateUploadedFile(DispatchContext dctx, Map<String, ? extends Object> context) {
         Delegator delegator = dctx.getDelegator();
         Locale locale = (Locale) context.get("locale");
diff --git a/applications/content/src/main/java/org/apache/ofbiz/content/compdoc/CompDocEvents.java b/applications/content/src/main/java/org/apache/ofbiz/content/compdoc/CompDocEvents.java
deleted file mode 100644
index 14c97c6..0000000
--- a/applications/content/src/main/java/org/apache/ofbiz/content/compdoc/CompDocEvents.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *******************************************************************************/
-package org.apache.ofbiz.content.compdoc;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.apache.ofbiz.base.util.Debug;
-import org.apache.ofbiz.base.util.UtilFormatOut;
-import org.apache.ofbiz.base.util.UtilHttp;
-import org.apache.ofbiz.base.util.UtilProperties;
-import org.apache.ofbiz.base.util.UtilValidate;
-import org.apache.ofbiz.entity.Delegator;
-import org.apache.ofbiz.entity.GenericEntityException;
-import org.apache.ofbiz.entity.GenericValue;
-import org.apache.ofbiz.entity.util.EntityQuery;
-import org.apache.ofbiz.service.GenericServiceException;
-import org.apache.ofbiz.service.LocalDispatcher;
-import org.apache.ofbiz.service.ModelService;
-import org.apache.ofbiz.service.ServiceUtil;
-import org.apache.ofbiz.webapp.website.WebSiteWorker;
-
-
-/**
- * CompDocEvents Class
- */
-public class CompDocEvents {
-    private static final String MODULE = CompDocEvents.class.getName();
-    private static final String ERR_RESOURCE = "WebappUiLabels";
-
-    /**
-     * @param request
-     * @param response
-     * @return
-     * Creates the topmost Content entity of a Composite Document tree.
-     * Also creates an "empty" Composite Document Instance Content entity.
-     * Creates ContentRevision/Item records for each, as well.
-     */
-
-    public static String persistRootCompDoc(HttpServletRequest request, HttpServletResponse response) {
-        Map<String, Object> paramMap = UtilHttp.getParameterMap(request);
-        Delegator delegator = (Delegator) request.getAttribute("delegator");
-        LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
-        Locale locale = UtilHttp.getLocale(request);
-        HttpSession session = request.getSession();
-        //Security security = (Security)request.getAttribute("security");
-        GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
-        String contentId = (String) paramMap.get("contentId");
-        //String instanceContentId = null;
-
-        if (UtilValidate.isNotEmpty(contentId)) {
-            try {
-                EntityQuery.use(delegator).from("Content").where("contentId", contentId).queryOne();
-            } catch (GenericEntityException e) {
-                Debug.logError(e, "Error running serviceName persistContentAndAssoc", MODULE);
-                String errMsg = UtilProperties.getMessage(ERR_RESOURCE, "coreEvents.error_modelservice_for_srv_name", locale);
-                request.setAttribute("_ERROR_MESSAGE_", "<li>" + errMsg + " [" + "persistContentAndAssoc" + "]: " + e.toString());
-                return "error";
-            }
-        }
-
-        ModelService modelService = null;
-        try {
-            modelService = dispatcher.getDispatchContext().getModelService("persistContentAndAssoc");
-        } catch (GenericServiceException e) {
-            String errMsg = "Error getting model service for serviceName, 'persistContentAndAssoc'. " + e.toString();
-            Debug.logError(errMsg, MODULE);
-            request.setAttribute("_ERROR_MESSAGE_", "<li>" + errMsg + "</li>");
-            return "error";
-        }
-        Map<String, Object> persistMap = modelService.makeValid(paramMap, ModelService.IN_PARAM);
-        persistMap.put("userLogin", userLogin);
-        try {
-            Map<String, Object> persistResult = dispatcher.runSync("persistContentAndAssoc", persistMap);
-            if (ServiceUtil.isError(persistResult)) {
-                String errMsg = "Error running serviceName, 'persistContentAndAssoc'. " + ServiceUtil.getErrorMessage(persistResult);
-                request.setAttribute("_ERROR_MESSAGE_", "<li>" + errMsg + "</li>");
-                Debug.logError(errMsg, MODULE);
-                return "error";
-            }
-            contentId = (String) persistResult.get("contentId");
-            //request.setAttribute("contentId", contentId);
-            for (Entry<String, Object> entry : persistResult.entrySet()) {
-                Object obj = entry.getValue();
-                Object val = persistResult.get(obj);
-                request.setAttribute(obj.toString(), val);
-            }
-            // Update ContentRevision and ContentRevisonItem
-            Map<String, Object> contentRevisionMap = new HashMap<>();
-            contentRevisionMap.put("itemContentId", contentId);
-            contentRevisionMap.put("contentId", contentId);
-            contentRevisionMap.put("userLogin", userLogin);
-            Map<String, Object> result = dispatcher.runSync("persistContentRevisionAndItem", contentRevisionMap);
-            if (ServiceUtil.isError(result)) {
-                String errMsg = "Error running serviceName, 'persistContentRevisionAndItem'. " + ServiceUtil.getErrorMessage(result);
-                request.setAttribute("_ERROR_MESSAGE_", "<li>" + errMsg + "</li>");
-                Debug.logError(errMsg, MODULE);
-                return "error";
-            }
-            for (Entry<String, Object> entry : result.entrySet()) {
-                Object obj = entry.getValue();
-                Object val = result.get(obj);
-                request.setAttribute(obj.toString(), val);
-            }
-        } catch (GenericServiceException e) {
-            String errMsg = "Error running serviceName, 'persistContentAndAssoc'. " + e.toString();
-            Debug.logError(errMsg, MODULE);
-            request.setAttribute("_ERROR_MESSAGE_", "<li>" + errMsg + "</li>");
-            return "error";
-        }
-        return "success";
-    }
-
-    public static String padNumberWithLeadingZeros(Long num, Integer padLen) {
-        String s = UtilFormatOut.formatPaddedNumber(num, padLen);
-        return s;
-    }
-
-    public static String genCompDocPdf(HttpServletRequest request, HttpServletResponse response) {
-        String responseStr = "success";
-        HttpSession session = request.getSession();
-        GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
-        ServletContext servletContext = session.getServletContext();
-        LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
-        Map<String, Object> paramMap = UtilHttp.getParameterMap(request);
-        String contentId = (String) paramMap.get("contentId");
-        Locale locale = UtilHttp.getLocale(request);
-        String webSiteId = WebSiteWorker.getWebSiteId(request);
-
-        String rootDir = servletContext.getRealPath("/");
-        String https = (String) servletContext.getAttribute("https");
-
-        Map<String, Object> mapIn = new HashMap<>();
-        mapIn.put("contentId", contentId);
-        mapIn.put("locale", locale);
-        mapIn.put("rootDir", rootDir);
-        mapIn.put("webSiteId", webSiteId);
-        mapIn.put("https", https);
-        mapIn.put("userLogin", userLogin);
-
-        Map<String, Object> results = null;
-        try {
-            results = dispatcher.runSync("renderCompDocPdf", mapIn);
-            if (ServiceUtil.isError(results)) {
-                String errorMessage = ServiceUtil.getErrorMessage(results);
-                request.setAttribute("_ERROR_MESSAGE_", errorMessage);
-                Debug.logError(errorMessage, MODULE);
-                return "error";
-            }
-        } catch (GenericServiceException e) {
-            request.setAttribute("_ERROR_MESSAGE_", e.toString());
-            return "error";
-        }
-
-        ByteBuffer outByteBuffer = (ByteBuffer) results.get("outByteBuffer");
-
-        // setup content type
-        String contentType = "application/pdf; charset=ISO-8859-1";
-
-        try (ByteArrayInputStream bais = new ByteArrayInputStream(outByteBuffer.array())) {
-            UtilHttp.streamContentToBrowser(response, bais, outByteBuffer.limit(), contentType);
-        } catch (IOException e) {
-            request.setAttribute("_ERROR_MESSAGE_", e.toString());
-            return "error";
-        }
-        return responseStr;
-    }
-    public static String genContentPdf(HttpServletRequest request, HttpServletResponse response) {
-        String responseStr = "success";
-        HttpSession session = request.getSession();
-        GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
-        ServletContext servletContext = session.getServletContext();
-        LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
-        Map<String, Object> paramMap = UtilHttp.getParameterMap(request);
-        String contentId = (String) paramMap.get("contentId");
-        Locale locale = UtilHttp.getLocale(request);
-        String webSiteId = WebSiteWorker.getWebSiteId(request);
-
-        String rootDir = servletContext.getRealPath("/");
-        String https = (String) servletContext.getAttribute("https");
-
-        Map<String, Object> mapIn = new HashMap<>();
-        mapIn.put("contentId", contentId);
-        mapIn.put("locale", locale);
-        mapIn.put("rootDir", rootDir);
-        mapIn.put("webSiteId", webSiteId);
-        mapIn.put("https", https);
-        mapIn.put("userLogin", userLogin);
-
-        Map<String, Object> results = null;
-        try {
-            results = dispatcher.runSync("renderContentPdf", mapIn);
-            if (ServiceUtil.isError(results)) {
-                String errorMessage = ServiceUtil.getErrorMessage(results);
-                request.setAttribute("_ERROR_MESSAGE_", errorMessage);
-                Debug.logError(errorMessage, MODULE);
-                return "error";
-            }
-        } catch (GenericServiceException e) {
-            request.setAttribute("_ERROR_MESSAGE_", e.toString());
-            return "error";
-        }
-
-        ByteBuffer outByteBuffer = (ByteBuffer) results.get("outByteBuffer");
-
-        // setup content type
-        String contentType = "application/pdf; charset=ISO-8859-1";
-
-        try (ByteArrayInputStream bais = new ByteArrayInputStream(outByteBuffer.array())) {
-            UtilHttp.streamContentToBrowser(response, bais, outByteBuffer.limit(), contentType);
-        } catch (IOException e) {
-            request.setAttribute("_ERROR_MESSAGE_", e.toString());
-            return "error";
-        }
-        return responseStr;
-    }
-}
diff --git a/applications/content/src/main/java/org/apache/ofbiz/content/compdoc/CompDocServices.java b/applications/content/src/main/java/org/apache/ofbiz/content/compdoc/CompDocServices.java
deleted file mode 100644
index 6e569d0..0000000
--- a/applications/content/src/main/java/org/apache/ofbiz/content/compdoc/CompDocServices.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *******************************************************************************/
-package org.apache.ofbiz.content.compdoc;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.apache.ofbiz.base.util.Debug;
-import org.apache.ofbiz.base.util.GeneralException;
-import org.apache.ofbiz.base.util.UtilMisc;
-import org.apache.ofbiz.base.util.UtilProperties;
-import org.apache.ofbiz.base.util.UtilValidate;
-import org.apache.ofbiz.content.data.DataResourceWorker;
-import org.apache.ofbiz.entity.Delegator;
-import org.apache.ofbiz.entity.GenericEntityException;
-import org.apache.ofbiz.entity.GenericValue;
-import org.apache.ofbiz.entity.condition.EntityCondition;
-import org.apache.ofbiz.entity.condition.EntityOperator;
-import org.apache.ofbiz.entity.util.EntityQuery;
-import org.apache.ofbiz.service.DispatchContext;
-import org.apache.ofbiz.service.GenericServiceException;
-import org.apache.ofbiz.service.LocalDispatcher;
-import org.apache.ofbiz.service.ModelService;
-import org.apache.ofbiz.service.ServiceUtil;
-import org.apache.ofbiz.webapp.view.ViewHandlerException;
-
-import com.lowagie.text.Document;
-import com.lowagie.text.DocumentException;
-import com.lowagie.text.PageSize;
-import com.lowagie.text.pdf.PdfCopy;
-import com.lowagie.text.pdf.PdfImportedPage;
-import com.lowagie.text.pdf.PdfReader;
-
-/**
- * CompDocEvents Class
- */
-
-public class CompDocServices {
-    private static final String MODULE = CompDocServices.class.getName();
-    private static final String RESOURCE = "ContentUiLabels";
-    private static final String ERR_RESOURCE = "WebappUiLabels";
-
-    /**
-     * Creates the topmost Content entity of a Composite Document tree.
-     * Also creates an "empty" Composite Document Instance Content entity.
-     * Creates ContentRevision/Item records for each, as well.
-     * @param dctx    the dispatch context
-     * @param context the context
-     * @return Creates the topmost Content entity of a Composite Document tree
-     */
-
-    public static Map<String, Object> persistRootCompDoc(DispatchContext dctx, Map<String, ? extends Object> context) {
-        Map<String, Object> result = new HashMap<>();
-        Delegator delegator = dctx.getDelegator();
-        LocalDispatcher dispatcher = dctx.getDispatcher();
-        Locale locale = (Locale) context.get("locale");
-        GenericValue userLogin = (GenericValue) context.get("userLogin");
-        String contentId = (String) context.get("contentId");
-
-        if (UtilValidate.isNotEmpty(contentId)) {
-            try {
-                EntityQuery.use(delegator).from("Content").where("contentId", contentId).queryOne();
-            } catch (GenericEntityException e) {
-                Debug.logError(e, "Error running serviceName persistContentAndAssoc", MODULE);
-                return ServiceUtil.returnError(UtilProperties.getMessage(ERR_RESOURCE, "ContentNoContentFound",
-                        UtilMisc.toMap("contentId", contentId), locale));
-            }
-        }
-
-        ModelService modelService = null;
-        try {
-            modelService = dispatcher.getDispatchContext().getModelService("persistContentAndAssoc");
-        } catch (GenericServiceException e) {
-            Debug.logError("Error getting model service for serviceName, 'persistContentAndAssoc'. " + e.toString(), MODULE);
-            return ServiceUtil.returnError(UtilProperties.getMessage(ERR_RESOURCE, "coreEvents.error_modelservice_for_srv_name", locale));
-        }
-        Map<String, Object> persistMap = modelService.makeValid(context, ModelService.IN_PARAM);
-        persistMap.put("userLogin", userLogin);
-        try {
-            Map<String, Object> persistContentResult = dispatcher.runSync("persistContentAndAssoc", persistMap);
-            if (ServiceUtil.isError(persistContentResult)) {
-                return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentContentCreatingError",
-                        UtilMisc.toMap("serviceName", "persistContentAndAssoc"), locale), null, null, persistContentResult);
-            }
-
-            contentId = (String) persistContentResult.get("contentId");
-            result.putAll(persistContentResult);
-
-            Map<String, Object> contentRevisionMap = new HashMap<>();
-            contentRevisionMap.put("itemContentId", contentId);
-            contentRevisionMap.put("contentId", contentId);
-            contentRevisionMap.put("userLogin", userLogin);
-
-            Map<String, Object> persistRevResult = dispatcher.runSync("persistContentRevisionAndItem", contentRevisionMap);
-            if (ServiceUtil.isError(persistRevResult)) {
-                return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentContentCreatingError",
-                        UtilMisc.toMap("serviceName", "persistContentRevisionAndItem"), locale), null, null, persistRevResult);
-            }
-
-            result.putAll(persistRevResult);
-            return result;
-        } catch (GenericServiceException e) {
-            Debug.logError(e, "Error running serviceName, 'persistContentAndAssoc'. " + e.toString(), MODULE);
-            return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentContentCreatingError",
-                    UtilMisc.toMap("serviceName", "persistContentAndAssoc"), locale) + e.toString());
-        }
-    }
-
-    public static Map<String, Object> renderCompDocPdf(DispatchContext dctx, Map<String, ? extends Object> context) {
-        LocalDispatcher dispatcher = dctx.getDispatcher();
-
-        Locale locale = (Locale) context.get("locale");
-        String rootDir = (String) context.get("rootDir");
-        String webSiteId = (String) context.get("webSiteId");
-        String https = (String) context.get("https");
-
-        Delegator delegator = dctx.getDelegator();
-
-        String contentId = (String) context.get("contentId");
-        String contentRevisionSeqId = (String) context.get("contentRevisionSeqId");
-
-        try {
-            List<EntityCondition> exprList = new LinkedList<>();
-            exprList.add(EntityCondition.makeCondition("contentIdTo", EntityOperator.EQUALS, contentId));
-            exprList.add(EntityCondition.makeCondition("contentAssocTypeId", EntityOperator.EQUALS, "COMPDOC_PART"));
-            exprList.add(EntityCondition.makeCondition("rootRevisionContentId", EntityOperator.EQUALS, contentId));
-            if (UtilValidate.isNotEmpty(contentRevisionSeqId)) {
-                exprList.add(EntityCondition.makeCondition("contentRevisionSeqId", EntityOperator.LESS_THAN_EQUAL_TO, contentRevisionSeqId));
-            }
-
-            List<GenericValue> compDocParts = EntityQuery.use(delegator)
-                    .select("rootRevisionContentId", "itemContentId", "maxRevisionSeqId", "contentId", "dataResourceId", "contentIdTo",
-                            "contentAssocTypeId", "fromDate", "sequenceNum")
-                    .from("ContentAssocRevisionItemView")
-                    .where(exprList)
-                    .orderBy("sequenceNum").filterByDate().queryList();
-
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            Document document = new Document();
-            document.setPageSize(PageSize.LETTER);
-            PdfCopy writer = new PdfCopy(document, baos);
-            document.open();
-            for (GenericValue contentAssocRevisionItemView : compDocParts) {
-                String thisDataResourceId = contentAssocRevisionItemView.getString("dataResourceId");
-                GenericValue dataResource = EntityQuery.use(delegator).from("DataResource").where("dataResourceId", thisDataResourceId).queryOne();
-                String inputMimeType = null;
-                if (dataResource != null) {
-                    inputMimeType = dataResource.getString("mimeTypeId");
-                }
-                byte[] inputByteArray = null;
-                PdfReader reader = null;
-                if (inputMimeType != null && "application/pdf".equals(inputMimeType)) {
-                    ByteBuffer byteBuffer = DataResourceWorker.getContentAsByteBuffer(delegator, thisDataResourceId, https, webSiteId, locale,
-                            rootDir);
-                    inputByteArray = byteBuffer.array();
-                    reader = new PdfReader(inputByteArray);
-                } else if (inputMimeType != null && "text/html".equals(inputMimeType)) {
-                    ByteBuffer byteBuffer = DataResourceWorker.getContentAsByteBuffer(delegator, thisDataResourceId, https, webSiteId, locale,
-                            rootDir);
-                    inputByteArray = byteBuffer.array();
-                    String s = new String(inputByteArray, "UTF-8");
-                    Debug.logInfo("text/html string:" + s, MODULE);
-                    continue;
-                } else if (inputMimeType != null && "application/vnd.ofbiz.survey.response".equals(inputMimeType)) {
-                    String surveyResponseId = dataResource.getString("relatedDetailId");
-                    String surveyId = null;
-                    String acroFormContentId = null;
-                    GenericValue surveyResponse = null;
-                    if (UtilValidate.isNotEmpty(surveyResponseId)) {
-                        surveyResponse = EntityQuery.use(delegator).from("SurveyResponse").where("surveyResponseId", surveyResponseId).queryOne();
-                        if (surveyResponse != null) {
-                            surveyId = surveyResponse.getString("surveyId");
-                        }
-                    }
-                    if (UtilValidate.isNotEmpty(surveyId)) {
-                        GenericValue survey = EntityQuery.use(delegator).from("Survey").where("surveyId", surveyId).queryOne();
-                        if (survey != null) {
-                            acroFormContentId = survey.getString("acroFormContentId");
-                            if (UtilValidate.isNotEmpty(acroFormContentId)) {
-                                // TODO: is something supposed to be done here? Adding loginfo to avoid checkstyle
-                                Debug.logInfo("AcroFormContentId:" + acroFormContentId, MODULE);
-                            }
-                        }
-                    }
-                    if (surveyResponse != null) {
-                        if (UtilValidate.isEmpty(acroFormContentId)) {
-                            // Create AcroForm PDF
-                            Map<String, Object> survey2PdfResults = dispatcher.runSync("buildPdfFromSurveyResponse",
-                                    UtilMisc.toMap("surveyResponseId", surveyId));
-                            if (ServiceUtil.isError(survey2PdfResults)) {
-                                return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentSurveyErrorBuildingPDF", locale),
-                                        null, null, survey2PdfResults);
-                            }
-
-                            ByteBuffer outByteBuffer = (ByteBuffer) survey2PdfResults.get("outByteBuffer");
-                            inputByteArray = outByteBuffer.array();
-                            reader = new PdfReader(inputByteArray);
-                        } else {
-                            // Fill in acroForm
-                            Map<String, Object> survey2AcroFieldResults = dispatcher.runSync("setAcroFieldsFromSurveyResponse",
-                                    UtilMisc.toMap("surveyResponseId", surveyResponseId));
-                            if (ServiceUtil.isError(survey2AcroFieldResults)) {
-                                return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentSurveyErrorSettingAcroFields", locale),
-                                        null, null, survey2AcroFieldResults);
-                            }
-
-                            ByteBuffer outByteBuffer = (ByteBuffer) survey2AcroFieldResults.get("outByteBuffer");
-                            inputByteArray = outByteBuffer.array();
-                            reader = new PdfReader(inputByteArray);
-                        }
-                    }
-                } else {
-                    return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentMimeTypeNotSupported", locale));
-                }
-                if (reader != null) {
-                    int n = reader.getNumberOfPages();
-                    for (int i = 0; i < n; i++) {
-                        PdfImportedPage pg = writer.getImportedPage(reader, i + 1);
-                        writer.addPage(pg);
-                    }
-                }
-            }
-            document.close();
-            ByteBuffer outByteBuffer = ByteBuffer.wrap(baos.toByteArray());
-
-            Map<String, Object> results = ServiceUtil.returnSuccess();
-            results.put("outByteBuffer", outByteBuffer);
-            return results;
-        } catch (GenericEntityException e) {
-            return ServiceUtil.returnError(e.toString());
-        } catch (IOException | DocumentException | GeneralException e) {
-            Debug.logError(e, "Error in CompDoc operation: ", MODULE);
-            return ServiceUtil.returnError(e.toString());
-        }
-    }
-
-    public static Map<String, Object> renderContentPdf(DispatchContext dctx, Map<String, ? extends Object> context) {
-        LocalDispatcher dispatcher = dctx.getDispatcher();
-        Map<String, Object> results = ServiceUtil.returnSuccess();
-        String dataResourceId = null;
-
-        Locale locale = (Locale) context.get("locale");
-        String rootDir = (String) context.get("rootDir");
-        String webSiteId = (String) context.get("webSiteId");
-        String https = (String) context.get("https");
-
-        Delegator delegator = dctx.getDelegator();
-
-        String contentId = (String) context.get("contentId");
-        String contentRevisionSeqId = (String) context.get("contentRevisionSeqId");
-
-        try {
-            Document document = new Document();
-            document.setPageSize(PageSize.LETTER);
-            document.open();
-
-            GenericValue dataResource = null;
-            if (UtilValidate.isEmpty(contentRevisionSeqId)) {
-                GenericValue content = EntityQuery.use(delegator).from("Content").where("contentId", contentId).cache().queryOne();
-                dataResourceId = content.getString("dataResourceId");
-                Debug.logInfo("SCVH(0b)- dataResourceId:" + dataResourceId, MODULE);
-                dataResource = EntityQuery.use(delegator).from("DataResource").where("dataResourceId", dataResourceId).queryOne();
-            } else {
-                GenericValue contentRevisionItem = EntityQuery.use(delegator).from("ContentRevisionItem").where("contentId", contentId,
-                        "itemContentId", contentId, "contentRevisionSeqId", contentRevisionSeqId).cache().queryOne();
-                if (contentRevisionItem == null) {
-                    throw new ViewHandlerException("ContentRevisionItem record not found for contentId=" + contentId
-                            + ", contentRevisionSeqId=" + contentRevisionSeqId + ", itemContentId=" + contentId);
-                }
-                Debug.logInfo("SCVH(1)- contentRevisionItem:" + contentRevisionItem, MODULE);
-                Debug.logInfo("SCVH(2)-contentId=" + contentId
-                        + ", contentRevisionSeqId=" + contentRevisionSeqId + ", itemContentId=" + contentId, MODULE);
-                dataResourceId = contentRevisionItem.getString("newDataResourceId");
-                Debug.logInfo("SCVH(3)- dataResourceId:" + dataResourceId, MODULE);
-                dataResource = EntityQuery.use(delegator).from("DataResource").where("dataResourceId", dataResourceId).queryOne();
-            }
-            String inputMimeType = null;
-            if (dataResource != null) {
-                inputMimeType = dataResource.getString("mimeTypeId");
-            }
-            byte[] inputByteArray = null;
-            if (inputMimeType != null && "application/pdf".equals(inputMimeType)) {
-                ByteBuffer byteBuffer = DataResourceWorker.getContentAsByteBuffer(delegator, dataResourceId, https, webSiteId, locale, rootDir);
-                inputByteArray = byteBuffer.array();
-            } else if (inputMimeType != null && "text/html".equals(inputMimeType)) {
-                ByteBuffer byteBuffer = DataResourceWorker.getContentAsByteBuffer(delegator, dataResourceId, https, webSiteId, locale, rootDir);
-                inputByteArray = byteBuffer.array();
-                String s = new String(inputByteArray, "UTF-8");
-                Debug.logInfo("text/html string:" + s, MODULE);
-            } else if (inputMimeType != null && "application/vnd.ofbiz.survey.response".equals(inputMimeType)) {
-                String surveyResponseId = dataResource.getString("relatedDetailId");
-                String surveyId = null;
-                String acroFormContentId = null;
-                GenericValue surveyResponse = null;
-                if (UtilValidate.isNotEmpty(surveyResponseId)) {
-                    surveyResponse = EntityQuery.use(delegator).from("SurveyResponse").where("surveyResponseId", surveyResponseId).queryOne();
-                    if (surveyResponse != null) {
-                        surveyId = surveyResponse.getString("surveyId");
-                    }
-                }
-                if (UtilValidate.isNotEmpty(surveyId)) {
-                    GenericValue survey = EntityQuery.use(delegator).from("Survey").where("surveyId", surveyId).queryOne();
-                    if (survey != null) {
-                        acroFormContentId = survey.getString("acroFormContentId");
-                        if (UtilValidate.isNotEmpty(acroFormContentId)) {
-                            // TODO: is something supposed to be done here? Adding loginfo to avoid checkstyle
-                            Debug.logInfo("AcroFormContentId:" + acroFormContentId, MODULE);
-                        }
-                    }
-                }
-
-                if (surveyResponse != null) {
-                    if (UtilValidate.isEmpty(acroFormContentId)) {
-                        // Create AcroForm PDF
-                        Map<String, Object> survey2PdfResults = dispatcher.runSync("buildPdfFromSurveyResponse",
-                                UtilMisc.toMap("surveyResponseId", surveyResponseId));
-                        if (ServiceUtil.isError(survey2PdfResults)) {
-                            return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentSurveyErrorBuildingPDF", locale), null,
-                                    null, survey2PdfResults);
-                        }
-
-                        ByteBuffer outByteBuffer = (ByteBuffer) survey2PdfResults.get("outByteBuffer");
-                        inputByteArray = outByteBuffer.array();
-                    } else {
-                        // Fill in acroForm
-                        Map<String, Object> survey2AcroFieldResults = dispatcher.runSync("setAcroFieldsFromSurveyResponse",
-                                UtilMisc.toMap("surveyResponseId", surveyResponseId));
-                        if (ServiceUtil.isError(survey2AcroFieldResults)) {
-                            return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentSurveyErrorSettingAcroFields", locale), null,
-                                    null, survey2AcroFieldResults);
-                        }
-
-                        ByteBuffer outByteBuffer = (ByteBuffer) survey2AcroFieldResults.get("outByteBuffer");
-                        inputByteArray = outByteBuffer.array();
-                    }
-                }
-            } else {
-                return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentMimeTypeNotSupported", locale));
-            }
-
-            if (inputByteArray == null) {
-                Debug.logError("Error in PDF generation: ", MODULE);
-                return ServiceUtil.returnError("The array used to create outByteBuffer is still declared null");
-            }
-            ByteBuffer outByteBuffer = ByteBuffer.wrap(inputByteArray);
-            results.put("outByteBuffer", outByteBuffer);
-        } catch (GenericEntityException e) {
-            return ServiceUtil.returnError(e.toString());
-        } catch (IOException | GeneralException e) {
-            Debug.logError(e, "Error in PDF generation: ", MODULE);
-            return ServiceUtil.returnError(e.toString());
-        }
-        return results;
-    }
-}
diff --git a/applications/content/webapp/content/WEB-INF/controller.xml b/applications/content/webapp/content/WEB-INF/controller.xml
index 468cfbd..7d3c4f8 100644
--- a/applications/content/webapp/content/WEB-INF/controller.xml
+++ b/applications/content/webapp/content/WEB-INF/controller.xml
@@ -1168,140 +1168,6 @@ under the License.
         <response name="error" type="view" value="EditContentWorkEfforts"/>
     </request-map>
 
-    <!-- ================ CompDoc Requests ================= -->
-    <request-map uri="FindCompDoc"><security auth="true" https="true"/><response name="success" type="view" value="FindCompDoc"/></request-map>
-    <!-- combined with FindCompDoc: <request-map uri="ListCompDoc"><security auth="true" https="true"/><response name="success" type="view" value="ListCompDoc"/></request-map> -->
-    <request-map uri="EditRootCompDoc"><security auth="true" https="true"/><response name="success" type="view" value="EditRootCompDoc"/></request-map>
-    <request-map uri="EditChildCompDoc"><security auth="true" https="true"/><response name="success" type="view" value="EditChildCompDoc"/></request-map>
-    <request-map uri="ViewCompDocTemplateTree"><security auth="true" https="true"/><response name="success" type="view" value="ViewCompDocTemplateTree"/></request-map>
-    <request-map uri="ViewCompDocInstanceTree"><security auth="true" https="true"/><response name="success" type="view" value="ViewCompDocInstanceTree"/></request-map>
-
-    <request-map uri="AddRootCompDocInstance"><security auth="true" https="true"/><response name="success" type="view" value="AddRootCompDocInstance"/></request-map>
-    <request-map uri="AddRootCompDocTemplate"><security auth="true" https="true"/><response name="success" type="view" value="AddRootCompDocTemplate"/></request-map>
-    <request-map uri="ViewInstances"><security auth="true" https="true"/><response name="success" type="view" value="ViewInstances"/></request-map>
-
-    <request-map uri="AddChildCompDocInstance"><security auth="true" https="true"/><response name="success" type="view" value="AddChildCompDocInstance"/></request-map>
-    <request-map uri="AddChildCompDocTemplate"><security auth="true" https="true"/><response name="success" type="view" value="AddChildCompDocTemplate"/></request-map>
-    <request-map uri="ViewCompDocContentBinary"><security auth="true" https="true"/><response name="success" type="view" value="ViewCompDocContentBinary"/></request-map>
-
-    <request-map uri="createCompDocTemplate">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="persistContentAndAssoc" path=""/>
-        <response name="success" type="view" value="EditRootCompDoc"/>
-        <response name="error" type="view" value="EditRootCompDoc"/>
-    </request-map>
-    <request-map uri="updateCompDoc">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="persistContentAndAssoc" path=""/>
-        <response name="success" type="view" value="EditChildCompDoc"/>
-        <response name="error" type="view" value="EditChildCompDoc"/>
-    </request-map>
-    <request-map uri="persistCompDocPdf2Survey">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="persistCompDocPdf2Survey" path=""/>
-        <response name="success" type="view" value="EditChildCompDoc"/>
-        <response name="error" type="view" value="EditChildCompDoc"/>
-    </request-map>
-    <request-map uri="createCompDoc">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="persistContentAndAssoc"  path=""/>
-        <response name="success" type="view" value="EditChildCompDoc"/>
-        <response name="error" type="view" value="EditChildCompDoc"/>
-    </request-map>
-    <request-map uri="updateRootCompDocTemplate">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="persistCompDoc"  path=""/>
-        <response name="success" type="view" value="EditRootCompDoc"/>
-        <response name="error" type="view" value="EditRootCompDoc"/>
-    </request-map>
-    <request-map uri="createRootCompDocTemplate">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="persistCompDoc"  path=""/>
-        <response name="success" type="view" value="EditRootCompDoc"/>
-        <response name="error" type="view" value="AddRootCompDocTemplate"/>
-    </request-map>
-    <request-map uri="createChildCompDocTemplate">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="persistCompDoc"  path=""/>
-        <response name="success" type="view" value="EditChildCompDoc"/>
-        <response name="error" type="view" value="AddChildCompDocTemplate"/>
-    </request-map>
-    <request-map uri="createChildCompDocInstance">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="persistCompDoc"  path=""/>
-        <response name="success" type="view" value="EditChildCompDoc"/>
-        <response name="error" type="view" value="AddChildCompDocInstance"/>
-    </request-map>
-    <request-map uri="updateChildCompDocTemplate">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="persistCompDoc"  path=""/>
-        <response name="success" type="view" value="EditChildCompDoc"/>
-        <response name="error" type="view" value="EditChildCompDoc"/>
-    </request-map>
-    <request-map uri="uploadCompDocContent">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="persistCompDocContent"  path=""/>
-        <response name="success" type="view" value="EditChildCompDoc"/>
-        <response name="error" type="view" value="EditChildCompDoc"/>
-    </request-map>
-    <request-map uri="ViewCompDocContent">
-        <security auth="true" https="true"/>
-        <response name="success" type="view" value="ViewCompDocContent"/>
-    </request-map>
-    <request-map uri="updateChildCompDocInstance">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="persistCompDoc"  path=""/>
-        <response name="success" type="view" value="EditChildCompDoc"/>
-        <response name="error" type="view" value="EditChildCompDoc"/>
-    </request-map>
-    <request-map uri="genCompDocInstance">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="genCompDocInstance"  path=""/>
-        <response name="success" type="view" value="EditRootCompDoc"/>
-        <response name="error" type="view" value="AddRootCompDocInstance"/>
-    </request-map>
-
-    <request-map uri="resequenceCompDocPart">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="resequence"  path=""/>
-        <response name="success" type="view" value="ViewCompDocTemplateTree"/>
-        <response name="error" type="view" value="ViewCompDocTemplateTree"/>
-    </request-map>
-
-    <request-map uri="GenCompDocPdf">
-        <security auth="true" https="true"/>
-        <event type="java" invoke="genCompDocPdf"  path="org.apache.ofbiz.content.compdoc.CompDocEvents"/>
-        <response name="success" type="none" value=""/>
-        <response name="error" type="view" value="error"/>
-    </request-map>
-    <request-map uri="GenContentPdf">
-        <security auth="true" https="true"/>
-        <event type="java" invoke="genContentPdf"  path="org.apache.ofbiz.content.compdoc.CompDocEvents"/>
-        <response name="success" type="none" value=""/>
-        <response name="error" type="view" value="error"/>
-    </request-map>
-    <!-- ================ CompDoc ContentRole Requests ================= -->
-    <request-map uri="EditCompDocContentRole"><security auth="true" https="true"/><response name="success" type="view" value="EditCompDocContentRole"/></request-map>
-    <request-map uri="addCompDocContentRole">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="createContentRole" path=""/>
-        <response name="success" type="view" value="EditCompDocContentRole"/>
-        <response name="error" type="view" value="EditCompDocContentRole"/>
-    </request-map>
-    <request-map uri="updateCompDocContentRole">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="updateContentRole" path=""/>
-        <response name="success" type="view" value="EditCompDocContentRole"/>
-        <response name="error" type="view" value="EditCompDocContentRole"/>
-    </request-map>
-    <request-map uri="removeCompDocContentRole">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="removeContentRole" path=""/>
-        <response name="success" type="view" value="EditCompDocContentRole"/>
-        <response name="error" type="view" value="EditCompDocContentRole"/>
-    </request-map>
-
-
     <!-- ================ ContentApproval Requests ================= -->
     <request-map uri="ListContentApproval"><security auth="true" https="true"/><response name="success" type="view" value="ListContentApproval"/></request-map>
     <request-map uri="ListWaitingContentApproval"><security auth="true" https="true"/><response name="success" type="view" value="ListWaitingContentApproval"/></request-map>
@@ -1337,13 +1203,6 @@ under the License.
         <response name="error" type="view" value="ListContentApproval"/>
     </request-map>
 
-    <request-map uri="prepForApproval">
-        <security auth="true" https="true"/>
-        <event type="service" invoke="prepForApproval" path=""/>
-        <response name="success" type="view" value="ViewCompDocInstanceTree"/>
-        <response name="error" type="view" value="ViewCompDocInstanceTree"/>
-    </request-map>
-
     <!-- ================ ContentRevision Requests ================= -->
     <request-map uri="ListContentRevisions"><security auth="true" https="true"/><response name="success" type="view" value="ListContentRevisions"/></request-map>
     <request-map uri="EditContentRevision"><security auth="true" https="true"/><response name="success" type="view" value="EditContentRevision"/></request-map>
@@ -1752,7 +1611,6 @@ under the License.
         <response name="error" type="view" value="EditAddContent"/>
     </request-map>
 
-    <!-- ================ CompDoc Requests ================= -->
     <!-- ================ SimpleContent Requests ================= -->
 
     <request-map uri="ViewSimpleContent">
@@ -2079,32 +1937,6 @@ under the License.
     <view-map name="EditAddContent" type="screen" page="component://content/widget/cms/CMSScreens.xml#EditAddContent"/>
     <view-map name="EditAddSubContent" type="screen" page="component://content/widget/cms/CMSScreens.xml#EditAddSubContent"/>
 
-    <view-map name="ListContentRevisions" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#ListContentRevisions"/>
-    <view-map name="EditContentRevision" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#EditContentRevision"/>
-    <view-map name="ListContentRevisionItem" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#ListContentRevisionItem"/>
-    <view-map name="EditContentRevisionItem" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#EditContentRevisionItem"/>
-    <view-map name="ListContentApproval" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#ListContentApproval"/>
-    <view-map name="ListWaitingContentApproval" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#ListWaitingContentApproval"/>
-    <view-map name="EditContentApproval" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#EditContentApproval"/>
-
-    <view-map name="FindCompDoc" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#FindCompDoc"/>
-    <!-- combined with FindCompDoc: <view-map name="ListCompDoc" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#ListCompDoc"/> -->
-    <view-map name="EditRootCompDoc" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#EditRootCompDoc"/>
-    <view-map name="EditChildCompDoc" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#EditChildCompDoc"/>
-
-    <view-map name="AddChildCompDocInstance" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#AddChildCompDocInstance"/>
-    <view-map name="AddChildCompDocTemplate" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#AddChildCompDocTemplate"/>
-
-    <view-map name="AddRootCompDocInstance" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#AddRootCompDocInstance"/>
-    <view-map name="AddRootCompDocTemplate" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#AddRootCompDocTemplate"/>
-
-    <view-map name="ViewCompDocTemplateTree" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#ViewCompDocTemplateTree"/>
-    <view-map name="ViewCompDocInstanceTree" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#ViewCompDocInstanceTree"/>
-    <view-map name="EditCompDocContentRole" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#EditCompDocContentRole"/>
-    <view-map name="ViewInstances" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#ViewInstances"/>
-    <view-map name="ViewCompDocContentBinary" page="" type="simplecontent"/>
-    <view-map name="ViewBinaryDataResource" page="" type="simplecontent"/>
-    <view-map name="ViewCompDocContent" type="screen" page="component://content/widget/compdoc/CompDocScreens.xml#ViewCompDocContent"/>
 
     <view-map name="ViewSimpleContent" page="" type="simplecontent"/>
 
diff --git a/applications/content/widget/CommonScreens.xml b/applications/content/widget/CommonScreens.xml
index 423a6f8..85a91fe 100644
--- a/applications/content/widget/CommonScreens.xml
+++ b/applications/content/widget/CommonScreens.xml
@@ -232,29 +232,6 @@ under the License.
         </section>
     </screen>
 
-    <screen name="commonCompDocDecorator">
-        <section>
-            <actions>
-                <set field="headerItem" value="CompDoc"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="main-decorator">
-                    <decorator-section name="pre-body">
-                        <include-menu name="${menuName}" location="component://content/widget/compdoc/CompDocMenus.xml"/>
-                    </decorator-section>
-                    <decorator-section name="body">
-                        <label text="${title}" style="h1"/>
-                        <container style="button-bar">
-                            <link target="AddRootCompDocTemplate" text="${uiLabelMap.PageTitleCreateNewRootCompDocTemplate}" style="buttontext create"/>
-                            <link target="ListWaitingContentApproval" text="${uiLabelMap.ContentCompDocViewWaitingApprovals}" style="buttontext"/>
-                        </container>
-                        <decorator-section-include name="body"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-
     <screen name="commonContentSetupDecorator">
         <section>
             <actions>
diff --git a/applications/content/widget/SurveyScreens.xml b/applications/content/widget/SurveyScreens.xml
index 2477326..7583d60 100644
--- a/applications/content/widget/SurveyScreens.xml
+++ b/applications/content/widget/SurveyScreens.xml
@@ -339,16 +339,6 @@ under the License.
                             </link>
                         </container>
                         <screenlet title="${uiLabelMap.PageTitleViewSurveyResponses} ${uiLabelMap.ContentSurveySurveyId} ${surveyId}">
-                            <section>
-                                <condition><not><if-empty field="parameters.rootContentId"/></not></condition>
-                                <widgets>
-                                    <container>
-                                        <link text="${uiLabelMap.ContentCompDocGoBack} [${parameters.rootContentId}]" target="ViewCompDocInstanceTree" style="buttontext">
-                                            <parameter param-name="rootContentId" from-field="parameters.rootContentId"/>
-                                        </link>
-                                    </container>
-                                </widgets>
-                            </section>
                             <platform-specific><html><html-template location="component://content/template/survey/ViewSurveyResponses.ftl"/></html></platform-specific>
                         </screenlet>
                     </decorator-section>
diff --git a/applications/content/widget/compdoc/CompDocForms.xml b/applications/content/widget/compdoc/CompDocForms.xml
deleted file mode 100644
index a8ef188..0000000
--- a/applications/content/widget/compdoc/CompDocForms.xml
+++ /dev/null
@@ -1,597 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
-
-    <!-- CompDoc forms -->
-    <form name="FindCompDoc" default-entity-name="Content" target="FindCompDoc" title="" type="single"
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="contentId" map-name="empty"><text-find/></field>
-        <field name="contentName"><text-find/></field>
-        <field name="contentTypeId">
-            <drop-down no-current-selected-key="COMPDOC_TEMPLATE">
-                <option key="COMPDOC_TEMPLATE" description="${uiLabelMap.ContentTemplateRoot}"/>
-                <option key="COMPDOC_INSTANCE" description="${uiLabelMap.ContentTemplateRootInstance}"/>
-                <option key="TEMPLATE" description="${uiLabelMap.ContentTemplateChild}"/>
-                <option key="DOCUMENT" description="${uiLabelMap.ContentTemplateInstanceChild}"/>
-            </drop-down>
-        </field>
-        <!-- <field name="rootonly" map-name="dummy" title="Root CompDocs Only"><check/></field> -->
-        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
-        <field name="submitButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field>
-    </form>
-    <form name="ListCompDoc" type="list" list-name="listIt" target="" paginate-target="FindCompDoc"
-        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
-        <actions>
-            <service service-name="performFind" result-map="results" result-map-list="listIt">
-                <field-map field-name="inputFields" from-field="parameters"/>
-                <field-map field-name="entityName" value="Content"/>
-                <field-map field-name="viewIndex" from-field="viewIndex"/>
-                <field-map field-name="viewSize" from-field="viewSize"/>
-            </service>
-        </actions>
-        <field name="contentId"><display/></field>
-        <field name="contentTypeId"><display/></field>
-        <field name="contentName"><display/></field>
-        <field name="edit" use-when="&quot;COMPDOC_TEMPLATE&quot;.equals(contentTypeId)" widget-style="buttontext">
-           <hyperlink description="${uiLabelMap.CommonEdit}" target="EditRootCompDoc" also-hidden="false">
-                <parameter param-name="contentId"/>
-                <parameter param-name="rootContentId" from-field="caContentIdTo"/>
-                <parameter param-name="caContentAssocTypeId"/>
-                <parameter param-name="caFromDate"/>
-            </hyperlink>
-        </field>
-        <field name="edit" use-when="&quot;COMPDOC_INSTANCE&quot;.equals(contentTypeId)" widget-style="buttontext">
-           <hyperlink description="${uiLabelMap.CommonEdit}" target="EditRootCompDoc" also-hidden="false">
-                <parameter param-name="contentId"/>
-                <parameter param-name="rootContentId" from-field="caContentIdTo"/>
-                <parameter param-name="caContentAssocTypeId"/>
-                <parameter param-name="caFromDate"/>
-            </hyperlink>
-        </field>
-        <field name="edit" use-when="&quot;TEMPLATE&quot;.equals(contentTypeId)" widget-style="buttontext">
-           <hyperlink description="${uiLabelMap.CommonEdit}" target="EditChildCompDoc" also-hidden="false">
-                <parameter param-name="contentId"/>
-                <parameter param-name="rootContentId" from-field="caContentIdTo"/>
-                <parameter param-name="caContentAssocTypeId"/>
-                <parameter param-name="caFromDate"/>
-            </hyperlink>
-        </field>
-        <field name="edit" use-when="&quot;DOCUMENT&quot;.equals(contentTypeId)" widget-style="buttontext">
-           <hyperlink description="${uiLabelMap.CommonEdit}" target="EditChildCompDoc" also-hidden="false">
-                <parameter param-name="contentId"/>
-                <parameter param-name="rootContentId" from-field="caContentIdTo"/>
-                <parameter param-name="caContentAssocTypeId"/>
-                <parameter param-name="caFromDate"/>
-            </hyperlink>
-        </field>
-        <field name="tree" use-when="&quot;COMPDOC_TEMPLATE&quot;.equals(contentTypeId)" widget-style="buttontext">
-            <hyperlink description="${uiLabelMap.ContentTree}" target="ViewCompDocTemplateTree" also-hidden="false">
-                <parameter param-name="rootContentId" from-field="contentId"/>
-            </hyperlink>
-        </field>
-        <field name="tree" use-when="&quot;COMPDOC_INSTANCE&quot;.equals(contentTypeId)" widget-style="buttontext">
-            <hyperlink description="${uiLabelMap.ContentTree}" target="ViewCompDocInstanceTree" also-hidden="false">
-                <parameter param-name="rootContentId" from-field="contentId"/>
-            </hyperlink>
-        </field>
-    </form>
-
-    <form name="ListCompDocInstances" target="" type="list" list-name="compDocFindList" paginate-target="ListCompDocInstances"
-        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
-        <field name="contentId"><display/></field>
-        <field name="contentName"><display/></field>
-        <field name="rootContentId" title="${uiLabelMap.FormFieldTitle_contentIdTo}"><display/></field>
-        <field name="caContentAssocTypeId" title="${uiLabelMap.FormFieldTitle_contentAssocTypeId}"><display/></field>
-        <field name="caFromDate" title="${uiLabelMap.CommonFromDate}"><display/></field>
-        <field name="caThruDate"><hidden/></field>
-        <field name="editTemplate" title="${uiLabelMap.CommonEdit}" widget-style="buttontext">
-           <hyperlink description="${uiLabelMap.CommonEdit}" target="EditRootCompDoc" also-hidden="false">
-                <parameter param-name="rootContentId" from-field="contentId"/>
-            </hyperlink>
-        </field>
-        <field name="templateTree" widget-style="buttontext">
-            <hyperlink description="${uiLabelMap.ContentTree}" target="ViewCompDocInstanceTree" also-hidden="false">
-                <parameter param-name="rootContentId" from-field="contentId"/>
-            </hyperlink>
-        </field>
-    </form>
-
-    <!-- ContentRevision forms -->
-    <form name="EditContentRevision" default-map-name="contentRevision" target="updateContentRevision" type="single"
-        header-row-style="header-row" default-table-style="basic-table">
-        <alt-target target="createContentRevision" use-when="contentRevision==null"/>
-        <auto-fields-entity entity-name="ContentRevision"/>
-
-        <field name="rootContentId" map-name="empty" widget-style="buttontext"><hidden/></field>
-        <field name="rootContentRevisionSeqId"  map-name="empty" widget-style="buttontext"><hidden/></field>
-        <field name="contentId" widget-style="buttontext"><lookup target-form-name="LookupContent"/></field>
-        <field name="contentRevisionSeqId" widget-style="inputBox"><text/></field>
-<!--         <field name="contentRevisionSeqId">
-            <drop-down allow-empty="true">
-                <entity-options entity-name="" key-field-name="contentRevisionSeqId"/>
-            </drop-down>
-        </field>
--->
-        <field name="committedByPartyId" widget-style="inputBox"><text/></field>
-        <field name="comments" widget-style="inputBox"><text/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit/></field>
-    </form>
-
-    <form name="ListContentRevisions" list-name="contentRevisionList" type="list"
-        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
-        <field name="contentId"><display/></field>
-        <field name="contentRevisionSeqId"><display/></field>
-        <field name="committedByPartyId"><display/></field>
-        <field name="comments"><display/></field>
-        <field name="editLink" title=" " widget-style="buttontext">
-            <hyperlink description="${uiLabelMap.CommonEdit}" target="EditContentRevision" also-hidden="false">
-                <parameter param-name="contentId"/>
-                <parameter param-name="contentRevisionSeqId"/>
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-            </hyperlink>
-        </field>
-        <field name="itemLink" title=" " widget-style="buttontext">
-            <hyperlink description="${uiLabelMap.CommonItems}" target="ListContentRevisionItem" also-hidden="false">
-                <parameter param-name="contentId"/>
-                <parameter param-name="contentRevisionSeqId"/>
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-            </hyperlink>
-        </field>
-        <field name="create" title=" " widget-style="buttontext">
-            <hyperlink description="${uiLabelMap.CommonCreate}" target="EditContentRevision" also-hidden="false">
-                <parameter param-name="contentId"/>
-                <parameter param-name="contentRevisionSeqId"/>
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-            </hyperlink>
-        </field>
-        <field name="tree" title=" " widget-style="buttontext" use-when="&quot;COMPDOC_INSTANCE&quot;.equals(contentTypeId)">
-            <hyperlink description="${uiLabelMap.ContentTree}" target="ViewCompDocInstanceTree" also-hidden="false">
-                <parameter param-name="rootContentId" from-field="contentId"/>
-                <parameter param-name="rootContentRevisionSeqId" from-field="contentRevisionSeqId"/>
-            </hyperlink>
-        </field>
-        <field name="tree" title=" " widget-style="buttontext" use-when="&quot;COMPDOC_TEMPLATE&quot;.equals(contentTypeId)">
-            <hyperlink description="${uiLabelMap.ContentTree}" target="ViewCompDocTemplateTree" also-hidden="false">
-                <parameter param-name="rootContentId" from-field="contentId"/>
-                <parameter param-name="rootContentRevisionSeqId" from-field="contentRevisionSeqId"/>
-            </hyperlink>
-        </field>
-    </form>
-
-    <!-- ContentRevisionItem forms -->
-    <form name="EditContentRevisionItem" default-map-name="contentRevisionItem" target="updateContentRevisionItem" type="single"
-        header-row-style="header-row" default-table-style="basic-table">
-        <alt-target target="createContentRevisionItem" use-when="contentRevisionItem==null"/>
-        <auto-fields-entity entity-name="ContentRevisionItem"/>
-
-        <field name="rootContentId" map-name="empty" widget-style="buttontext"><hidden/></field>
-        <field name="rootContentRevisionSeqId"  map-name="empty" widget-style="buttontext"><hidden/></field>
-        <field name="contentId" widget-style="buttontext"><lookup target-form-name="LookupContent"/></field>
-        <field name="contentRevisionSeqId" widget-style="inputBox"><text/></field>
-        <field name="itemContentId" widget-style="inputBox"><text/></field>
-        <field name="oldDataResourceId" widget-style="inputBox"><text/></field>
-        <field name="newDataResourceId" widget-style="inputBox"><text/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit/></field>
-    </form>
-
-    <form name="ListContentRevisionItem" list-name="contentRevisionItemList" type="list"
-        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
-        <field name="contentId"><display/></field>
-        <field name="contentRevisionSeqId"><display/></field>
-        <field name="itemContentId"><display/></field>
-        <field name="oldDataResourceId"><display/></field>
-        <field name="newDataResourceId"><display/></field>
-        <field name="editLink" title=" " widget-style="buttontext">
-            <hyperlink description="${uiLabelMap.CommonEdit}" target="EditContentRevisionItem" also-hidden="false">
-                <parameter param-name="contentId"/>
-                <parameter param-name="contentRevisionSeqId"/>
-                <parameter param-name="itemContentId"/>
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-            </hyperlink>
-        </field>
-        <field name="create" title=" " widget-style="buttontext">
-            <hyperlink description="${uiLabelMap.CommonCreate}" target="EditContentRevisionItem" also-hidden="false">
-                <parameter param-name="contentId"/>
-                <parameter param-name="contentRevisionSeqId"/>
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-            </hyperlink>
-        </field>
-    </form>
-
-    <!-- ContentApproval forms -->
-    <form name="EditContentApproval" default-map-name="contentApproval" target="updateContentApproval" type="single"
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="contentApprovalId"><display/></field>
-        <field name="contentId" widget-style="inputBox"><hidden/></field>
-        <field name="contentRevisionSeqId" widget-style="inputBox"><text></text></field>
-        <field name="partyId" widget-style="inputBox"><lookup target-form-name="LookupPartyName"/></field>
-        <field name="roleTypeId">
-            <drop-down allow-empty="true">
-                <entity-options entity-name="RoleType" key-field-name="roleTypeId">
-                    <!-- <entity-constraint name="parentTypeId" value=""/> -->
-                    <entity-order-by field-name="description"/>
-                </entity-options>
-            </drop-down>
-        </field>
-        <field name="approvalStatusId" use-when="&quot;COMPDOC_INSTANCE&quot;.equals(contentTypeId)">
-            <drop-down allow-empty="true">
-                <option key="SOFT_REJ" description="${uiLabelMap.ContentSoftRejected}"/>
-                <option key="REJECTED" description="${uiLabelMap.ContentRejected}"/>
-                <option key="APPROVED" description="${uiLabelMap.CommonApproved}"/>
-            </drop-down>
-        </field>
-        <field name="approvalDate" widget-style="inputBox"><date-time/></field>
-        <field name="sequenceNum" widget-style="inputBox"><text/></field>
-        <field name="comments" widget-style="inputBox"><textarea cols="30" rows="3"/></field>
-
-        <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit/></field>
-    </form>
-
-    <form name="AddContentApproval" default-map-name="contentApproval" target="createContentApproval" type="single"
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="contentId" widget-style="inputBox"><hidden/></field>
-        <field name="contentRevisionSeqId" map-name="empty" widget-style="inputBox"><text/></field>
-        <field name="partyId" map-name="empty" widget-style="inputBox"><lookup target-form-name="LookupPartyName"/></field>
-        <field name="roleTypeId">
-            <drop-down allow-empty="true">
-                <entity-options entity-name="RoleType" key-field-name="roleTypeId">
-                    <!-- <entity-constraint name="parentTypeId" value=""/> -->
-                    <entity-order-by field-name="description"/>
-                </entity-options>
-            </drop-down>
-        </field>
-        <field name="approvalDate" map-name="empty" widget-style="inputBox"><date-time/></field>
-        <field name="sequenceNum" map-name="empty" widget-style="inputBox"><text/></field>
-        <field name="comments" map-name="empty" widget-style="inputBox"><text size="40"/></field>
-
-        <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit/></field>
-    </form>
-
-    <form name="ListContentApproval" target="updateContentApproval" list-name="contentApprovalList" type="list"
-        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
-        <field name="contentApprovalId"><display/></field>
-        <field name="contentId"><hidden/></field>
-        <field name="rootContentId" map-name="empty"><hidden/></field>
-        <field name="contentRevisionSeqId"><hidden/></field>
-        <field name="partyId" widget-style="inputBox"><lookup target-form-name="LookupPartyName"/></field>
-        <field name="roleTypeId">
-            <drop-down allow-empty="true">
-                <entity-options entity-name="RoleType" key-field-name="roleTypeId">
-                    <!-- <entity-constraint name="parentTypeId" value=""/> -->
-                    <entity-order-by field-name="description"/>
-                </entity-options>
-            </drop-down>
-        </field>
-        <field name="approvalStatusId" use-when="&quot;COMPDOC_INSTANCE&quot;.equals(contentTypeId)">
-            <drop-down allow-empty="true">
-                <option key="SOFT_REJ" description="${uiLabelMap.ContentSoftRejected}"/>
-                <option key="REJECTED" description="${uiLabelMap.ContentRejected}"/>
-                <option key="APPROVED" description="${uiLabelMap.CommonApproved}"/>
-            </drop-down>
-        </field>
-        <field name="approvalDate" widget-style="inputBox"   use-when="&quot;COMPDOC_INSTANCE&quot;.equals(contentTypeId)"><date-time/></field>
-        <field name="sequenceNum" widget-style="inputBox"  use-when="&quot;COMPDOC_TEMPLATE&quot;.equals(contentTypeId)"><text/></field>
-        <field name="comments" widget-style="inputBox"><textarea cols="30" rows="3"/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit/></field>
-        <field name="deleteButton" title="${uiLabelMap.CommonDelete}" widget-style="smallSubmit">
-            <hyperlink description="${uiLabelMap.CommonDelete}" target="removeContentApproval">
-                <parameter param-name="contentApprovalId"/>
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-            </hyperlink>
-        </field>
-    </form>
-
-    <form name="ListWaitingContentApproval" target="updateWaitingContentApproval" list-name="contentApprovalList" type="list"
-        odd-row-style="alternate-row" default-table-style="basic-table hover-bar" separate-columns="true">
-        <field name="contentApprovalId"><display/></field>
-        <field name="contentId"><hidden/></field>
-        <field name="rootContentId" map-name="empty"><hidden/></field>
-        <field name="contentRevisionSeqId"><display/></field>
-        <field name="partyId" widget-style="inputBox"><lookup target-form-name="LookupPartyName"/></field>
-        <field name="roleTypeId">
-            <drop-down allow-empty="true">
-                <entity-options entity-name="RoleType" key-field-name="roleTypeId">
-                    <entity-order-by field-name="description"/>
-                </entity-options>
-            </drop-down>
-        </field>
-        <field name="approvalStatusId" use-when="&quot;COMPDOC_INSTANCE&quot;.equals(contentTypeId)">
-            <drop-down allow-empty="true">
-                <option key="SOFT_REJ" description="${uiLabelMap.ContentSoftRejected}"/>
-                <option key="REJECTED" description="${uiLabelMap.ContentRejected}"/>
-                <option key="APPROVED" description="${uiLabelMap.CommonApproved}"/>
-            </drop-down>
-        </field>
-        <field name="approvalDate" widget-style="inputBox"><date-time/></field>
-        <field name="sequenceNum" widget-style="inputBox"><text/></field>
-        <field name="comments" widget-style="inputBox"><text size="40"/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"  use-when="&quot;COMPDOC_INSTANCE&quot;.equals(contentTypeId)"><submit/></field>
-    </form>
-
-    <form name="AddRootCompDocInstance" default-map-name="" type="single" target="genCompDocInstance"
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="contentName"><text/></field>
-        <field name="instanceOfContentId" entry-name="rootContentId" map-name="parameters"><display-entity entity-name="Content" key-field-name="contentId" description="${contentName} [${contentId}]"/></field>
-        <field name="contentTypeId"><hidden value="COMPDOC_INSTANCE"/></field>
-        <!--
-        <field name="rootContentId"><hidden/></field>
-        <field name="rootContentRevisionId"><hidden/></field>
-            -->
-        <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
-    </form>
-
-    <form name="EditRootCompDocInstance" default-map-name="content" type="single" target="updateRootCompDocTemplate"
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="contentId"><display/></field>
-        <field name="contentName"><text/></field>
-        <field name="instanceOfContentId"><display/></field>
-        <field name="contentTypeId"><hidden value="COMPDOC_INSTANCE"/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
-    </form>
-
-    <form name="AddRootCompDocTemplate" default-map-name="" type="single" target="createRootCompDocTemplate"
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="contentName" title="${uiLabelMap.ContentCompDocTemplateName}"><text/></field>
-        <field name="contentTypeId" map-name="dummy"><hidden value="COMPDOC_TEMPLATE"/></field>
-        <field name="rootTemplateContentId"><hidden/></field>
-        <field name="rootTemplateRevSeqId"><hidden/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
-    </form>
-
-    <form name="EditRootCompDocTemplate" default-map-name="content" type="single" target="updateRootCompDocTemplate"
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="contentId"><display/></field>
-        <field name="contentName"><text/></field>
-        <field name="contentTypeId" map-name="dummy"><hidden value="COMPDOC_TEMPLATE"/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
-    </form>
-
-    <form name="AddChildCompDoc" default-map-name="" type="single" target="${childCompDocTarget}"
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="rootContentId"><hidden/></field>
-        <field name="contentId"><ignored/></field>
-        <field name="contentName"><text/></field>
-        <field name="contentTypeId"><hidden/></field>
-        <field name="instanceOfContentId" use-when="&quot;DOCUMENT&quot;.equals(contentTypeId)"><display-entity entity-name="Content" key-field-name="contentId" description="${contentName} [${contentId}]"/></field>
-        <field name="caContentIdTo" entry-name="rootContentId" map-name="parameters" title="${uiLabelMap.ContentCompDocParentContentId}">
-            <display-entity entity-name="Content" key-field-name="contentId" description="${contentName} [${contentId}]"/>
-        </field>
-        <field name="contentAssocTypeId"><display-entity entity-name="ContentAssocType"/></field>
-        <field name="fromDate"><date-time default-value="${nowTimestamp}"/></field>
-        <field name="thruDate"><date-time/></field>
-        <field name="sequenceNum"><text/></field>
-
-        <field name="mimeTypeId" title="${uiLabelMap.ContentDocumentType}" use-when="&quot;DOCUMENT&quot;.equals(contentTypeId) &amp;&amp; &quot;SURVEY&quot;.equals(templateDataResourceTypeId)">
-            <hidden value="application/vnd.ofbiz.survey.response"/>
-        </field>
-        <field name="displayMimeTypeId" map-name="empty" title="${uiLabelMap.ContentDocumentType}" use-when="&quot;DOCUMENT&quot;.equals(contentTypeId) &amp;&amp; &quot;SURVEY&quot;.equals(templateDataResourceTypeId)">
-            <display description="Survey Response"/>
-        </field>
-        <field name="mimeTypeId" title="${uiLabelMap.ContentDocumentType}" use-when="&quot;DOCUMENT&quot;.equals(contentTypeId) &amp;&amp; !&quot;SURVEY&quot;.equals(templateDataResourceTypeId)">
-            <display-entity entity-name="MimeType"/>
-        </field>
-        <field name="mimeTypeId" title="${uiLabelMap.ContentDocumentType}" use-when="&quot;TEMPLATE&quot;.equals(contentTypeId)" widget-style="smallSelect" encode-output="false">
-            <drop-down allow-empty="false">
-                <option key="application/msword" description="${uiLabelMap.ContentMSWord}"/>
-                <option key="application/pdf" description="${uiLabelMap.ContentPDFFile}"/>
-                <option key="application/vnd.ofbiz.survey" description="${uiLabelMap.ContentSurvey}"/>
-                <option key="text/html" description="${uiLabelMap.ContentHtmlText}"/>
-                <option key="text/plain" description="${uiLabelMap.ContentPlainText}"/>
-                <option key="image/jpeg" description="${uiLabelMap.ContentJPEG}"/>
-                <option key="image/gif" description="${uiLabelMap.ContentGIF}"/>
-                <option key="image/tiff" description="${uiLabelMap.ContentTIFF}"/>
-                <option key="image/png" description="${uiLabelMap.ContentPNG}"/>
-                <option key="application/octet-stream" description="${uiLabelMap.ContentResourceOther}"/>
-            </drop-down>
-        </field>
-        <field name="rootContentId"><hidden/></field>
-        <field name="rootContentRevisionSeqId"><hidden/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
-    </form>
-
-    <form name="EditChildCompDoc" default-map-name="contentAssoc" type="single" target="${childCompDocTarget}"
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="contentId"><display/></field>
-        <field name="contentName" map-name="itemContent"><text/></field>
-        <field name="contentTypeId" map-name="itemContent"><hidden/></field>
-        <field name="instanceOfContentId" map-name="itemContent" use-when="&quot;DOCUMENT&quot;.equals(contentTypeId)"><display-entity entity-name="Content" key-field-name="contentId" description="${contentName} [${contentId}]"/></field>
-        <field name="contentIdTo"><display-entity entity-name="Content" key-field-name="contentId" description="${contentName} [${contentId}]"/></field>
-        <field name="contentAssocTypeId"><display-entity entity-name="ContentAssocType" also-hidden="false"/></field>
-        <field name="fromDate"><display/></field>
-        <field name="thruDate"><date-time/></field>
-        <field name="sequenceNum"><text/></field>
-
-        <field name="mimeTypeId" map-name="dataResource"
-            use-when="&quot;TEMPLATE&quot;.equals(contentTypeId)" encode-output="false">
-            <drop-down allow-empty="false">
-                <option key="application/msword" description="${uiLabelMap.ContentMSWord}"/>
-                <option key="application/pdf" description="${uiLabelMap.ContentPDFFile}"/>
-                <option key="application/vnd.ofbiz.survey" description="${uiLabelMap.ContentSurvey}"/>
-                <option key="text/html" description="${uiLabelMap.ContentHtmlText}"/>
-                <option key="text/plain" description="${uiLabelMap.ContentPlainText}"/>
-                <option key="image/jpeg" description="${uiLabelMap.ContentJPEG}"/>
-                <option key="image/gif" description="${uiLabelMap.ContentGIF}"/>
-                <option key="image/tiff" description="${uiLabelMap.ContentTIFF}"/>
-                <option key="image/png" description="${uiLabelMap.ContentPNG}"/>
-                <option key="application/octet-stream" description="${uiLabelMap.ContentResourceOther}"/>
-            </drop-down>
-        </field>
-        <field name="mimeTypeId" map-name="dataResource"
-            use-when="&quot;DOCUMENT&quot;.equals(contentTypeId) &amp;&amp; mimeTypeId!=null &amp;&amp; !&quot;application/vnd.ofbiz.survey&quot;.equals(mimeTypeId)" encode-output="false">
-            <display-entity entity-name="MimeType" key-field-name="mimeTypeId"/>
-        </field>
-        <field name="mimeTypeId" map-name="dataResource"
-            use-when="&quot;DOCUMENT&quot;.equals(contentTypeId) &amp;&amp; mimeTypeId!=null &amp;&amp; &quot;application/vnd.ofbiz.survey&quot;.equals(mimeTypeId)">
-            <display description="Survey Response"/>
-        </field>
-        <!-- <field name="mimeTypeId" map-name="dataResource" title="Document Type" ><display/></field> -->
-        <!-- <field name="contentTypeId" map-name="content" title="Content Type" ><display/></field> -->
-
-        <field name="relatedDetailId" map-name="dataResource" title="${uiLabelMap.ContentSurvey}"
-            use-when="dataResource!=null &amp;&amp; &quot;SURVEY&quot;.equals(dataResource.getString(&quot;dataResourceTypeId&quot;))">
-            <lookup target-form-name="LookupSurvey">
-                <sub-hyperlink target="EditSurvey" description="${uiLabelMap.PageTitleEditSurvey}" link-style="buttontext" use-when="dataResource.get(&quot;relatedDetailId&quot;)!=null">
-                    <parameter param-name="surveyId" from-field="dataResource.relatedDetailId"/>
-                </sub-hyperlink>
-            </lookup>
-        </field>
-        <field name="relatedDetailId" map-name="dataResource" title="${uiLabelMap.ContentSurveyResponse}"
-            use-when="dataResource!=null &amp;&amp; &quot;SURVEY_RESPONSE&quot;.equals(dataResource.getString(&quot;dataResourceTypeId&quot;))">
-            <lookup target-form-name="LookupSurveyResponse">
-                <sub-hyperlink target="EditSurveyResponse" description="${uiLabelMap.PageTitleEditSurveyResponse}" link-style="buttontext" use-when="dataResource!=null &amp;&amp; dataResource.get(&quot;relatedDetailId&quot;)!=null">
-                    <parameter param-name="surveyResponseId" from-field="dataResource.relatedDetailId"/>
-                </sub-hyperlink>
-            </lookup>
-        </field>
-        <field name="addSurveyResponse" map-name="dummy" widget-style="buttontext"
-            use-when="&quot;DOCUMENT&quot;.equals(contentTypeId) &amp;&amp; dataResource!=null &amp;&amp; dataResource.get(&quot;relatedDetailId&quot;)==null &amp;&amp; templateDataResource!=null &amp;&amp; templateDataResource.get(&quot;relatedDetailId&quot;)!=null">
-            <hyperlink description="${uiLabelMap.CommonCreate} ${uiLabelMap.ContentSurveyResponse} (${uiLabelMap.CommonFor} ${uiLabelMap.ContentSurvey} ${templateDataResource.relatedDetailId})" target="EditSurveyResponse" target-window="_blank" also-hidden="false">
-                <parameter param-name="surveyId" from-field="templateDataResource.relatedDetailId"/>
-                <parameter param-name="dataResourceId" from-field="dataResource.dataResourceId"/>
-                <parameter param-name="rootContentId"/>
-            </hyperlink>
-        </field>
-        <field name="updateSurveyResponse" map-name="dummy" widget-style="buttontext"
-            use-when="&quot;DOCUMENT&quot;.equals(contentTypeId) &amp;&amp; dataResource!=null &amp;&amp; dataResource.get(&quot;relatedDetailId&quot;)!=null &amp;&amp; templateDataResource!=null &amp;&amp; templateDataResource.get(&quot;relatedDetailId&quot;)!=null">
-            <hyperlink description="${uiLabelMap.CommonUpdate} ${uiLabelMap.ContentSurveyResponse} (${uiLabelMap.CommonFor} ${uiLabelMap.ContentSurvey} ${templateDataResource.relatedDetailId}, Response ${dataResource.relatedDetailId})" target="EditSurveyResponse" target-window="_blank" also-hidden="false">
-                <parameter param-name="surveyId" from-field="templateDataResource.relatedDetailId"/>
-                <parameter param-name="surveyResponseId" from-field="dataResource.relatedDetailId"/>
-                <parameter param-name="dataResourceId" from-field="dataResource.dataResourceId"/>
-                <parameter param-name="rootContentId"/>
-            </hyperlink>
-        </field>
-
-        <field name="objectInfo" map-name="dataResource"
-            use-when="&quot;DOCUMENT&quot;.equals(contentTypeId) &amp;&amp; mimeTypeId!=null &amp;&amp; !&quot;application/vnd.ofbiz.survey&quot;.equals(mimeTypeId)">
-            <display also-hidden="false"/>
-        </field>
-
-        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
-    </form>
-
-    <form name="ViewChildCompDoc" default-map-name="contentAssoc" type="single" target=""
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="contentId"><display/></field>
-        <field name="contentName" map-name="itemContent"><display/></field>
-        <field name="contentTypeId" map-name="itemContent"><hidden/></field>
-        <field name="instanceOfContentId" map-name="itemContent" use-when="contentTypeId.equals(&quot;DOCUMENT&quot;)"><display-entity entity-name="Content" key-field-name="contentId" description="${contentName} [${contentId}]"/></field>
-        <field name="contentIdTo" title="${uiLabelMap.ContentCompDocParentContentId}"><display-entity entity-name="Content" key-field-name="contentId" description="${contentName} [${contentId}]"/></field>
-        <field name="contentAssocTypeId"><display-entity entity-name="ContentAssocType" also-hidden="false"/></field>
-        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display/></field>
-        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><display/></field>
-        <field name="sequenceNum" title="${uiLabelMap.CommonSequenceNum}"><display/></field>
-
-       <field name="mimeTypeId" map-name="dataResource" title="${uiLabelMap.ContentDocumentType}" encode-output="false">
-            <display-entity entity-name="MimeType" key-field-name="mimeTypeId"/>
-        </field>
-        <field name="relatedDetailId" map-name="dataResource" title="${uiLabelMap.ContentSurvey}" use-when="dataResource!=null&amp;&amp;&quot;SURVEY&quot;.equals(dataResource.getString(&quot;dataResourceTypeId&quot;))">
-            <display/>
-        </field>
-        <field name="relatedDetailId" map-name="dataResource" title="${uiLabelMap.ContentSurveyResponse}" use-when="dataResource!=null&amp;&amp;&quot;SURVEY_RESPONSE&quot;.equals(dataResource.getString(&quot;dataResourceTypeId&quot;))&amp;&amp;dataResource.get(&quot;relatedDetailId&quot;)!=null">
-            <display/>
-        </field>
-    </form>
-
-    <!-- ================ CompDoc Revision ================= -->
-    <form name="EditContentRevisionAndItem" target="updateContentRevisionAndItem" type="single"
-        header-row-style="header-row" default-table-style="basic-table">
-        <auto-fields-entity entity-name="ContentRevision"/>
-        <auto-fields-entity entity-name="ContentRevisionItem"/>
-
-        <field name="contentId" widget-style="buttontext"><text/></field>
-        <field name="contentRevisionSeqId"><hidden/></field>
-        <field name="committedByPartyId" widget-style="inputBox"></field>
-        <field name="comments" widget-style="inputBox"></field>
-        <field name="itemContentId" widget-style="inputBox"></field>
-        <field name="oldDataResourceId" widget-style="inputBox"></field>
-        <field name="newDataResourceId" widget-style="inputBox"></field>
-        <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit/></field>
-    </form>
-    <form name="UploadCompDocContent" type="upload" target="uploadCompDocContent"
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="caContentIdTo" entry-name="contentIdTo" map-name="contentAssoc"><hidden/></field>
-        <field name="caContentAssocTypeId"><hidden value="COMPDOC_PART"/></field>
-        <field name="caFromDate" entry-name="fromDate" map-name="contentAssoc"><hidden/></field>
-
-        <field name="contentId" map-name="contentAssoc"><hidden/></field>
-        <field name="dataResourceId" map-name="dataResource"><hidden/></field>
-        <field name="dataResourceTypeId" map-name="dataResource"><hidden/></field>
-        <field name="mimeTypeId" map-name="dataResource"><hidden/></field>
-        <!-- would show previous file name... doesn't make too much sense <field name="objectInfo" title="File Name" map-name="dataResource"><display also-hidden="false"/></field> -->
-        <field name="imageData" title="${uiLabelMap.ContentFile}"><file/></field>
-        <field name="rootContentId"><hidden/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonUpload}" widget-style="smallSubmit"><submit/></field>
-    </form>
-
-    <form name="UploadCompDocPdf2Survey" type="upload" target="persistCompDocPdf2Survey"
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="caContentIdTo" entry-name="contentIdTo" map-name="contentAssoc"><hidden/></field>
-        <field name="caContentAssocTypeId"><hidden value="COMPDOC_PART"/></field>
-        <field name="caFromDate" entry-name="fromDate" map-name="contentAssoc"><hidden/></field>
-
-        <field name="contentId" map-name="contentAssoc"><hidden/></field>
-        <field name="dataResourceId" map-name="dataResource"><hidden/></field>
-        <field name="dataResourceTypeId" map-name="dataResource"><hidden/></field>
-        <field name="mimeTypeId" map-name="dataResource"><hidden/></field>
-        <!-- <field name="objectInfo" title="File Name" map-name="dataResource"><display also-hidden="false"/></field> -->
-        <field name="pdfName" title="${uiLabelMap.ContentPDFSurveyName}"><text/></field>
-        <field name="imageData" title="${uiLabelMap.ContentPDFFilePath}"><file size="60"/></field>
-        <field name="rootContentId"><hidden/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonUpload}" widget-style="smallSubmit"><submit/></field>
-    </form>
-
-    <form name="EditCompDocTextContent" type="single" target="uploadCompDocContent"
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="rootContentId" map-name="dummy"><hidden/></field>
-        <field name="caContentIdTo" map-name="parameters"><hidden/></field>
-        <field name="caContentAssocTypeId" map-name="parameters"><hidden/></field>
-        <field name="caFromDate" map-name="parameters"><hidden/></field>
-
-        <field name="contentId" map-name="content"><hidden/></field>
-        <field name="dataResourceId" map-name="dataResource"><hidden/></field>
-        <field name="dataResourceTypeId" map-name="dataResource"><hidden/></field>
-        <field name="mimeTypeId" map-name="dataResource"><hidden/></field>
-        <field name="textData" title="${uiLabelMap.FormFieldTitle_textDataTitle}"><textarea rows="30" cols="60"/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit/></field>
-    </form>
-
-    <form name="UploadCompDocSurveyId" type="single" target="uploadCompDocContent"
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="rootContentId" map-name="dummy"><hidden/></field>
-        <field name="caContentIdTo" map-name="parameters"><hidden/></field>
-        <field name="caContentAssocTypeId" map-name="parameters"><hidden/></field>
-        <field name="caFromDate" map-name="parameters"><hidden/></field>
-
-        <field name="contentId" map-name="content"><hidden/></field>
-        <field name="dataResourceId" map-name="dataResource"><hidden/></field>
-        <field name="dataResourceTypeId" map-name="dataResource"><hidden/></field>
-        <field name="mimeTypeId" map-name="dataResource"><hidden/></field>
-        <field name="objectInfo" title="${uiLabelMap.ContentSurveySurveyId}"><lookup target-form-name="LookupSurvey"/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit/></field>
-    </form>
-</forms>
diff --git a/applications/content/widget/compdoc/CompDocMenus.xml b/applications/content/widget/compdoc/CompDocMenus.xml
deleted file mode 100644
index 507a42f..0000000
--- a/applications/content/widget/compdoc/CompDocMenus.xml
+++ /dev/null
@@ -1,276 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xmlns="http://ofbiz.apache.org/Widget-Menu" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Menu http://ofbiz.apache.org/dtds/widget-menu.xsd">
-    <menu name="empty" menu-container-style="button-bar tab-bar" default-menu-item-name="content" menu-width="100%"
-        default-associated-content-id="${userLogin.userLoginId}" selected-menuitem-context-field-name="currentMenuItemName" title="" type="simple">
-    </menu>
-
-    <menu name="find" menu-container-style="button-bar tab-bar" default-selected-style="selected" default-menu-item-name="content"
-        default-associated-content-id="${userLogin.userLoginId}" selected-menuitem-context-field-name="currentMenuItemName" title="" type="simple">
-        <menu-item name="find" title="${uiLabelMap.CommonFind}">
-            <link target="FindCompDocTemplate"/>
-        </menu-item>
-    </menu>
-
-
-    <menu name="tree" menu-container-style="button-bar tab-bar" default-selected-style="selected" default-menu-item-name="content"
-        selected-menuitem-context-field-name="currentMenuItemName" title="" type="simple">
-        <menu-item name="viewtree" title="${uiLabelMap.ContentCompDocViewTree}">
-            <condition>
-                <or>
-                    <if-compare field="contentTypeId" operator="equals" value="COMPDOC_TEMPLATE"></if-compare>
-                    <if-compare field="contentTypeId" operator="equals" value="TEMPLATE"></if-compare>
-                </or>
-            </condition>
-            <link target="ViewCompDocTemplateTree">
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-        <menu-item name="viewtree2" title="${uiLabelMap.ContentCompDocViewTree}">
-            <condition>
-                <or>
-                    <if-compare field="contentTypeId" operator="equals" value="COMPDOC_INSTANCE"></if-compare>
-                    <if-compare field="contentTypeId" operator="equals" value="DOCUMENT"></if-compare>
-                </or>
-            </condition>
-            <link target="ViewCompDocInstanceTree">
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-        <menu-item name="edit" title="${uiLabelMap.CommonEdit}">
-            <link target="EditRootCompDoc">
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-        <menu-item name="approval" title="${uiLabelMap.ContentCompDocApprovals}">
-            <link target="ListContentApproval">
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-        <menu-item name="revision" title="${uiLabelMap.ContentCompDocRevisions}">
-            <link target="ListContentRevisions">
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-    </menu>
-
-    <menu name="subtree" menu-container-style="button-bar tab-bar" default-selected-style="selected" default-menu-item-name="content"
-        selected-menuitem-context-field-name="currentMenuItemName" title="" type="simple">
-        <menu-item name="viewtree" title="${uiLabelMap.PageTitleViewCompDocTree}">
-            <condition>
-                <or>
-                    <if-compare field="contentTypeId" operator="equals" value="COMPDOC_TEMPLATE"></if-compare>
-                    <if-compare field="contentTypeId" operator="equals" value="TEMPLATE"></if-compare>
-                </or>
-            </condition>
-            <link target="ViewCompDocTemplateTree">
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-        <menu-item name="viewtree2" title="${uiLabelMap.PageTitleViewCompDocTree}">
-            <condition>
-                <or>
-                    <if-compare field="contentTypeId" operator="equals" value="COMPDOC_INSTANCE"></if-compare>
-                    <if-compare field="contentTypeId" operator="equals" value="DOCUMENT"></if-compare>
-                </or>
-            </condition>
-            <link target="ViewCompDocInstanceTree">
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-        <menu-item name="edit" title="${uiLabelMap.CommonEdit}">
-            <link target="EditChildCompDoc" >
-                <parameter param-name="contentId"/>
-                <parameter param-name="itemContentRevisionSeqId"/>
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-                <parameter param-name="caFromDate" from-field="parameters.caFromDate"/>
-            </link>
-        </menu-item>
-    </menu>
-
-    <menu name="rootTemplateLine" menu-container-style="button-bar button-style-1" default-menu-item-name="content"
-        selected-menuitem-context-field-name="currentMenuItemName" title="" type="simple">
-        <menu-item name="edit-inplace" title="${contentName}[${contentId}]" widget-style="h2">
-            <link target="EditRootCompDoc">
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-        <menu-item name="edit-link" title="${uiLabelMap.CommonEdit}">
-            <link target="EditRootCompDoc">
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-        <menu-item name="child" title="${uiLabelMap.ContentCompDocChild}">
-            <condition>
-                <if-compare-field field="mostRecentRevisionSeqId" operator="equals" to-field="rootContentRevisionSeqId"/>
-            </condition>
-            <link target="AddChildCompDocTemplate">
-                <parameter param-name="rootContentId" from-field="contentId"/>
-                <parameter param-name="sequenceNum" value="9999"/>
-            </link> <!-- rootContentRevisionSeqId=${rootContentRevisionSeqId}&amp; -->
-        </menu-item>
-        <menu-item name="latest" title="${uiLabelMap.ContentCompDocCurrentTemplate}">
-            <condition>
-                <if-compare-field field="mostRecentRevisionSeqId" operator="greater" to-field="rootContentRevisionSeqId"/>
-            </condition>
-            <link target="ViewCompDocTemplateTree">
-                <parameter param-name="rootContentId" from-field="contentId"/>
-            </link> <!-- rootContentRevisionSeqId=${rootContentRevisionSeqId}&amp; -->
-        </menu-item>
-        <!-- on page
-        <menu-item name="viewinst" title="View Instances">
-            <link target="ViewInstances">
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-        <menu-item name="addinst" title="Add Instance">
-            <link target="AddRootCompDocInstance">
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-            -->
-    </menu>
-
-    <menu extra-index="${contentId}" name="childTemplateLine" menu-container-style="button-bar button-style-1" default-menu-item-name="content" selected-menuitem-context-field-name="currentMenuItemName" title="" type="simple">
-        <menu-item name="edit-inplace" title="${contentName} [${contentId}]">
-            <link target="EditChildCompDoc">
-                <parameter param-name="contentId"/>
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="caFromDate" from-field="fromDate"/>
-                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-        <menu-item name="edit-link" title="${uiLabelMap.CommonEdit}">
-            <link target="EditChildCompDoc">
-                <parameter param-name="contentId"/>
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="caFromDate" from-field="fromDate"/>
-                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-        <!--  only one level for now, ie don't worry about an hierarchy, still not sure what that will mean or look like
-        <menu-item name="child" title="+Child">
-            <link target="AddChildCompDocTemplate">
-                <parameter param-name="contentIdTo" from-field="contentId"/>
-                <parameter param-name="sequenceNum" value="9999"/>
-            </link>
-        </menu-item>
-        -->
-        <menu-item name="bef" title="${uiLabelMap.ContentCompDocBefore}">
-            <condition>
-                <if-compare-field field="mostRecentRevisionSeqId" operator="equals" to-field="rootContentRevisionSeqId"/>
-            </condition>
-            <link target="AddChildCompDocTemplate" >
-                <parameter param-name="contentId"/>
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="caContentAssocTypeId" from-field="contentAssocTypeId"/>
-                <parameter param-name="caSequenceNum" from-field="seqNumBefore"/>
-                <parameter param-name="caFromDate" from-field="fromDate"/>
-            </link> <!-- &amp;contentRevisionSeqId=${contentRevisionSeqId} -->
-        </menu-item>
-        <menu-item name="aft" title="${uiLabelMap.ContentCompDocAfter}">
-            <condition>
-                <if-compare-field field="mostRecentRevisionSeqId" operator="equals" to-field="rootContentRevisionSeqId"/>
-            </condition>
-            <link target="AddChildCompDocTemplate" >
-                <parameter param-name="contentId"/>
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="caContentAssocTypeId" from-field="contentAssocTypeId"/>
-                <parameter param-name="caSequenceNum" from-field="seqNumAfter"/>
-                <parameter param-name="caFromDate" from-field="fromDate"/>
-            </link> <!-- &amp;contentRevisionSeqId=${contentRevisionSeqId} -->
-        </menu-item>
-        <menu-item name="up" title="${uiLabelMap.ContentCompDocUp}">
-            <condition>
-                <if-compare-field field="mostRecentRevisionSeqId" operator="equals" to-field="rootContentRevisionSeqId"/>
-            </condition>
-            <link target="resequenceCompDocPart">
-                <parameter param-name="contentId"/>
-                <parameter param-name="dir" value="up"/>
-                <parameter param-name="contentAssocTypeId" value="COMPDOC_PART"/>
-                <parameter param-name="contentIdTo"/>
-                <parameter param-name="caContentAssocTypeId" from-field="contentAssocTypeId"/>
-                <parameter param-name="caSequenceNum" from-field="seqNumBefore"/>
-                <parameter param-name="caFromDate" from-field="fromDate"/>
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-        <menu-item name="down" title="${uiLabelMap.ContentCompDocDown}">
-            <condition>
-                <if-compare-field field="mostRecentRevisionSeqId" operator="equals" to-field="rootContentRevisionSeqId"/>
-            </condition>
-            <link target="resequenceCompDocPart">
-                <parameter param-name="contentId"/>
-                <parameter param-name="dir" value="down"/>
-                <parameter param-name="contentAssocTypeId" value="COMPDOC_PART"/>
-                <parameter param-name="contentIdTo"/>
-                <parameter param-name="caContentAssocTypeId" from-field="contentAssocTypeId"/>
-                <parameter param-name="caSequenceNum" from-field="seqNumBefore"/>
-                <parameter param-name="caFromDate" from-field="fromDate"/>
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-    </menu>
-
-    <menu name="rootInstanceLine" menu-container-style="button-bar button-style-1" default-menu-item-name="content" selected-menuitem-context-field-name="currentMenuItemName" title="" type="simple">
-        <menu-item name="edit-inplace" title="${instanceContent.contentName}[${instanceContent.contentId}]"  widget-style="h2">
-            <link target="EditRootCompDoc">
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-        <menu-item name="edit" title="${uiLabelMap.CommonEdit}">
-            <link target="EditRootCompDoc">
-                <parameter param-name="rootContentId"/>
-                <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
-            </link>
-        </menu-item>
-        <menu-item name="viewtree" title="${uiLabelMap.PageTitleViewCompDocTemplateTree}">
-            <link target="ViewCompDocTemplateTree">
-                <parameter param-name="rootContentRevisionSeqId" from-field="templateContentRevisionSeqId"/>
-                <parameter param-name="rootContentId" from-field="templateContentId"/>
-            </link>
-        </menu-item>
-        <menu-item name="latest" title="${uiLabelMap.ContentCompDocCurrentInstance}">
-            <condition>
-                <if-compare-field field="mostRecentRevisionSeqId" operator="greater" to-field="rootContentRevisionSeqId"/>
-            </condition>
-            <link target="ViewCompDocInstanceTree">
-                <parameter param-name="rootContentId"/>
-            </link> <!-- rootContentRevisionSeqId=${rootContentRevisionSeqId}&amp; -->
-        </menu-item>
-    </menu>
-</menus>
diff --git a/applications/content/widget/compdoc/CompDocScreens.xml b/applications/content/widget/compdoc/CompDocScreens.xml
deleted file mode 100644
index fc940e6..0000000
--- a/applications/content/widget/compdoc/CompDocScreens.xml
+++ /dev/null
@@ -1,1264 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
-    <screen name="ListContentApproval">
-        <section>
-            <condition>
-                <if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
-            </condition>
-            <actions>
-                <set field="rootContentId" from-field="parameters.rootContentId" default-value="${parameters.contentId}"/>
-                <set field="rootContentRevisionSeqId" from-field="parameters.rootContentRevisionSeqId" default-value="${parameters.contentRevisionSeqId}"/>
-                <set field="contentId" from-field="parameters.rootContentId" default-value="${parameters.contentId}"/>
-                <set field="contentRevisionSeqId" from-field="parameters.rootContentRevisionSeqId" default-value="${parameters.contentRevisionSeqId}"/>
-
-                <service service-name="getMostRecentRevision" result-map="revisionResult">
-                    <field-map field-name="contentId" from-field="rootContentId"/>
-                </service>
-                <set field="mostRecentRevisionSeqId" from-field="revisionResult.mostRecentRevisionSeqId"/>
-
-                <set field="menuName" value="tree"/>
-                <set field="currentMenuItemName" value="approval"/>
-                <entity-one entity-name="Content" value-field="content" use-cache="true"/>
-                <set from-field="content.contentTypeId" field="contentTypeId"/>
-                <service service-name="getApprovalsWithPermissions" result-map="result">
-                    <field-map field-name="rootContentId" from-field="contentId"/>
-                    <field-map field-name="contentRevisionSeqId" from-field="contentRevisionSeqId"/>
-                    <field-map field-name="checkPermission" value="false"/>
-                </service>
-
-                <set field="contentApprovalList" from-field="result.contentApprovalList"/>
-                <set field="title" value="${uiLabelMap.ContentCompDocApprovalsFor} ${contentId}, ${uiLabelMap.ContentCompDocRev} ${contentRevisionSeqId}"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <container>
-                            <link target="ListWaitingContentApproval" text="${uiLabelMap.ContentCompDocViewWaitingApprovals}" style="buttontext">
-                                <parameter param-name="contentId"/>
-                                <parameter param-name="contentRevisionSeqId"/>
-                            </link>
-                        </container>
-                        <section>
-                            <condition><if-compare field="content.contentTypeId" operator="equals" value="COMPDOC_INSTANCE"/></condition>
-                            <widgets><include-screen name="rootInstanceApprovalStatus"/></widgets>
-                        </section>
-                        <screenlet title="${uiLabelMap.PageTitleListContentApproval}">
-                            <include-form name="ListContentApproval" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                        </screenlet>
-                        <section>
-                            <condition>
-                                <if-compare field="content.contentTypeId" operator="equals" value="COMPDOC_TEMPLATE"/>
-                            </condition>
-                            <actions>
-                                <set field="title" value="${uiLabelMap.PageTitleEditCompDocInstance} [${rootContentId}]"/>
-                                <set from-field="parameters.contentRevisionSeqId" default-value="${parameters.rootContentRevisionSeqId}" field="rootContentRevisionSeqId"/>
-                            </actions>
-                            <widgets>
-                                <screenlet title="${uiLabelMap.CommonAdd}">
-                                    <include-form name="AddContentApproval" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                                </screenlet>
-                            </widgets>
-                        </section>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="ListWaitingContentApproval">
-        <section>
-            <condition>
-                <if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
-            </condition>
-            <actions>
-                <set from-field="parameters.rootContentId" default-value="${parameters.contentId}" field="rootContentId"/>
-                <set from-field="parameters.rootContentRevisionSeqId" default-value="${parameters.contentRevisionSeqId}" field="rootContentRevisionSeqId"/>
-                <set from-field="parameters.rootContentId" default-value="${parameters.contentId}" field="contentId"/>
-                <set from-field="parameters.rootContentRevisionSeqId" default-value="${parameters.contentRevisionSeqId}" field="contentRevisionSeqId"/>
-                <entity-one entity-name="Content" value-field="content" use-cache="true"/>
-
-                <set from-field="content.contentTypeId" field="contentTypeId"/>
-                <set field="menuName" value="empty"/>
-                <set field="currentMenuItemName" value="approval"/>
-                <set field="titleProperty" value="ContentCompDocViewWaitingApprovals"/>
-                <set field="menuName" value="tree"/>
-                <set field="currentMenuItemName" value="approval"/>
-                <service service-name="checkForWaitingApprovals" result-map="result">
-                </service>
-
-                <set field="contentApprovalList" from-field="result.contentApprovalList"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.ContentCompDocViewWaitingApprovals}">
-                            <include-form name="ListWaitingContentApproval" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                        </screenlet>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="EditContentApproval">
-        <section>
-            <condition>
-                <if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
-            </condition>
-            <actions>
-                <set field="menuName" value="tree"/>
-                <set field="currentMenuItemName" value="approval"/>
-
-                <entity-one entity-name="ContentApproval" value-field="contentApproval" use-cache="true">
-                    <field-map field-name="contentApprovalId" from-field="parameters.contentApprovalId"/>
-                </entity-one>
-                <set from-field="contentApproval.contentId" field="rootContentId"/>
-                <set from-field="contentApproval.contentRevisionSeqId" field="rootContentRevisionSeqId"/>
-                <entity-one entity-name="Content" value-field="content" use-cache="true">
-                    <field-map field-name="contentId" from-field="contentApproval.contentId"/>
-                </entity-one>
-                <set from-field="content.contentTypeId" field="contentTypeId"/>
-                <set field="title" value="${uiLabelMap.PageTitleEditContentApprovalEditPage} ${contentApproval.contentApprovalId}"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.PageTitleEditContentApprovalEditPage}">
-                            <include-form name="EditContentApproval" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                        </screenlet>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="ListContentRevisions">
-        <section>
-            <condition>
-                <if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
-            </condition>
-            <actions>
-                <set from-field="parameters.rootContentId" field="rootContentId"/>
-                <set from-field="parameters.rootContentRevisionSeqId" field="rootContentRevisionSeqId"/>
-                <set from-field="rootContentId" field="contentId"/>
-                <set from-field="rootContentRevisionSeqId" field="contentRevisionSeqId"/>
-                <entity-one entity-name="Content" value-field="content" use-cache="true"/>
-                <set from-field="content.contentTypeId" field="contentTypeId"/>
-                <set field="menuName" value="tree"/>
-                <set field="currentMenuItemName" value="revision"/>
-
-                <entity-one entity-name="Content" value-field="content" use-cache="true">
-                    <field-map field-name="contentId" from-field="contentId"/>
-                </entity-one>
-                <set from-field="content.contentTypeId" field="contentTypeId"/>
-                <entity-and entity-name="ContentRevision" list="contentRevisionList" use-cache="true">
-                    <field-map field-name="contentId" from-field="contentId"/>
-                </entity-and>
-
-                <set field="title" value="${uiLabelMap.ContentCompDocRevisionListPageForContent} ${rootContentId} ${uiLabelMap.ContentCompDocRev} ${rootContentRevisionSeqId}"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.ContentCompDocRevisionListPageForContent}">
-                            <include-form name="ListContentRevisions" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                        </screenlet>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="EditContentRevision">
-        <section>
-            <condition>
-                <if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
-            </condition>
-            <actions>
-                <set from-field="parameters.rootContentId" default-value="${parameters.contentId}" field="rootContentId"/>
-                <set from-field="parameters.rootContentRevisionSeqId" default-value="${parameters.contentRevisionSeqId}" field="rootContentRevisionSeqId"/>
-                <set from-field="parameters.contentId" field="contentId"/>
-                <set from-field="parameters.contentRevisionSeqId" field="contentRevisionSeqId"/>
-                <entity-one entity-name="Content" value-field="content" use-cache="true"/>
-                <set from-field="content.contentTypeId" field="contentTypeId"/>
-                <set field="menuName" value="tree"/>
-                <set field="currentMenuItemName" value="revision"/>
-                <set field="title" value="${uiLabelMap.ContentCompDocRevisionListPageForContent} ${rootContentId} ${uiLabelMap.ContentCompDocRevisions} ${rootContentRevisionSeqId}"/>
-
-                <entity-one entity-name="ContentRevision" value-field="contentRevision" use-cache="true"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.ContentCompDocRevisionListPageForContent}">
-                            <include-form name="EditContentRevision" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                        </screenlet>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="ListContentRevisionItem">
-        <section>
-            <condition>
-                <if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
-            </condition>
-            <actions>
-                <set from-field="parameters.rootContentId" field="rootContentId"/>
-                <set from-field="parameters.rootContentRevisionSeqId" field="rootContentRevisionSeqId"/>
-                <set from-field="rootContentId" field="contentId"/>
-                <set from-field="rootContentRevisionSeqId" field="contentRevisionSeqId"/>
-                <entity-one entity-name="Content" value-field="content" use-cache="true"/>
-                <set from-field="content.contentTypeId" field="contentTypeId"/>
-                <set field="menuName" value="tree"/>
-                <set field="currentMenuItemName" value="revision"/>
-                <set field="title" value="${uiLabelMap.ContentCompDocRevisionListPageForContent} ${rootContentId} ${uiLabelMap.ContentCompDocRevisions} ${rootContentRevisionSeqId}"/>
-
-                <entity-and entity-name="ContentRevisionItem" list="contentRevisionItemList" use-cache="true">
-                    <field-map field-name="contentId" from-field="parameters.contentId"/>
-                    <field-map field-name="contentRevisionSeqId" from-field="parameters.contentRevisionSeqId"/>
-                </entity-and>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.ContentCompDocRevisionListPageForContent}">
-                            <include-form name="ListContentRevisionItem" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                        </screenlet>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="EditContentRevisionItem">
-        <section>
-            <condition>
-                <if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
-            </condition>
-            <actions>
-                <set from-field="parameters.rootContentId" field="rootContentId"/>
-                <set from-field="parameters.rootContentRevisionSeqId" field="rootContentRevisionSeqId"/>
-                <set from-field="parameters.contentId" default-value="${rootContentId}" field="contentId"/>
-                <set from-field="parameters.contentRevisionSeqId" default-value="${rootContentRevisionSeqId}" field="contentRevisionSeqId"/>
-                <entity-one entity-name="Content" value-field="content" use-cache="true"/>
-                <set from-field="content.contentTypeId" field="contentTypeId"/>
-                <set field="menuName" value="tree"/>
-                <set field="currentMenuItemName" value="revision"/>
-                <set field="title" value="${uiLabelMap.ContentCompDocRevisionItemEditPage} ${contentId} ${uiLabelMap.ContentCompDocRevisions} ${contentRevisionSeqId}"/>
-
-                <entity-one entity-name="ContentRevisionItem" value-field="contentRevisionItem" use-cache="true"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.ContentCompDocRevisionItemEditPage}">
-                            <include-form name="EditContentRevisionItem" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                        </screenlet>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="FindCompDoc">
-        <section>
-            <condition>
-                <if-has-permission permission="CONTENTMGR" action="_VIEW"/>
-            </condition>
-            <actions>
-                <set field="menuName" value="empty"/>
-                <set field="titleProperty" value="PageTitleFindCompDoc"/>
-                <set field="entityName" value="ContentAssocViewFrom"/>
-                <set field="queryString" from-field="result.queryString"/>
-                <set field="currentContentMenuItemName" value=""/>
-                <set field="viewIndex" from-field="requestParameters.VIEW_INDEX" type="Integer"/>
-                <set field="viewSize" from-field="requestParameters.VIEW_SIZE" type="Integer" default-value="20"/>
-                <!-- there is a bad sideeffect of the DataResource admin screens. sets dataResourceId in session. -->
-                <set field="dataResourceId" to-scope="user"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <section>
-                            <widgets>
-                                <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
-                                    <decorator-section name="search-options">
-                                        <include-form name="FindCompDoc" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                                    </decorator-section>
-                                    <decorator-section name="search-results">
-                                        <include-form name="ListCompDoc" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                                    </decorator-section>
-                                </decorator-screen>
-                            </widgets>
-                        </section>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <!-- Combining this with FindCompDoc, don't see any reason to have them separate...
-    <screen name="ListCompDoc">
-        <section>
-            <condition>
-                <if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
-            </condition>
-            <actions>
-                <set field="menuName" value="empty"/>
-                <set field="title" value="List CompDoc"/>
-                <set field="entityName" value="ContentAssocViewFrom"/>
-                <set field="queryString" from-field="result.queryString"/>
-                <set field="currentContentMenuItemName" value=""/>
-                <set field="viewIndex" from-field="requestParameters.VIEW_INDEX" type="Integer"/>
-                <set field="viewSize" from-field="requestParameters.VIEW_SIZE" type="Integer" default-value="20"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <container>
-                            <link target="FindCompDoc" style="buttontext" text="${uiLabelMap.CommonFind">
-                        <parameter param-name="contentId"/>
-                        <parameter param-name="contentRevisionSeqId"/>
-                        <parameter param-name="rootTemplateContentId"/>
-                        <parameter param-name="rootTemplateRevSeqId"/>
-                        <parameter param-name="rootInstanceContentId"/>
-                        <parameter param-name="rootInstanceRevSeqId" from-field="rootInstanceRevSeqId"/>
-                      </link>
-                            <link target="AddRootCompDocTemplate"  text="${ContentCreateNewRootCompDocTemplate}" style="buttontext">
-                        <parameter param-name="contentId"/>
-                        <parameter param-name="contentRevisionSeqId"/>
-                        <parameter param-name="rootTemplateContentId"/>
-                        <parameter param-name="rootTemplateRevSeqId"/>
-                        <parameter param-name="rootInstanceContentId"/>
-                        <parameter param-name="rootInstanceRevSeqId"/>
-                      </link>
-                        </container>
-                    </decorator-section>
-                </decorator-screen>
-             </widgets>
-        </section>
-    </screen>
-    -->
-    <screen name="ViewInstances">
-        <section>
-            <condition>
-                <if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
-            </condition>
-            <actions>
-                <set from-field="parameters.rootContentId" field="rootContentId"/>
-                <set from-field="parameters.rootContentRevisionSeqId" field="rootContentRevisionSeqId"/>
-                <set field="menuName" value="tree"/>
-                <set field="entityName" value="ContentAssocViewFrom"/>
-                <set field="queryString" from-field="result.queryString"/>
-                <set field="currentContentMenuItemName" value=""/>
-                <set field="viewIndex" from-field="requestParameters.VIEW_INDEX" type="Integer"/>
-                <set field="viewSize" from-field="requestParameters.VIEW_SIZE" type="Integer" default-value="20"/>
-                <set field="contentTypeId" value="COMPDOC_TEMPLATE"/>
-                <entity-and entity-name="Content" list="compDocFindList">
-                    <field-map field-name="instanceOfContentId" from-field="parameters.rootContentId"/>
-                    <field-map field-name="contentTypeId" value="COMPDOC_INSTANCE"/>
-                </entity-and>
-                <set field="title" value="${uiLabelMap.ContentCompDocViewInstances} ${parameters.rootContentId}"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.ContentCompDocViewInstances}">
-                            <container style="button-bar">
-                                <link target="AddRootCompDocTemplate" text="${uiLabelMap.PageTitleCreateNewRootCompDocTemplate}" style="buttontext">
-                                    <parameter param-name="contentId"/>
-                                    <parameter param-name="contentRevisionSeqId"/>
-                                </link>
-                            </container>
-                            <include-form name="ListCompDocInstances" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                        </screenlet>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="EditRootCompDoc">
-        <section>
-            <actions>
-                <set field="menuName" value="tree"/>
-                <set field="currentMenuItemName" value="edit"/>
-                <set from-field="parameters.rootContentId" default-value="${parameters.contentId}" field="contentId"/>
-                <set from-field="contentId" field="rootContentId"/>
-                <entity-one entity-name="Content" value-field="content" use-cache="false"/>
-                <entity-one entity-name="DataResource" value-field="dataResource" use-cache="false">
-                    <field-map field-name="dataResourceId" from-field="content.dataResourceId"/>
-                </entity-one>
-                <set from-field="dataResource.mimeTypeId" field="mimeTypeId"/>
-                <set from-field="content.contentTypeId" field="contentTypeId"/>
-                <entity-condition entity-name="ContentRevision" list="contentRevisions" use-cache="true">
-                    <condition-list combine="and">
-                        <condition-expr field-name="contentId" operator="equals" from-field="rootContentId"/>
-                    </condition-list>
-                    <order-by field-name="-contentRevisionSeqId"/>
-                </entity-condition>
-                <set from-field="parameters.contentRevisionSeqId" default-value="${contentRevisions[0].contentRevisionSeqId}" field="contentRevisionSeqId"/>
-                <set from-field="contentRevisionSeqId" field="rootContentRevisionSeqId"/>
-            </actions>
-
-            <widgets>
-                <section>
-                    <condition>
-                        <if-compare field="contentTypeId" operator="equals" value="COMPDOC_TEMPLATE"/>
-                    </condition>
-                    <actions>
-                        <set field="title" value="${uiLabelMap.PageTitleEditCompDocTemplate} ${rootContentId}"/>
-                        <set from-field="parameters.contentRevisionSeqId" default-value="${contentRevisions[0].contentRevisionSeqId}" field="rootContentRevisionSeqId"/>
-                    </actions>
-                    <widgets>
-                        <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                            <decorator-section name="body">
-                                <screenlet title="${uiLabelMap.PageTitleEditCompDocTemplate}">
-                                    <container>
-                                        <link target="AddRootCompDocInstance" text="${uiLabelMap.PageTitleCreateInstanceOfThisTemplate}" style="buttontext">
-                                            <parameter param-name="contentId" from-field="rootContentId"/>
-                                            <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
-                                        </link>
-                                        <link target="ViewInstances">
-                                            <parameter param-name="rootContentId"/>
-                                            <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
-                                        </link>
-                                    </container>
-                                    <include-form name="EditRootCompDocTemplate" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                                </screenlet>
-                            </decorator-section>
-                        </decorator-screen>
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                        <if-compare field="content.contentTypeId" operator="equals" value="COMPDOC_INSTANCE"/>
-                    </condition>
-                    <actions>
-                        <set field="title" value="${uiLabelMap.PageTitleEditCompDocInstance} [${rootContentId}]"/>
-                        <set from-field="parameters.contentRevisionSeqId" default-value="${parameters.rootContentRevisionSeqId}" field="rootContentRevisionSeqId"/>
-                    </actions>
-                    <widgets>
-                        <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                            <decorator-section name="body">
-                                <screenlet title="${uiLabelMap.PageTitleEditCompDocInstance}">
-                                    <include-form name="EditRootCompDocInstance" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                                </screenlet>
-                            </decorator-section>
-                        </decorator-screen>
-                    </widgets>
-                </section>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="EditChildCompDoc">
-        <section>
-             <condition>
-                <if-has-permission permission="CONTENTMGR" action="_CREATE"/>
-            </condition>
-            <actions>
-                <set field="menuName" value="subtree"/>
-                <set field="currentMenuItemName" value="edit"/>
-                <!--
-                    rootContentId, as always, refers to the root of the CompDoc tree.
-                    If parameters.caContentIdTo exists (coming back from a persist operation) is set to rootContentId.
-                    The rootContentId field is set from parameters.rootContentId, but if it does not exist, it is set from caContentIdTo.
-                    -->
-                <set field="contentId" from-field="parameters.contentId"/>
-                <set field="rootContentId" from-field="parameters.rootContentId" default-value="${parameters.caContentIdTo}"/>
-                <!-- need to get the latest rootContentRevisionSeqId -->
-                <service service-name="getMostRecentRevision" result-map="revisionResult">
-                    <field-map field-name="contentId" from-field="rootContentId"/>
-                </service>
-                <set field="mostRecentRevisionSeqId" from-field="revisionResult.mostRecentRevisionSeqId"/>
-                <set field="rootContentRevisionSeqId" from-field="parameters.rootContentRevisionSeqId" default-value="${parameters.contentRevisionSeqId}"/>
-                <set field="rootContentRevisionSeqId" from-field="rootContentRevisionSeqId" default-value="${mostRecentRevisionSeqId}"/>
-
-                <entity-one entity-name="Content" value-field="itemContent" use-cache="false">
-                    <field-map field-name="contentId" from-field="contentId"/>
-                </entity-one>
-                <entity-one entity-name="ContentAssoc" value-field="contentAssoc">
-                    <field-map field-name="contentIdTo" from-field="rootContentId"/>
-                    <field-map field-name="contentId" from-field="contentId"/>
-                    <field-map field-name="fromDate" from-field="parameters.caFromDate"/>
-                    <field-map field-name="contentAssocTypeId" value="COMPDOC_PART"/>
-                </entity-one>
-
-                <!-- If parameters.itemContentRevisionSeqId does not exist, it is necessary to the contentRevisionSeqId
-                    from the ContentRevisionItem that is most recent, but not greater than the rootContentRevisionSeqId.
-                    This operation effectively gets the current ContentRevisionItem entity, in any case, and
-                    that is needed to get the dataResourceId for this revision, which may not be the latest.
-                    -->
-                <entity-condition entity-name="ContentRevisionItem" list="contentRevisionItems" use-cache="true">
-                    <condition-list combine="and">
-                        <condition-expr field-name="contentId" from-field="rootContentId"/>
-                        <condition-expr field-name="itemContentId" from-field="contentId"/>
-                        <condition-expr field-name="contentRevisionSeqId" operator="less-equals" from-field="parameters.contentRevisionSeqId" ignore-if-empty="true"/>
-                    </condition-list>
-                    <order-by field-name="-contentRevisionSeqId"/>
-                </entity-condition>
-                <set field="itemContentRevisionSeqId" from-field="parameters.itemContentRevisionSeqId" default-value="${contentRevisionItems[0].contentRevisionSeqId}"/>
-                <set field="dataResourceId" from-field="contentRevisionItems[0].newDataResourceId" default-value="${itemContent.dataResourceId}"/>
-                <entity-one entity-name="DataResource" value-field="dataResource" use-cache="false">
-                    <field-map field-name="dataResourceId" from-field="dataResourceId"/>
-                </entity-one>
-                <set field="mimeTypeId" from-field="dataResource.mimeTypeId"/>
-            </actions>
-            <widgets>
-                <section>
-                    <condition>
-                        <if-compare field="itemContent.contentTypeId" operator="equals" value="TEMPLATE"/>
-                    </condition>
-                    <actions>
-                        <set field="title" value="${uiLabelMap.PageTitleEditCompDocTemplate} [${contentId}, part of ${rootContentId}]"/>
-                        <set field="childCompDocTarget" value="updateChildCompDocTemplate"/>
-                        <set field="contentTypeId" value="TEMPLATE"/>
-                    </actions>
-                    <widgets>
-                        <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                            <decorator-section name="body">
-                                <section>
-                                    <condition>
-                                        <if-compare-field field="mostRecentRevisionSeqId" operator="equals" to-field="rootContentRevisionSeqId"/>
-                                    </condition>
-                                    <widgets>
-                                        <container><label style="tableheadtext" text="${uiLabelMap.ContentEditingLatestRevision} [${mostRecentRevisionSeqId}]"/></container>
-                                        <include-form name="EditChildCompDoc" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                                        <include-screen name="ContentViewLink"/>
-                                        <include-screen name="UploadCompDocContent"/>
-                                    </widgets>
-                                </section>
-                                <section>
-                                    <condition>
-                                        <and>
-                                            <not><if-empty field="mostRecentRevisionSeqId"/></not>
-                                            <not><if-empty field="rootContentRevisionSeqId"/></not>
-                                            <if-compare-field field="mostRecentRevisionSeqId" operator="greater" to-field="rootContentRevisionSeqId"/>
-                                        </and>
-                                    </condition>
-                                    <widgets>
-                                        <container>
-                                            <label style="tableheadtext" text="${uiLabelMap.ContentCompDocRevisions} [${rootContentRevisionSeqId}], Latest is [${mostRecentRevisionSeqId}]"/>
-                                            <link style="buttontext" text="${uiLabelMap.ContentLatest}" target="EditChildCompDoc">
-                                                <parameter param-name="contentId"/>
-                                                <parameter param-name="rootContentId"/>
-                                                <parameter param-name="caFromDate" from-field="fromDate"/>
-                                            </link>
-                                            <include-screen name="ContentViewLink"/>
-                                        </container>
-                                        <include-form name="ViewChildCompDoc" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                                    </widgets>
-                                </section>
-                            </decorator-section>
-                        </decorator-screen>
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                        <if-compare field="itemContent.contentTypeId" operator="equals" value="DOCUMENT"/>
-                    </condition>
-                    <actions>
-                        <set field="title" value="${uiLabelMap.PageTitleEditCompDocInstance} [${contentId} of ${contentId}]"/>
-                        <set value="updateChildCompDocInstance" field="childCompDocTarget"/>
-                        <set value="DOCUMENT" field="contentTypeId"/>
-                        <!--
-                        <entity-condition entity-name="MaxRevisionItemView" list="rootRevList" use-cache="false" >
-                           <condition-list combine="and">
-                                <condition-expr field-name="rootRevisionContentId" operator="equals" env-name="rootInstanceContentId"/>
-                                <condition-expr field-name="contentId" operator="equals" env-name="contentId"/>
-                           </condition-list>
-
-                           <select-field field-name="rootRevisionContentId"/>
-                           <select-field field-name="contentId"/>
-                           <select-field field-name="maxRevisionSeqId"/>
-
-                           <order-by field-name="-maxRevisionSeqId"/>
-                        </entity-condition>
-                        <set from-field="rootRevList[0].maxRevisionSeqId" field="rootInstanceRevSeqId"/>
-                            -->
-                        <entity-one entity-name="Content" value-field="templateContent" use-cache="false">
-                            <field-map field-name="contentId" from-field="itemContent.instanceOfContentId"/>
-                        </entity-one>
-                        <entity-one entity-name="DataResource" value-field="templateDataResource" use-cache="false">
-                            <field-map field-name="dataResourceId" from-field="templateContent.dataResourceId"/>
-                        </entity-one>
-                    </actions>
-                    <widgets>
-                        <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                            <decorator-section name="body">
-                                <include-screen name="ContentViewLink"/>
-                                <include-form name="EditChildCompDoc" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                                <include-screen name="UploadCompDocContent"/>
-                            </decorator-section>
-                        </decorator-screen>
-                    </widgets>
-                </section>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="ContentViewLink">
-        <section>
-            <actions>
-            </actions>
-            <widgets>
-                <section>
-                    <condition>
-                        <or>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/msword"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/pdf"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/vnd.oasis.opendocument.text"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/jpeg"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/gif"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/tiff"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/png"/>
-                        </or>
-                    </condition>
-                    <actions>
-                    </actions>
-                    <widgets>
-                        <container>
-                            <link target="ViewCompDocContentBinary" text="${uiLabelMap.PageTitleViewCompDocContentBinary}" style="buttontext">
-                            <parameter param-name="contentId"/>
-                            <parameter param-name="contentRevisionSeqId" from-field="itemContentRevisionSeqId"/>
-                            <parameter param-name="rootContentId"/>
-                           </link>
-                        </container>
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                        <or>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="text/html"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="text/plain"/>
-                        </or>
-                    </condition>
-                    <actions>
-                    </actions>
-                    <widgets>
-                        <container>
-                        <link target="ViewCompDocContentHtml" text="${uiLabelMap.PageTitleViewCompDocContentHtml}" style="buttontext">
-                            <parameter param-name="contentId"/>
-                            <parameter param-name="contentRevisionSeqId" from-field="itemContentRevisionSeqId"/>
-                            <parameter param-name="rootContentId"/>
-                       </link>
-                        </container>
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/vnd.ofbiz.survey"/>
-                    </condition>
-                    <actions>
-                    </actions>
-                    <widgets>
-                        <!-- link on form
-                        <container>
-                            <link target="EditSurvey" text="${uiLabelMap.PageTitleViewCompDocContent}" style="buttontext">
-                                <parameter param-name="surveyId from-field="dataResource.relatedDetailId"/>
-                                <parameter param-name="rootContentId"/>
-                            </link>
-                        </container>
-                            -->
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/vnd.ofbiz.survey.response"/>
-                    </condition>
-                    <actions>
-                    </actions>
-                    <widgets>
-                        <!-- link on form
-                        <container>
-                            <link target="EditSurveyResponse" text="${uiLabelMap.PageTitleViewCompDocContent}" style="buttontext">
-                                <parameter param-name="surveyResponseId from-field="dataResource.relatedDetailId"/>
-                                <parameter param-name="rootContentId"/>
-                            </link>
-                        </container>
-                            -->
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                      <not>
-                        <or>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/msword"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/pdf"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/vnd.oasis.opendocument.text"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/jpeg"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/gif"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/tiff"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/png"/>
-
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="text/html"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="text/plain"/>
-
-                            <if-compare field="dataResource.dataResourceTypeId" operator="equals" value="SURVEY"/>
-                            <if-compare field="dataResource.dataResourceTypeId" operator="equals" value="SURVEY_RESPONSE"/>
-                        </or>
-                      </not>
-                    </condition>
-                    <actions>
-                    </actions>
-                    <widgets>
-                        <!--
-                        <label text="View screen not available for mime-type: ${dataResource.mimeTypeId}"/>
-                            -->
-                    </widgets>
-                </section>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="UploadCompDocContent">
-        <section>
-            <actions>
-            </actions>
-            <widgets>
-                <section>
-                    <condition>
-                        <or>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/msword"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/pdf"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/vnd.oasis.opendocument.text"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/jpeg"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/gif"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/tiff"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/png"/>
-                        </or>
-                    </condition>
-                    <actions>
-                    </actions>
-                    <widgets>
-                        <include-form name="UploadCompDocContent" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                        <or>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="text/html"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="text/plain"/>
-                        </or>
-                    </condition>
-                    <actions>
-                        <entity-one entity-name="ElectronicText" value-field="electronicText">
-                            <field-map field-name="dataResourceId" from-field="dataResource.dataResourceId"/>
-                        </entity-one>
-                        <set from-field="electronicText.textData" field="textData"/>
-                    </actions>
-                    <widgets>
-                        <include-form name="EditCompDocTextContent" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                        <or>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/vnd.ofbiz.survey"/>
-                            <!--
-                            <if-compare field="dataResource.dataResourceTypeId" operator="equals" value="SURVEY"/>
-                            <if-compare field="dataResource.dataResourceTypeId" operator="equals" value="SURVEY_RESPONSE"/>
-                                -->
-                        </or>
-                    </condition>
-                    <actions>
-                    </actions>
-                    <widgets>
-                        <!-- Don't put this link here. It is called in the form.
-                                <include-form name="UploadCompDocSurveyId" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                        -->
-                        <include-form name="UploadCompDocPdf2Survey" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                        <or>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/vnd.ofbiz.survey.response"/>
-                            <!--
-                            <if-compare field="dataResource.dataResourceTypeId" operator="equals" value="SURVEY"/>
-                            <if-compare field="dataResource.dataResourceTypeId" operator="equals" value="SURVEY_RESPONSE"/>
-                                -->
-                        </or>
-                    </condition>
-                    <actions>
-                    </actions>
-                    <widgets>
-                        <!-- Don't put this link here. It is called in the form.
-                                <link text="Edit Survey Response"/>
-                                -->
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                      <not>
-                        <or>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/msword"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/pdf"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/vnd.oasis.opendocument.text"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/jpeg"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/gif"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/tiff"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="image/png"/>
-
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="text/html"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="text/plain"/>
-
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/vnd.ofbiz.survey.response"/>
-                            <if-compare field="dataResource.mimeTypeId" operator="equals" value="application/vnd.ofbiz.survey"/>
-                            <if-compare field="dataResource.dataResourceTypeId" operator="equals" value="SURVEY"/>
-                            <if-compare field="dataResource.dataResourceTypeId" operator="equals" value="SURVEY_RESPONSE"/>
-                        </or>
-                      </not>
-                    </condition>
-                    <actions>
-                    </actions>
-                    <widgets>
-                        <!--
-                        <label text="Upload screen not available for mime-type: ${dataResource.mimeTypeId}"/>
-                            -->
-                    </widgets>
-                </section>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="ViewCompDocContentHtml">
-        <section>
-            <actions>
-            </actions>
-            <widgets>
-                <content content-id="${parameters.contentId}"/>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="AddRootCompDocInstance">
-        <section>
-             <condition>
-                <if-has-permission permission="CONTENTMGR" action="_CREATE"/>
-            </condition>
-            <actions>
-                <set from-field="parameters.rootContentId" field="rootContentId"/>
-                <set from-field="parameters.rootContentRevisionSeqId" field="rootContentRevisionSeqId"/>
-                <set value="COMPDOC_INSTANCE" field="contentTypeId"/>
-                <entity-condition entity-name="ContentRevision" list="contentRevisions" use-cache="true">
-                    <condition-list combine="and">
-                        <condition-expr field-name="contentId" operator="equals" from-field="rootContentId"/>
-                    </condition-list>
-                    <order-by field-name="-contentRevisionSeqId"/>
-                </entity-condition>
-                <set from-field="parameters.rootContentRevisionSeqId" default-value="${contentRevisions[0].contentRevisionSeqId}" field="rootContentRevisionSeqId"/>
-                <entity-one entity-name="Content" value-field="templateContent">
-                    <field-map field-name="contentId" from-field="rootContentId"/>
-                </entity-one>
-                <set from-field="templateContent.contentName" field="contentName"/>
-
-                <set field="menuName" value="tree"/>
-                <set field="title" value="${uiLabelMap.ContentCompDocAddDocumentInstancePageForTemplate}: ${rootContentId}"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <include-form name="AddRootCompDocInstance" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="AddRootCompDocTemplate">
-        <section>
-            <condition>
-                <if-has-permission permission="CONTENTMGR" action="_CREATE"/>
-            </condition>
-            <actions>
-                <set field="menuName" value="tree"/>
-                <set field="titleProperty" value="PageTitleAddCompositeDocumentTemplate"/>
-                <set field="contentTypeId" value="COMPDOC_TEMPLATE"/>
-                <set field="createChildCompDoc" value="createChildCompDocTemplate"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <include-form name="AddRootCompDocTemplate" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="AddChildCompDocInstance">
-        <section>
-             <condition>
-                <if-has-permission permission="CONTENTMGR" action="_CREATE"/>
-            </condition>
-            <actions>
-                <set field="menuName" value="tree"/>
-                <set field="titleProperty" value="PageTitleAddCompositeDocumentInstance"/>
-                <set field="contentIdTo" from-field="parameters.rootContentId"/>
-                <set field="templateContentId" from-field="parameters.instanceOfContentId"/>
-                <entity-one entity-name="Content" value-field="templateContent">
-                    <field-map field-name="contentId" from-field="templateContentId"/>
-                </entity-one>
-                <set from-field="templateContent.contentName" field="contentName"/>
-
-                <get-related-one value-field="templateContent" relation-name="DataResource" to-value-field="templateDataResource"/>
-                <set field="templateDataResourceTypeId" from-field="templateDataResource.dataResourceTypeId"/>
-                <set field="mimeTypeId" from-field="templateDataResource.mimeTypeId"/>
-
-                <set field="contentAssocTypeId" value="COMPDOC_PART"/>
-                <set field="contentTypeId" value="DOCUMENT"/>
-                <set field="sequenceNum" from-field="parameters.caSequenceNum" default-value="${parameters.sequenceNum}"/>
-                <set field="childCompDocTarget" value="createChildCompDocInstance"/>
-                <set field="contentId" from-field="parameters.contentId"/>
-
-                <set field="rootContentId" from-field="parameters.rootContentId" default-value="${parameters.contentIdTo}"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <include-form name="AddChildCompDoc" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="AddChildCompDocTemplate">
-        <section>
-             <condition>
-                <if-has-permission permission="CONTENTMGR" action="_CREATE"/>
-            </condition>
-            <actions>
-                <set field="menuName" value="tree"/>
-                <set field="titleProperty" value="PageTitleAddCompositeDocumentTemplate"/>
-                <set field="contentIdTo" from-field="parameters.rootContentId" default-value="${parameters.contentIdTo}"/>
-                <set field="rootContentId" from-field="contentIdTo"/>
-                <set field="rootContentRevisionSeqId" from-field="parameters.rootContentRevisionSeqId"/>
-                <set field="contentAssocTypeId" value="COMPDOC_PART"/>
-                <set field="sequenceNum" from-field="parameters.caSequenceNum" default-value="${parameters.sequenceNum}"/>
-                <set field="contentTypeId" value="TEMPLATE"/>
-                <set field="contentId" value=""/>
-                <set field="instanceOfDataResourceTypeId" value=""/>
-                <set field="childCompDocTarget" value="createChildCompDocTemplate"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <include-form name="AddChildCompDoc" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="ViewCompDocTemplateTree">
-        <section>
-            <condition>
-                <if-has-permission permission="CONTENTMGR" action="_CREATE"/>
-            </condition>
-            <actions>
-                <set from-field="parameters.rootContentId" field="rootContentId"/>
-                <set from-field="parameters.rootContentRevisionSeqId" field="rootContentRevisionSeqId"/>
-                <set value="COMPDOC_TEMPLATE" field="contentTypeId"/>
-                <service service-name="getMostRecentRevision" result-map="revisionResult">
-                    <field-map field-name="contentId" from-field="rootContentId"/>
-                </service>
-                <set from-field="revisionResult.mostRecentRevisionSeqId" field="mostRecentRevisionSeqId"/>
-                <set from-field="parameters.rootContentRevisionSeqId" default-value="${mostRecentRevisionSeqId}" field="rootContentRevisionSeqId"/>
-
-                <set field="menuName" value="tree"/>
-                <set field="title" value="${uiLabelMap.ContentTemplateRoot} ${rootContentId}, ${uiLabelMap.ContentCompDocRev} ${rootContentRevisionSeqId}"/>
-                <set field="currentMenuItemName" value="viewtree"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                                <container>
-                                    <link target="ViewInstances" text="${uiLabelMap.ContentCompDocViewInstances}" style="buttontext">
-                                        <parameter param-name="rootContentId"/>
-                                        <parameter param-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
-                                    </link>
-                                    <link target="AddRootCompDocInstance" text="${uiLabelMap.PageTitleCreateInstanceOfThisTemplate}" style="buttontext">
-                                        <parameter param-name="rootContentId"/>
-                                        <parameter param-name="rootContentRevisionSeqId"/>
-                                    </link>
-                                </container>
-                        <include-tree name="CompDocTemplateTree" location="component://content/widget/compdoc/CompDocTemplateTree.xml"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="ViewCompDocInstanceTree">
-        <section>
-            <condition>
-                <if-has-permission permission="CONTENTMGR" action="_CREATE"/>
-            </condition>
-
-            <actions>
-                <set field="menuName" value="tree"/>
-                <set field="currentMenuItemName" value="viewtree2"/>
-                   <set from-field="parameters.rootContentId" field="rootContentId"/>
-                   <set from-field="parameters.rootContentRevisionSeqId" field="rootContentRevisionSeqId"/>
-                   <set value="COMPDOC_INSTANCE" field="contentTypeId"/>
-
-                <service service-name="getMostRecentRevision" result-map="revisionResult">
-                    <field-map field-name="contentId" from-field="parameters.rootContentId"/>
-                </service>
-                <set from-field="revisionResult.mostRecentRevisionSeqId" field="mostRecentRevisionSeqId"/>
-                <set from-field="parameters.rootContentRevisionSeqId" default-value="${mostRecentRevisionSeqId}" field="rootContentRevisionSeqId"/>
-
-                <entity-one entity-name="Content" value-field="instanceContent">
-                    <field-map field-name="contentId" from-field="rootContentId"/>
-                </entity-one>
-                <set from-field="instanceContent.instanceOfContentId" field="templateContentId"/>
-                <entity-condition entity-name="ContentRevision" list="contentTemplateRevisions" use-cache="true">
-                    <condition-list combine="and">
-                        <condition-expr field-name="contentId" operator="equals" from-field="templateContentId"/>
-                    </condition-list>
-                    <order-by field-name="-contentRevisionSeqId"/>
-                </entity-condition>
-                <set field="templateContentRevisionSeqId" from-field="contentTemplateRevisions[0].contentRevisionSeqId"/>
-                <set field="title" value="${uiLabelMap.ContentRoot} ${rootContentId}, ${uiLabelMap.ContentCompDocRev} ${rootContentRevisionSeqId}  ${uiLabelMap.FormFieldTitle_instanceOfContentId} ${instanceContent.instanceOfContentId}, ${uiLabelMap.ContentCompDocRev} ${templateContentRevisionSeqId}"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                       <container>
-                            <link target="GenCompDocPdf" text="${uiLabelMap.ContentCompDocGeneratePDF}" style="buttontext">
-                                <parameter param-name="contentId" from-field="rootContentId"/>
-                                <parameter param-name="contentRevisionSeqId"/>
-                            </link>
-                        </container>
-                       <include-tree name="CompDocInstanceTree" location="component://content/widget/compdoc/CompDocTemplateTree.xml"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="rootTemplateLine">
-        <section>
-            <widgets>
-                <include-menu name="rootTemplateLine" location="component://content/widget/compdoc/CompDocMenus.xml"/>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="rootInstanceLine">
-        <section>
-            <widgets>
-                <include-menu name="rootInstanceLine" location="component://content/widget/compdoc/CompDocMenus.xml"/>
-                <include-screen name="rootInstanceApprovalStatus"/>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="rootInstanceApprovalStatus">
-        <section>
-            <actions>
-                <service service-name="getFinalApprovalStatus" result-map="approvalStatusResult">
-                    <field-map field-name="contentId" from-field="rootContentId"/>
-                    <field-map field-name="contentRevisionSeqId" from-field="rootContentRevisionSeqId"/>
-                </service>
-                <entity-one entity-name="StatusItem" value-field="statusItem">
-                    <field-map field-name="statusId" from-field="approvalStatusResult.approvalStatusId"/>
-                </entity-one>
-            </actions>
-            <widgets>
-                <container>
-                    <label text="${uiLabelMap.ContentCompDocApprovalStatus}: ${statusItem.description}" style="h2"/>
-                    <section>
-                        <condition>
-                            <and>
-                                <if-compare-field field="mostRecentRevisionSeqId" operator="equals" to-field="rootContentRevisionSeqId"/>
-                                <if-compare field="approvalStatusResult.approvalStatusId" operator="equals" value="CNTAP_NOT_READY"/>
-                            </and>
-                        </condition>
-                        <widgets>
-                            <link text="${uiLabelMap.ContentCompDocStartApprovalProcess}" target="prepForApproval" style="buttontext">
-                                <parameter param-name="rootContentId"/>
-                                <parameter param-name="rootContentRevisionSeqId"/>
-                            </link>
-                        </widgets>
-                    </section>
-                </container>
-            </widgets>
-        </section>
-    </screen>
-
-    <screen name="childTemplateLine">
-        <section>
-            <actions>
-                <script location="component://content/groovyScripts/content/PrepSeqNo.groovy"/>
-            </actions>
-            <widgets>
-                <include-menu name="childTemplateLine" location="component://content/widget/compdoc/CompDocMenus.xml"/>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="childInstanceLine">
-        <section>
-            <actions>
-                <script location="component://content/groovyScripts/content/PrepSeqNo.groovy"/>
-                <!--  find the most recent ContentAssoc/ContentRevisionItem view using the rootInstanceContentId
-                      as the contentId value and rootInstanceRevSeqId for the revision
-                      and the contentId of the current template part as the itemContentId
-                      -->
-                <entity-condition entity-name="ContentAssocRevisionItemView" use-cache="false" list="assocRevisionItemViewList">
-                   <condition-list combine="and">
-                        <condition-expr field-name="contentIdTo" operator="equals" from-field="rootContentId"/>
-                        <condition-expr field-name="rootRevisionContentId" operator="equals" from-field="rootContentId"/>
-                        <condition-expr field-name="instanceOfContentId" operator="equals" from-field="contentId"/>
-                        <condition-expr field-name="contentAssocTypeId" operator="equals" value="COMPDOC_PART"/>
-                        <condition-expr field-name="contentRevisionSeqId" operator="less-equals" from-field="rootContentRevisionSeqId"/>
-                        <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/>
-                        <condition-list combine="or">
-                            <condition-expr field-name="thruDate" operator="equals" value=""/>
-                            <condition-expr field-name="thruDate" operator="greater" from-field="nowTimestamp"/>
-                        </condition-list>
-                   </condition-list>
-
-                   <select-field field-name="rootRevisionContentId"/>
-                   <select-field field-name="itemContentId"/>
-                   <select-field field-name="maxRevisionSeqId"/>
-                   <select-field field-name="contentId"/>
-                   <select-field field-name="contentIdTo"/>
-                   <select-field field-name="contentAssocTypeId"/>
-                   <select-field field-name="fromDate"/>
-                   <select-field field-name="sequenceNum"/>
-
-                   <order-by field-name="-maxRevisionSeqId"/>
-                </entity-condition>
-            </actions>
-            <widgets>
-                <!--
-                <label text="rootRevisionContentId : ${rootRevisionContentId}"></label>
-                <label text="itemContentId : ${itemContentId}"></label>
-                <label text="maxRevisionSeqId : ${maxRevisionSeqId}"></label>
-                <label text="contentIdTo : ${contentIdTo}"></label>
-                <label text="fromDate : ${fromDate}"></label>
-                <label text="instanceContentId : ${instanceContentId}"></label>
-                <label text="instanceContentRevisionSeqId : ${instanceContentRevisionSeqId}"></label>
-                <label text="assocRevisionItemView : ${assocRevisionItemView}"></label>
-                -->
-                <container>
-                    <label text="${contentName}" style="tableheadtext"/>
-                    <section>
-                        <condition>
-                            <if-compare-field field="mostRecentRevisionSeqId" operator="equals" to-field="rootContentRevisionSeqId"/>
-                        </condition>
-                        <widgets>
-                            <link text="${uiLabelMap.PageTitleAddCompDocInstance}" target="AddChildCompDocInstance" style="buttontext">
-                                <parameter param-name="rootContentId"/>
-                                <parameter param-name="instanceOfContentId" from-field="contentId"/>
-                                <parameter param-name="caSequenceNum" from-field="maxRevisionSeqId"/>
-                            </link>
-                        </widgets>
-                    </section>
-                </container>
-                <iterate-section entry="assocRevisionItemView" list="assocRevisionItemViewList">
-                    <section>
-                        <actions>
-                            <entity-one entity-name="Content" value-field="instanceContent" auto-field-map="false">
-                                <field-map field-name="contentId" from-field="assocRevisionItemView.itemContentId"/>
-                            </entity-one>
-                            <entity-one entity-name="DataResource" value-field="instanceDataResource" auto-field-map="false">
-                                <field-map field-name="dataResourceId" from-field="instanceContent.dataResourceId"/>
-                            </entity-one>
-                        </actions>
-                        <widgets>
-                            <container>
-                                <label text="- ${instanceContent.contentName} [${instanceContent.contentId}] - ${instanceDataResource.objectInfo} ${instanceDataResource.relatedDetailId}" style="tableheadtext"/>
-                                <link text="${uiLabelMap.PageTitleEditCompDocInstance}" target="EditChildCompDoc"  style="buttontext">
-                                    <parameter param-name="contentId" from-field="assocRevisionItemView.contentId"/>
-                                    <parameter param-name="rootContentId" from-field="assocRevisionItemView.contentIdTo"/>
-                                    <parameter param-name="caContentAssocTypeId" from-field="assocRevisionItemView.contentAssocTypeId"/>
-                                    <parameter param-name="caFromDate" from-field="assocRevisionItemView.fromDate"/>
-                                    <parameter param-name="contentRevisionSeqId" from-field="assocRevisionItemView.maxRevisionSeqId"/>
-                                    <parameter param-name="rootContentRevisionSeqId"/>
-                                </link>
-                                <link text="${uiLabelMap.ContentCompDocGeneratePDF}" target="GenContentPdf" style="buttontext">
-                                    <parameter param-name="contentId" from-field="assocRevisionItemView.contentId"/>
-                                    <parameter param-name="caSequenceNum" from-field="sequenceNum"/>
-                                </link>
-                            </container>
-                        </widgets>
-                    </section>
-                </iterate-section>
-            </widgets>
-        </section>
-    </screen>
-
-    <screen name="EditContentRevisionAndItem">
-        <section>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <include-form name="EditContentRevisionAndItem" location="component://content/widget/compdoc/CompDocForms.xml"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="EditCompDocContentRole">
-        <section>
-            <condition>
-                <if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
-            </condition>
-            <actions>
-                <set field="menuName" value="tree"/>
-                <set field="titleProperty" value="ContentCompDocContentRoleEditPage"/>
-                <set field="currentMenuItemName" value="role"/>
-
-                <set field="defaultContentId" from-field="contentId" from-scope="user"/>
-                <set field="contentId" from-field="parameters.contentId" to-scope="screen" default-value="${defaultContentId}"/>
-                <set field="contentId" from-field="contentId" to-scope="user"/>
-                <set field="contentRoleTarget" value="CompDoc"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
-                    <decorator-section name="body">
-                        <include-form name="ListContentRole" location="component://content/widget/content/ContentForms.xml"/>
-                        <include-form name="AddContentRole" location="component://content/widget/content/ContentForms.xml"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="ViewCompDocContent">
-        <section>
-            <actions>
-                <entity-one entity-name="Content" value-field="content" use-cache="true"/>
-                <entity-one entity-name="DataResource" value-field="dataResource" use-cache="true">
-                    <field-map field-name="dataResourceId" from-field="content.dataResourceId"/>
-                </entity-one>
-            </actions>
-            <widgets>
-                <section>
-                    <condition>
-                        <or>
-                            <if-compare field="dataResource.dataResourceTypeId" operator="equals" value="SURVEY"/>
-                            <if-compare field="dataResource.dataResourceTypeId" operator="equals" value="SURVEY_RESPONSE"/>
-                        </or>
-                    </condition>
-                    <widgets>
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                        <not>
-                            <or>
-                                <if-compare field="dataResource.dataResourceTypeId" operator="equals" value="SURVEY"/>
-                                <if-compare field="dataResource.dataResourceTypeId" operator="equals" value="SURVEY_RESPONSE"/>
-                            </or>
-                        </not>
-                    </condition>
-                    <widgets>
-                    </widgets>
-                </section>
-            </widgets>
-        </section>
-    </screen>
-</screens>
diff --git a/applications/content/widget/compdoc/CompDocTemplateTree.xml b/applications/content/widget/compdoc/CompDocTemplateTree.xml
deleted file mode 100644
index de20c25..0000000
--- a/applications/content/widget/compdoc/CompDocTemplateTree.xml
+++ /dev/null
@@ -1,157 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<trees xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xmlns="http://ofbiz.apache.org/Widget-Tree" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Tree http://ofbiz.apache.org/dtds/widget-tree.xsd">
-    <tree name="CompDocTemplateTree" entity-name="Content" root-node-name="node-root"
-        default-render-style="simple" default-wrap-style="treeWrapper">
-        <node name="node-root" wrap-style="treeWrapper">
-            <entity-one entity-name="Content" use-cache="false">
-                <field-map field-name="contentId" from-field="rootContentId"/>
-            </entity-one>
-            <include-screen name="rootTemplateLine" location="component://content/widget/compdoc/CompDocScreens.xml"/>
-            <sub-node node-name="node-body">
-                <entity-condition entity-name="AssocRevisionItemView" use-cache="false">
-                   <condition-list combine="and">
-                        <condition-expr field-name="contentIdTo" operator="equals" from-field="rootContentId"/>
-                        <condition-expr field-name="rootRevisionContentId" operator="equals" from-field="rootContentId"/>
-                        <condition-expr field-name="contentRevisionSeqId" operator="less-equals" from-field="rootContentRevisionSeqId" ignore-if-null="true"/>
-                        <condition-expr field-name="contentAssocTypeId" operator="equals" value="COMPDOC_PART"/>
-                        <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/>
-                        <condition-list combine="or">
-                            <condition-expr field-name="thruDate" operator="equals" value=""/>
-                            <condition-expr field-name="thruDate" operator="greater" from-field="nowTimestamp"/>
-                        </condition-list>
-                   </condition-list>
-
-                   <select-field field-name="rootRevisionContentId"/>
-                   <select-field field-name="itemContentId"/>
-                   <select-field field-name="maxRevisionSeqId"/>
-                   <select-field field-name="contentId"/>
-                   <select-field field-name="contentIdTo"/>
-                   <select-field field-name="contentAssocTypeId"/>
-                   <select-field field-name="fromDate"/>
-                   <select-field field-name="sequenceNum"/>
-
-                   <order-by field-name="sequenceNum"/>
-                </entity-condition>
-            </sub-node>
-        </node>
-        <node name="node-body" join-field-name="itemContentId" entity-name="AssocRevisionItemView" wrap-style="treeWrapper">
-            <entity-one entity-name="Content" use-cache="false">
-                <field-map field-name="contentId" from-field="itemContentId"/>
-            </entity-one>
-            <include-screen name="childTemplateLine" location="component://content/widget/compdoc/CompDocScreens.xml"/>
-            <sub-node node-name="node-body">
-                <entity-condition entity-name="AssocRevisionItemView" use-cache="false">
-                   <condition-list combine="and">
-                        <condition-expr field-name="contentIdTo" operator="equals" from-field="contentId"/>
-                        <condition-expr field-name="rootRevisionContentId" operator="equals" from-field="rootContentId"/>
-                        <condition-expr field-name="contentAssocTypeId" operator="equals" value="COMPDOC_PART"/>
-                        <condition-expr field-name="contentRevisionSeqId" operator="less-equals" from-field="rootContentRevisionSeqId" ignore-if-null="true"/>
-                        <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/>
-                        <condition-list combine="or">
-                            <condition-expr field-name="thruDate" operator="equals" value=""/>
-                            <condition-expr field-name="thruDate" operator="greater" from-field="nowTimestamp"/>
-                        </condition-list>
-                   </condition-list>
-
-                   <select-field field-name="rootRevisionContentId"/>
-                   <select-field field-name="itemContentId"/>
-                   <select-field field-name="maxRevisionSeqId"/>
-                   <select-field field-name="contentId"/>
-                   <select-field field-name="contentIdTo"/>
-                   <select-field field-name="contentAssocTypeId"/>
-                   <select-field field-name="fromDate"/>
-                   <select-field field-name="sequenceNum"/>
-
-                   <order-by field-name="sequenceNum"/>
-                </entity-condition>
-           </sub-node>
-        </node>
-    </tree>
-
-    <tree name="CompDocInstanceTree" entity-name="Content" root-node-name="node-root"
-        default-render-style="simple" default-wrap-style="treeWrapper">
-        <node name="node-root">
-            <entity-one entity-name="Content" use-cache="false">
-                <field-map field-name="contentId" from-field="instanceContent.instanceOfContentId"/>
-            </entity-one>
-            <include-screen name="rootInstanceLine" location="component://content/widget/compdoc/CompDocScreens.xml"/>
-            <sub-node node-name="node-body">
-                <entity-condition entity-name="AssocRevisionItemView" use-cache="false">
-                   <condition-list combine="and">
-                        <condition-expr field-name="contentIdTo" operator="equals" from-field="templateContentId"/>
-                        <condition-expr field-name="rootRevisionContentId" operator="equals" from-field="templateContentId"/>
-                        <condition-expr field-name="contentRevisionSeqId" operator="less-equals" from-field="templateContentRevisionSeqId" ignore-if-null="true"/>
-                        <condition-expr field-name="contentAssocTypeId" operator="equals" value="COMPDOC_PART"/>
-                        <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/>
-                        <condition-list combine="or">
-                            <condition-expr field-name="thruDate" operator="equals" value=""/>
-                            <condition-expr field-name="thruDate" operator="greater" from-field="nowTimestamp"/>
-                        </condition-list>
-                   </condition-list>
-
-                   <select-field field-name="rootRevisionContentId"/>
-                   <select-field field-name="itemContentId"/>
-                   <select-field field-name="maxRevisionSeqId"/>
-                   <select-field field-name="contentId"/>
-                   <select-field field-name="contentIdTo"/>
-                   <select-field field-name="contentAssocTypeId"/>
-                   <select-field field-name="fromDate"/>
-                   <select-field field-name="sequenceNum"/>
-
-                   <order-by field-name="sequenceNum"/>
-                </entity-condition>
-            </sub-node>
-        </node>
-        <node name="node-body" join-field-name="itemContentId" entity-name="AssocRevisionItemView">
-            <entity-one entity-name="Content" use-cache="false">
-                <field-map field-name="contentId" from-field="itemContentId"/>
-            </entity-one>
-            <include-screen name="childInstanceLine" location="component://content/widget/compdoc/CompDocScreens.xml"/>
-            <sub-node node-name="node-body">
-                <entity-condition entity-name="AssocRevisionItemView" use-cache="false">
-                   <condition-list combine="and">
-                        <condition-expr field-name="contentIdTo" operator="equals" from-field="contentId"/>
-                        <condition-expr field-name="rootRevisionContentId" operator="equals" from-field="templateContentId"/>
-                        <condition-expr field-name="contentAssocTypeId" operator="equals" value="COMPDOC_PART"/>
-                        <condition-expr field-name="contentRevisionSeqId" operator="less-equals" from-field="templateContentRevisionSeqId"/>
-                        <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/>
-                        <condition-list combine="or">
-                            <condition-expr field-name="thruDate" operator="equals" value=""/>
-                            <condition-expr field-name="thruDate" operator="greater" from-field="nowTimestamp"/>
-                        </condition-list>
-                   </condition-list>
-
-                   <select-field field-name="rootRevisionContentId"/>
-                   <select-field field-name="itemContentId"/>
-                   <select-field field-name="maxRevisionSeqId"/>
-                   <select-field field-name="contentId"/>
-                   <select-field field-name="contentIdTo"/>
-                   <select-field field-name="contentAssocTypeId"/>
-                   <select-field field-name="fromDate"/>
-                   <select-field field-name="sequenceNum"/>
-
-                   <order-by field-name="sequenceNum"/>
-                </entity-condition>
-           </sub-node>
-        </node>
-    </tree>
-</trees>
diff --git a/applications/content/widget/content/ContentMenus.xml b/applications/content/widget/content/ContentMenus.xml
index 7941d93..d60f7a9 100644
--- a/applications/content/widget/content/ContentMenus.xml
+++ b/applications/content/widget/content/ContentMenus.xml
@@ -30,7 +30,6 @@ under the License.
         <menu-item name="DataResourceSetupMenu" title="${uiLabelMap.ContentDataSetup}"><link target="DataSetupMenu"/></menu-item>
         <menu-item name="Layout" title="${uiLabelMap.ContentTemplate}"><link target="LayoutMenu"/></menu-item>
         <menu-item name="CMS" title="${uiLabelMap.ContentCMS}"><link target="CMSContentFind"/></menu-item>
-        <menu-item name="CompDoc" title="${uiLabelMap.ContentCompDoc}"><link target="FindCompDoc"/></menu-item>
     </menu>
 
     <menu name="ContentShortcutAppBar" title="${uiLabelMap.ContentContentManager}">
@@ -44,7 +43,6 @@ under the License.
         <menu-item name="DataResourceSetupMenu" title="${uiLabelMap.ContentDataSetup}"><link target="DataSetupMenu" url-mode="inter-app"/></menu-item>
         <menu-item name="Layout" title="${uiLabelMap.ContentTemplate}"><link target="LayoutMenu" url-mode="inter-app"/></menu-item>
         <menu-item name="CMS" title="${uiLabelMap.ContentCMS}"><link target="CMSContentFind" url-mode="inter-app"/></menu-item>
-        <menu-item name="CompDoc" title="${uiLabelMap.ContentCompDoc}"><link target="FindCompDoc" url-mode="inter-app"/></menu-item>
     </menu>
 
     <menu name="content"  menu-container-style="button-bar tab-bar" default-selected-style="selected" default-menu-item-name="content" default-permission-operation="HAS_AUTHOR_ROLE|CONTENT_ADMIN"
diff --git a/applications/datamodel/data/demo/ContentDemoData.xml b/applications/datamodel/data/demo/ContentDemoData.xml
index 83986b8..bb74fc0 100644
--- a/applications/datamodel/data/demo/ContentDemoData.xml
+++ b/applications/datamodel/data/demo/ContentDemoData.xml
@@ -346,14 +346,6 @@ David won't like it. He will probably delete this seed data from the DB, but it
     <ContentPurpose contentId="CONTENT_SITE" contentPurposeTypeId="ARTICLE"/>
     <ContentPurpose contentId="CONTENT_SITE" contentPurposeTypeId="RESPONSE"/>
 
-    <!-- CompDoc Demo Data -->
-    <SecurityGroup groupId="COMPDOCADMIN" description="CompDoc admin group, all permissions." groupName="CompDoc Admin"/>
-    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="COMPDOCADMIN" permissionId="CONTENTMGR_VIEW"/>
-    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="COMPDOCADMIN" permissionId="CONTENTMGR_CREATE"/>
-    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="COMPDOCADMIN" permissionId="CONTENTMGR_DELETE"/>
-    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="COMPDOCADMIN" permissionId="CONTENTMGR_UPDATE"/>
-    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="COMPDOCADMIN" permissionId="CONTENTMGR_ADMIN"/>
-
     <RoleType roleTypeId="APPROVER" description="Approver"/>
     <RoleType roleTypeId="REVIEWER" description="Reviewer"/>
     <Party partyId="approver" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
@@ -363,7 +355,6 @@ David won't like it. He will probably delete this seed data from the DB, but it
     <PartyRole partyId="admin" roleTypeId="APPROVER"/>
     <PartyStatus partyId="approver" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>
     <UserLogin userLoginId="approver" partyId="approver"/>
-    <UserLoginSecurityGroup groupId="COMPDOCADMIN" userLoginId="approver" fromDate="2006-01-01 12:00:00.0"/>
 
 
     <DataResource dataResourceId="DR1103b" dataResourceTypeId="OFBIZ_FILE_BIN" objectInfo="/applications/content/data/pdftest2.pdf" mimeTypeId="application/pdf" dataResourceName="Personal Profile"/>
@@ -387,10 +378,6 @@ David won't like it. He will probably delete this seed data from the DB, but it
     <DataResource dataResourceId="DR1115"  mimeTypeId="application/pdf" dataResourceName="Performance Review"/>
     <DataResource dataResourceId="DR1116"  mimeTypeId="application/pdf" dataResourceName="Other Upload"/>
 
-    <!-- A CDT (Composite Document Template) that can be used independently, or as part of CD0001 defined below -->
-    <Content contentId="CDT1201" contentTypeId="COMPDOC_TEMPLATE" contentName="Demo Template Root (CDT) 1201"/>
-
-
     <Content contentId="CDT1101" dataResourceId="DR1101" contentTypeId="TEMPLATE" contentName="Letter of inquiry"/>
     <Content contentId="CDT1102" dataResourceId="DR1102" contentTypeId="TEMPLATE" contentName="POA Contract"/>
     <Content contentId="CDT1103" dataResourceId="DR1103" contentTypeId="TEMPLATE" contentName="Personal Profile"/>
@@ -408,88 +395,8 @@ David won't like it. He will probably delete this seed data from the DB, but it
     <Content contentId="CDT1115" dataResourceId="DR1115" contentTypeId="TEMPLATE" contentName="Performance Review"/>
     <Content contentId="CDT1116" dataResourceId="DR1116" contentTypeId="TEMPLATE" contentName="Other Upload"/>
 
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1101" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0010"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1102" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0020"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1103" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0030"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1104" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0040"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1105" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0050"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1106" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0060"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1107" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0070"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1108" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0080"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1109" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0090"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1110" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0100"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1111" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0110"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1112" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0120"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1113" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0130"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1114" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0140"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1115" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0150"/>
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDT1116" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0160"/>
-
-    <!-- sample instances CDT CDT1201 -->
-    <Content contentId="CDI1201" instanceOfContentId="CDT1201" contentTypeId="COMPDOC_INSTANCE" contentName="Demo Instance Root (CDI) 1201"/>
     <Content contentId="CDI1103" instanceOfContentId="CDT1103" dataResourceId="DR1103b" contentTypeId="DOCUMENT" contentName="Personal Profile"/>
 
-    <ContentAssoc contentIdTo="CDT1201" contentId="CDI1201" contentAssocTypeId="INSTANCE" fromDate="2006-01-12 01:01:01" sequenceNum="0020"/>
-    <ContentAssoc contentIdTo="CDI1201" contentId="CDI1103" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="00130"/>
-
-    <!-- sample revision entries for CDT CDT1201 -->
-    <ContentRevision contentId="CDT1201" contentRevisionSeqId="000002"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1101"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1102"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1103"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1104"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1105"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1106"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1107"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1108"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1109"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1110"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1111"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1112"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1113"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1114"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1115"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000002" itemContentId="CDT1116"/>
-
-    <ContentRevision contentId="CDT1201" contentRevisionSeqId="000004"/>
-
-    <ContentRevision contentId="CDT1201" contentRevisionSeqId="000013"/>
-    <ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000013" itemContentId="CDT1103" oldDataResourceId="DR1103a" newDataResourceId="DR1103b"/>
-
-    <ContentRevision contentId="CDI1201" contentRevisionSeqId="000005"/>
-    <ContentRevisionItem contentId="CDI1201" contentRevisionSeqId="000005" itemContentId="CDI1103" newDataResourceId="DR1103a"/>
-    <ContentRevision contentId="CDI1201" contentRevisionSeqId="000006"/>
-
-    <ContentRevision contentId="CDI1201" contentRevisionSeqId="000009"/>
-    <ContentRevisionItem contentId="CDI1201" contentRevisionSeqId="000009" itemContentId="CDI1103" oldDataResourceId="DR1103a" newDataResourceId="DR1103b"/>
-    <ContentRevision contentId="CDI1201" contentRevisionSeqId="000010"/>
-
-    <ContentRevision contentId="CDI1201" contentRevisionSeqId="000013"/>
-    <ContentRevisionItem contentId="CDI1201" contentRevisionSeqId="000013" itemContentId="CDI1103" oldDataResourceId="DR1103a" newDataResourceId="DR1103b"/>
-    <ContentRevision contentId="CDI1201" contentRevisionSeqId="000014"/>
-
-
-    <!-- sample approval entries for CDT CD0001 -->
-    <ContentApproval contentApprovalId="CA0101" contentId="CDT1201" contentRevisionSeqId="000002" partyId="admin" approvalStatusId="CNTAP_READY"/>
-    <ContentApproval contentApprovalId="CA0102" contentId="CDT1201" contentRevisionSeqId="000002" partyId="approver" approvalStatusId="CNTAP_READY"/>
-    <ContentApproval contentApprovalId="CA0103" contentId="CDT1201" contentRevisionSeqId="000002" roleTypeId="APPROVER" approvalStatusId="CNTAP_READY"/>
-    <ContentApproval contentApprovalId="CA0104" contentId="CDT1201" contentRevisionSeqId="000002" roleTypeId="REVIEWER" approvalStatusId="CNTAP_READY"/>
-
-    <ContentApproval contentApprovalId="CA0111" contentId="CDT1201" contentRevisionSeqId="000004" partyId="admin" approvalStatusId="CNTAP_READY"/>
-    <ContentApproval contentApprovalId="CA0112" contentId="CDT1201" contentRevisionSeqId="000004" partyId="approver" approvalStatusId="CNTAP_READY"/>
-    <ContentApproval contentApprovalId="CA0113" contentId="CDT1201" contentRevisionSeqId="000004" roleTypeId="APPROVER" approvalStatusId="CNTAP_READY"/>
-    <ContentApproval contentApprovalId="CA0114" contentId="CDT1201" contentRevisionSeqId="000004" roleTypeId="REVIEWER" approvalStatusId="CNTAP_READY"/>
-
-    <ContentApproval contentApprovalId="CA0121" contentId="CDT1201" contentRevisionSeqId="000013" partyId="admin" approvalStatusId="CNTAP_READY"/>
-    <ContentApproval contentApprovalId="CA0122" contentId="CDT1201" contentRevisionSeqId="000013" partyId="approver" approvalStatusId="CNTAP_READY"/>
-    <ContentApproval contentApprovalId="CA0123" contentId="CDT1201" contentRevisionSeqId="000013" roleTypeId="APPROVER" approvalStatusId="CNTAP_READY"/>
-    <ContentApproval contentApprovalId="CA0124" contentId="CDT1201" contentRevisionSeqId="000013" roleTypeId="REVIEWER" approvalStatusId="CNTAP_READY"/>
-
-    <ContentApproval contentApprovalId="CA0221" contentId="CDI1201" contentRevisionSeqId="000010" partyId="admin" sequenceNum="10" approvalStatusId="CNTAP_APPROVED"/>
-    <ContentApproval contentApprovalId="CA0122" contentId="CDI1201" contentRevisionSeqId="000010" partyId="approver" sequenceNum="20" approvalStatusId="CNTAP_APPROVED"/>
-    <ContentApproval contentApprovalId="CA0123" contentId="CDI1201" contentRevisionSeqId="000010" roleTypeId="APPROVER" sequenceNum="30" approvalStatusId="CNTAP_SOFT_REJ"/>
-    <ContentApproval contentApprovalId="CA0124" contentId="CDI1201" contentRevisionSeqId="000010" roleTypeId="REVIEWER" sequenceNum="40" approvalStatusId="CNTAP_READY"/>
-
     <!-- Forum Demo Data -->
     <!-- ForumGroups -->
     <Content contentId="WebStoreFORUM" contentTypeId="FORUM_ROOT" contentName="WebStore Forum Root" description="Ecommerce Forums" childBranchCount="3"/>
diff --git a/applications/datamodel/data/seed/ContentSeedData.xml b/applications/datamodel/data/seed/ContentSeedData.xml
index aae7cb3..ef329b1 100644
--- a/applications/datamodel/data/seed/ContentSeedData.xml
+++ b/applications/datamodel/data/seed/ContentSeedData.xml
@@ -39,7 +39,6 @@ under the License.
     <ContentAssocType contentAssocTypeId="AUTHOR" description="Author"/>
     <ContentAssocType contentAssocTypeId="SUMMARY" description="Summary"/>
 
-    <ContentAssocType contentAssocTypeId="COMPDOC_PART" description="Composite Document Part"/>
     <ContentAssocType contentAssocTypeId="INSTANCE" description="Instance Of"/>
     <ContentAssocType contentAssocTypeId="ALTERNATIVE_URL" description="Alternative URL"/>
 
@@ -86,9 +85,6 @@ under the License.
     <ContentType contentTypeId="PERSON" description="Person" parentTypeId="PLACEHOLDER"/>
     <ContentType contentTypeId="TOPIC" description="Topic" parentTypeId="PLACEHOLDER"/>
 
-    <ContentType contentTypeId="COMPDOC_TEMPLATE" description="Composite Document Template"/>
-    <ContentType contentTypeId="COMPDOC_INSTANCE" description="Composite Document Instance"/>
-
     <DataResourceType dataResourceTypeId="LOCAL_FILE" description="Local File" hasTable="N"/>
     <DataResourceType dataResourceTypeId="OFBIZ_FILE" description="File (rel to OFBIZ_HOME)" hasTable="N"/>
     <DataResourceType dataResourceTypeId="CONTEXT_FILE" description="File (rel to webapp root)" hasTable="N"/>
diff --git a/applications/datamodel/entitydef/content-entitymodel.xml b/applications/datamodel/entitydef/content-entitymodel.xml
index 6b3a524..712ac5b 100644
--- a/applications/datamodel/entitydef/content-entitymodel.xml
+++ b/applications/datamodel/entitydef/content-entitymodel.xml
@@ -30,7 +30,6 @@ under the License.
   <!-- ========================================================= -->
   <!-- ======================== Data Model ===================== -->
   <!-- The modules in this file are as follows:                  -->
-  <!--  - org.apache.ofbiz.content.compdoc -->
   <!--  - org.apache.ofbiz.content.content -->
   <!--  - org.apache.ofbiz.content.data -->
   <!--  - org.apache.ofbiz.content.document -->
@@ -40,79 +39,6 @@ under the License.
   <!--  - org.apache.ofbiz.content.website -->
   <!-- ========================================================= -->
 
-  <!-- ========================================================= -->
-  <!-- org.apache.ofbiz.content.compdoc -->
-  <!-- ========================================================= -->
-
-    <view-entity entity-name="AssocRevisionItemView"
-                package-name="org.apache.ofbiz.content.compdoc"
-                title="Latest Revision Children">
-      <member-entity entity-alias="CRI" entity-name="ContentRevisionItem"/>
-      <member-entity entity-alias="CA" entity-name="ContentAssoc"/>
-      <alias entity-alias="CA" name="contentId" group-by="true"/>
-      <alias entity-alias="CA" name="contentIdTo" group-by="true"/>
-      <alias entity-alias="CA" name="contentAssocTypeId" group-by="true"/>
-      <alias entity-alias="CA" name="thruDate" group-by="true"/>
-      <alias entity-alias="CA" name="fromDate" group-by="true"/>
-      <alias entity-alias="CA" name="sequenceNum" group-by="true"/>
-      <alias entity-alias="CRI" name="rootRevisionContentId" field="contentId" group-by="true"/>
-      <alias entity-alias="CRI" name="itemContentId" group-by="true"/>
-      <alias entity-alias="CRI" name="contentRevisionSeqId" group-by="true"/>
-      <alias entity-alias="CRI" name="maxRevisionSeqId" field="contentRevisionSeqId" function="max"/>
-      <view-link entity-alias="CA" rel-entity-alias="CRI">
-        <key-map field-name="contentId" rel-field-name="itemContentId"/>
-      </view-link>
-    </view-entity>
-    <view-entity entity-name="ContentAssocRevisionItemView"
-                package-name="org.apache.ofbiz.content.compdoc"
-                title="Latest Revision Children">
-      <member-entity entity-alias="C" entity-name="Content"/>
-      <member-entity entity-alias="CRI" entity-name="ContentRevisionItem"/>
-      <member-entity entity-alias="CA" entity-name="ContentAssoc"/>
-      <alias entity-alias="C" name="instanceOfContentId" group-by="true"/>
-      <alias entity-alias="C" name="dataResourceId" group-by="true"/>
-      <alias entity-alias="CA" name="contentId" group-by="true"/>
-      <alias entity-alias="CA" name="contentIdTo" group-by="true"/>
-      <alias entity-alias="CA" name="contentAssocTypeId" group-by="true"/>
-      <alias entity-alias="CA" name="thruDate" group-by="true"/>
-      <alias entity-alias="CA" name="fromDate" group-by="true"/>
-      <alias entity-alias="CA" name="sequenceNum" group-by="true"/>
-      <alias entity-alias="CRI" name="rootRevisionContentId" field="contentId" group-by="true"/>
-      <alias entity-alias="CRI" name="itemContentId" group-by="true"/>
-      <alias entity-alias="CRI" name="contentRevisionSeqId" group-by="false"/>
-      <alias entity-alias="CRI" name="maxRevisionSeqId" field="contentRevisionSeqId" function="max"/>
-      <view-link entity-alias="C" rel-entity-alias="CA">
-        <key-map field-name="contentId" rel-field-name="contentId"/>
-      </view-link>
-      <view-link entity-alias="CA" rel-entity-alias="CRI">
-        <key-map field-name="contentId" rel-field-name="itemContentId"/>
-      </view-link>
-    </view-entity>
-    <view-entity entity-name="MaxRevisionItemView"
-                package-name="org.apache.ofbiz.content.compdoc"
-                title="Latest Revision Children">
-      <member-entity entity-alias="CRI" entity-name="ContentRevisionItem"/>
-      <alias entity-alias="CRI" name="rootRevisionContentId" field="contentId" group-by="true"/>
-      <alias entity-alias="CRI" name="itemContentId" group-by="true"/>
-      <alias entity-alias="CRI" name="contentRevisionSeqId" group-by="false"/>
-      <alias entity-alias="CRI" name="maxRevisionSeqId" field="contentRevisionSeqId" function="max"/>
-    </view-entity>
-    <view-entity entity-name="MaxContentApprovalView"
-                package-name="org.apache.ofbiz.content.compdoc"
-                title="Latest ContentApproval">
-      <member-entity entity-alias="C" entity-name="Content"/>
-      <member-entity entity-alias="CA" entity-name="ContentApproval"/>
-      <alias entity-alias="C" name="contentTypeId"  group-by="true"/>
-      <alias entity-alias="CA" name="contentId"  group-by="true"/>
-      <alias entity-alias="CA" name="partyId"  group-by="true"/>
-      <alias entity-alias="CA" name="roleTypeId" group-by="true"/>
-      <alias entity-alias="CA" name="sequenceNum" group-by="false"/>
-      <alias entity-alias="CA" name="contentRevisionSeqId" group-by="false"/>
-      <alias entity-alias="CA" name="maxContentRevisionSeqId" field="contentRevisionSeqId" function="max"/>
-      <view-link entity-alias="C" rel-entity-alias="CA">
-        <key-map field-name="contentId" rel-field-name="contentId"/>
-      </view-link>
-    </view-entity>
     <view-entity entity-name="ContentAssocOptViewFrom"
                 package-name="org.apache.ofbiz.content.content"
                 title="Main Assoc To">
@@ -1627,24 +1553,6 @@ under the License.
             <key-map field-name="webSiteId"/>
         </relation>
     </entity>
-    <view-entity entity-name="ContentAssocAndContentPurpose"
-            package-name="org.apache.ofbiz.content.compdoc"
-            title="ContentAssoc and ContentPurpose View">
-        <member-entity entity-alias="CNTA" entity-name="ContentAssoc"/>
-        <member-entity entity-alias="CNTP" entity-name="ContentPurpose"/>
-        <alias entity-alias="CNTA" name="contentId"/>
-        <alias entity-alias="CNTA" name="contentIdTo"/>
-        <alias entity-alias="CNTA" name="contentAssocTypeId"/>
-        <alias entity-alias="CNTA" name="fromDate"/>
-        <alias entity-alias="CNTA" name="thruDate"/>
-        <alias entity-alias="CNTA" name="dataSourceId"/>
-        <alias entity-alias="CNTA" name="mapKey"/>
-        <alias entity-alias="CNTP" name="contentPurposeTypeId"/>
-        <alias entity-alias="CNTP" name="sequenceNum"/>
-        <view-link entity-alias="CNTA" rel-entity-alias="CNTP">
-            <key-map field-name="contentIdTo" rel-field-name="contentId"/>
-        </view-link>
-    </view-entity>
 
     <!-- defined as an extend and not directly in common to avoid dependencies between common and content -->
     <extend-entity entity-name="PortalPage">
diff --git a/applications/order/widget/ordermgr/CustRequestForms.xml b/applications/order/widget/ordermgr/CustRequestForms.xml
index e85c156..8d09922 100644
--- a/applications/order/widget/ordermgr/CustRequestForms.xml
+++ b/applications/order/widget/ordermgr/CustRequestForms.xml
@@ -656,7 +656,7 @@ under the License.
                 <entity-options description="${categoryName}" entity-name="DataCategory" key-field-name="dataCategoryId"/>
             </drop-down>
             </field>-->
-        <field name="contentIdFrom" title="${uiLabelMap.ContentCompDocParentContentId}"><lookup target-form-name="LookupDetailContentTree"/></field>
+        <field name="contentIdFrom" title="${uiLabelMap.ContentParentContentId}"><lookup target-form-name="LookupDetailContentTree"/></field>
         <field name="createButton"><submit button-type="button"/></field>
     </form>
     <form name="ListCustRequestContent" type="list" list-name="custRequestAndContents"
diff --git a/applications/party/widget/partymgr/CommunicationEventForms.xml b/applications/party/widget/partymgr/CommunicationEventForms.xml
index f6771e6..6f2565a 100644
--- a/applications/party/widget/partymgr/CommunicationEventForms.xml
+++ b/applications/party/widget/partymgr/CommunicationEventForms.xml
@@ -871,7 +871,7 @@ under the License.
         <field name="my"><hidden value="${my}"/></field>
         <field name="contentId" title="${uiLabelMap.FormFieldTitle_existContentId}"><lookup target-form-name="LookupTreeContent"/></field>
         <field name="uploadedFile" title="${uiLabelMap.ContentFile}"><file/></field>
-        <field name="contentIdFrom" title="${uiLabelMap.ContentCompDocParentContentId}"><lookup target-form-name="LookupDetailContentTree"/></field>
+        <field name="contentIdFrom" title="${uiLabelMap.ContentParentContentId}"><lookup target-form-name="LookupDetailContentTree"/></field>
         <field name="send" title="${uiLabelMap.CommonUpload}">
             <submit button-type="button"/>
         </field>
diff --git a/applications/product/widget/facility/FacilityForms.xml b/applications/product/widget/facility/FacilityForms.xml
index c0b9c09..ce68473 100644
--- a/applications/product/widget/facility/FacilityForms.xml
+++ b/applications/product/widget/facility/FacilityForms.xml
@@ -882,7 +882,7 @@ under the License.
             </drop-down>
         </field>
         <field name="dataResourceName" title="${uiLabelMap.CommonUpload}"><file/></field>
-        <field name="contentIdFrom" title="${uiLabelMap.ContentCompDocParentContentId}"><lookup target-form-name="LookupContent"/></field>
+        <field name="contentIdFrom" title="${uiLabelMap.ContentParentContentId}"><lookup target-form-name="LookupContent"/></field>
         <field name="createButton"><submit button-type="button"/></field>
     </form>
     
diff --git a/framework/security/config/SecurityEntityLabels.xml b/framework/security/config/SecurityEntityLabels.xml
index 6cf84fb..c45c338 100644
--- a/framework/security/config/SecurityEntityLabels.xml
+++ b/framework/security/config/SecurityEntityLabels.xml
@@ -65,13 +65,6 @@
         <value xml:lang="zh">有限的目录管理组,具有有限的目录权限。</value>
         <value xml:lang="zh-TW">有限的型錄管理群組,具有有限的型錄權限.</value>
     </property>
-    <property key="SecurityGroup.description.COMPDOCADMIN">
-        <value xml:lang="en">CompDoc admin group, all permissions.</value>
-        <value xml:lang="it">Gruppo permesso amministratore composizione documenti, ha tutti permessi di manutenzione.</value>
-        <value xml:lang="ja">複合文書管理グループは、すべての権限があります。</value>
-        <value xml:lang="zh">合成文档管理组,全部权限。</value>
-        <value xml:lang="zh-TW">複合檔管理群組,全部權限.</value>
-    </property>
     <property key="SecurityGroup.description.CONTENT_USER">
         <value xml:lang="en">Content user group; all limited content permissions.</value>
         <value xml:lang="es">Grupo de usuarios de contenidos; todos los permisos de contenido limitados</value>