首页 文章

在xsl文件中分组不会给我任何结果

提问于
浏览
1

嗨,谢谢你读这篇文章 . 我有一个制作xsl文件的问题 . 所以这就是我需要做的 .

我需要一个xsl文件,它从xml文件中获取数据(MySQL查询返回)并将其转换为可在DHTMLX树视图中使用的xml结构 .

这是我必须从哪里开始的xml文件 .

<dbqueries>
    <environment>PRD</environment>
    <label>ConfigNewReport</label>
    <description>ConfigNewReport</description>
    <dbquery id="algemeen_overview">
        <descriptor>
            <database>dbnode</database>
            <originalquery>
SELECT * FROM local_parser_lrf_man where rapport is not null
</originalquery>
            <querystring>
SELECT * FROM local_parser_lrf_man where rapport is not null
</querystring>
        </descriptor>
        <columns>
            <column name="Path" type="VARCHAR" />
            <column name="File" type="VARCHAR" />
            <column name="DBWEB" type="VARCHAR" />
            <column name="XMLWEB" type="VARCHAR" />
            <column name="rapport" type="VARCHAR" />
            <column name="niveau" type="INT" />
            <column name="rapport_nr" type="INT" />
        </columns>
        <rows>
            <row Path="\lrf_descriptors\XMLWeb\BFB\CODIR_2014_LBA.xml" File="CODIR_2014_LBA.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/CODIR_2014_LBA.xml" XMLWEB="BFB/XSL/CODIR_2014_LBA.xsl" rapport="COCKPIT DGBF" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\trends.xml" File="trends.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/trends_new.xml" XMLWEB="BFB/XSL/trendsData.xsl" rapport="COCKPIT DGBF" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\CODIR_2014.xml" File="CODIR_2014.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/CODIR_2014.xml" XMLWEB="BFB/XSL/CODIR_2014.xsl" rapport="CoDir" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\COCKPIT.xml" File="COCKPIT.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/CODIR_2014_LBA.xml" XMLWEB="BFB/XSL/COKPIT.xsl" rapport="COCKPIT DGBF" niveau="0" rapport_nr="73" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\MONITORING_BCOM_PR.xml" File="MONITORING_BCOM_PR.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/MONITORING_BCOM_PR.xml" XMLWEB="BFB/XSL/MONITORING_BCOM_PR.xsl" rapport="PR to COMMIT" niveau="0" rapport_nr="74" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\CODIR_2016_XLS.xml" File="CODIR_2016_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/CODIR_2016.xml" XMLWEB="BFB/XSL/CODIR_2016_XLS.xsl" rapport="CoDir" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\CODIR_2013_XLS.xml" File="CODIR_2013_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/CODIR.xml" XMLWEB="BFB/XSL/CODIR_2013_XLS.xsl" rapport="CoDir" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\CODIR_2013.xml" File="CODIR_2013.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/CODIR.xml" XMLWEB="BFB/XSL/CODIR_2013.xsl" rapport="CoDir" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\CODIR.xml" File="CODIR.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/CODIR.xml" XMLWEB="BFB/XSL/CODIR.xsl" rapport="CoDir" niveau="0" rapport_nr="45" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\COKPIT_LAYOUT.xml" File="COKPIT_LAYOUT.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/CODIR_2014_LBA.xml" XMLWEB="BFB/XSL/COKPIT_LAYOUT.xsl" rapport="COCKPIT DGBF" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\EDA.xml" File="EDA.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/EDA.xml" XMLWEB="BFB/XSL/EDA.xsl" rapport="Rapport EDA" niveau="0" rapport_nr="84" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\trends1.xml" File="trends1.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/trends_new.xml" XMLWEB="BFB/XSL/trendsData1.xsl" rapport="COCKPIT DGBF" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\CODIR_2016.xml" File="CODIR_2016.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/CODIR_2016.xml" XMLWEB="BFB/XSL/CODIR_2016.xsl" rapport="CoDir" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\CODIR_XLS.xml" File="CODIR_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/CODIR_2014.xml" XMLWEB="BFB/XSL/CODIR_XLS.xsl" rapport="CoDir" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\CODIR_2014_LBA_GRAPH.xml" File="CODIR_2014_LBA_GRAPH.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/CODIR_2014_LBA.xml" XMLWEB="BFB/XSL/CODIR_2014_LBA_GRAPH.xsl" rapport="COCKPIT DGBF" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\BFB\COKPIT_XLS.xml" File="COKPIT_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/BFB/BP_BG_TOT_DOPABA_PR_XLS.xml" XMLWEB="BFB/XSL/COKPIT_XLS.xsl" rapport="COCKPIT DGBF" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\NC_BFAL_BIS.xml" File="NC_BFAL_BIS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/NC_BFAL_BIS.xml" XMLWEB="Rapports/NC_BFAL_BIS.xsl" rapport="credit notes and their available(STATUS U,G,M,S,W,R)" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\ORDER_EVOL_BIS.xml" File="ORDER_EVOL_BIS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/ORDER_EVOL.xml" XMLWEB="Rapports/ORDER_EVOL_BIS.xsl" rapport="Evolution orders by DOPA-BA-LBA-CT(monthly) " niveau="0" rapport_nr="29" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\DIM_VISUM.xml" File="DIM_VISUM.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/DIM_VISUM.xml" XMLWEB="Rapports/DIM_VISUM.xsl" rapport="visum diminutions" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\DIM_VISUM_1.xml" File="DIM_VISUM_1.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/DIM_VISUM.xml" XMLWEB="Rapports/DIM_VISUM_1.xsl" rapport="visum diminutions" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\IR.xml" File="IR.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/ILIAS_ROLE.xml" XMLWEB="Rapports/IR.xsl" rapport="ILIAS role by user" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\ILIAS_ROL_DET.xml" File="ILIAS_ROL_DET.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/ILIAS_ROLE.xml" XMLWEB="Rapports/ILIAS_ROL_DET.xsl" rapport="ILIAS role by user" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\DIM_VISUM_XLS.xml" File="DIM_VISUM_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/DIM_VISUM.xml" XMLWEB="Rapports/DIM_VISUM_XLS.xsl" rapport="visum diminutions" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\DU.xml" File="DU.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/DU.xml" XMLWEB="Rapports/DU.xsl" rapport="Rights of use" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\BFB_SIT_LEVEL_3.xml" File="BFB_SIT_LEVEL_3.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/BFB_SIT_LEVEL_2.xml" XMLWEB="Rapports/BFB_SIT_LEVEL_3.xsl" rapport="Analytic Image - System" niveau="4" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\PAYMENT_TERM_REGROUP.xml" File="PAYMENT_TERM_REGROUP.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/PAYMENT_TERM.xml" XMLWEB="Rapports/PAYMENT_TERM_REGROUP.xsl" rapport="PAYMENT_TERM" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\DIM_VISUM_HEAD.xml" File="DIM_VISUM_HEAD.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/DIM_VISUM.xml" XMLWEB="Rapports/DIM_VISUM_HEAD.xsl" rapport="visum diminutions" niveau="0" rapport_nr="26" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\INV_COUNT.xml" File="INV_COUNT.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/INV_BIS.xml" XMLWEB="Rapports/INV_COUNT.xsl" rapport="PINV counting per STATUS and YEAR " niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\COM_ORD_EVOL.xml" File="COM_ORD_EVOL.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/tab.xml" XMLWEB="Rapports/COM_ORD_EVOL.xsl" rapport="Evolution COM/ORD by month or days" niveau="0" rapport_nr="24" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\DU_XLS.xml" File="DU_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/DU.xml" XMLWEB="Rapports/DU_XLS.xsl" rapport="Rights of use" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\ORD_MONTH.xml" File="ORD_MONTH.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/ORD_MONTH1.xml" XMLWEB="Rapports/ORD_MONTH.xsl" rapport="Evolution COM/ORD by month or days" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\INVOICE_STAT_PART2.xml" File="INVOICE_STAT_PART2.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/INVOICE_STAT.xml" XMLWEB="Rapports/INVOICE_STAT_PART2.xsl" rapport="Payment Terms and To late payment" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\DC_DETAIL.xml" File="DC_DETAIL.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/DC.xml" XMLWEB="Rapports/DC_DETAIL.xsl" rapport="Monitoring of credit demands by LBA" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\DU_HEAD.xml" File="DU_HEAD.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/tab.xml" XMLWEB="Rapports/DU_HEAD.xsl" rapport="Rights of use" niveau="0" rapport_nr="35" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\BUD_OVERVIEW_XLS.xml" File="BUD_OVERVIEW_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/BUD_OVERVIEW.xml" XMLWEB="Rapports/BUD_OVERVIEW_XLS.xsl" rapport="Level DOPA BA LBA -Sum of invoice's amount (Free margin) " niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\BUD_OVERVIEW_INV_XLS.xml" File="BUD_OVERVIEW_INV_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/BUD_OVERVIEW_INV.xml" XMLWEB="Rapports/BUD_OVERVIEW_INV_XLS.xsl" rapport="Level DOPA BA LBA -Sum of invoice's amount (Free margin) " niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\COM_MONTH.xml" File="COM_MONTH.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/COM_MONTH1.xml" XMLWEB="Rapports/COM_MONTH.xsl" rapport="Evolution COM/ORD by month or days" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\CONTRAT_XLS.xml" File="CONTRAT_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/Contrat.xml" XMLWEB="Rapports/CONTRAT_XLS.xsl" rapport="Monitoring of PAID/ORDERED_TO_PAY invoices by FIRM/CONTRACT (PAYMENT YEAR&gt;2011) " niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\COM_EVOL_PDF1.xml" File="COM_EVOL_PDF1.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/COM_EVOL_PDF1.xml" XMLWEB="DB" rapport="Weekly budget report (DGMR)" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\BUD_OVERVIEW_INV.xml" File="BUD_OVERVIEW_INV.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/BUD_OVERVIEW_INV.xml" XMLWEB="Rapports/BUD_OVERVIEW_INV.xsl" rapport="Level DOPA BA LBA -Sum of invoice's amount (Free margin) " niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\BFB_SIT.xml" File="BFB_SIT.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/BFB_SIT.xml" XMLWEB="Rapports/BFB_SIT1.xsl" rapport="Analytic Image - System" niveau="4" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\CVE.xml" File="CVE.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/tab.xml" XMLWEB="Rapports/CVE.xsl" rapport="Compensation - Evolution of Fiches A and B" niveau="0" rapport_nr="69" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\SIBIS_REC.xml" File="SIBIS_REC.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/SIBIS_REC.xml" XMLWEB="Rapports/SIBIS_REC.xsl" rapport="Sit REC SIBIS (BF_REC_SIT_V10 from Business Object)" niveau="0" rapport_nr="71" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\DU_CC_XLS.xml" File="DU_CC_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/DU.xml" XMLWEB="Rapports/DU_CC_XLS.xsl" rapport="Rights of use" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\FINAMED.xml" File="FINAMED.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/FINAMED.xml" XMLWEB="Rapports/FINAMED.xsl" rapport="Fin@Med - Pers Monitoring" niveau="0" rapport_nr="70" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\BFB_SIT_LEVEL_4.xml" File="BFB_SIT_LEVEL_4.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/BFB_SIT_LEVEL_2.xml" XMLWEB="Rapports/BFB_SIT_LEVEL_4.xsl" rapport="Analytic Image - System" niveau="5" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\AGGR_10_DAYS_DET_XLS.xml" File="AGGR_10_DAYS_DET_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/AGGR_10_DAYS_DET_XLS.xml" XMLWEB="Rapports/AGGR_10_DAYS_DET_XLS.xsl" rapport="Evolution COM/ORD by month or days" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\AGGR_MONTH_XLS.xml" File="AGGR_MONTH_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/AGGR_MONTH2_XLS.xml" XMLWEB="Rapports/AGGR_MONTH_XLS.xsl" rapport="Evolution COM/ORD by month or days" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\SIBIS_REC_XLS.xml" File="SIBIS_REC_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/SIBIS_REC.xml" XMLWEB="Rapports/SIBIS_REC_XLS.xsl" rapport="Sit REC SIBIS (BF_REC_SIT_V10 from Business Object)" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\DU_CC.xml" File="DU_CC.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/DU.xml" XMLWEB="Rapports/DU_CC.xsl" rapport="Rights of use" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\ORDER_EVOL_BIS_XLS.xml" File="ORDER_EVOL_BIS_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/ORDER_EVOL.xml" XMLWEB="Rapports/ORDER_EVOL_BIS_XLS.xsl" rapport="Evolution orders by DOPA-BA-LBA-CT(monthly) " niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\BUD_OVERVIEW_BIS.xml" File="BUD_OVERVIEW_BIS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/BUD_OVERVIEW.xml" XMLWEB="Rapports/BUD_OVERVIEW_BIS.xsl" rapport="Level DOPA BA LBA -Sum of invoice's amount (Free margin) " niveau="0" rapport_nr="23" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\DIM_VISUM_TOT.xml" File="DIM_VISUM_TOT.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/DIM_VISUM.xml" XMLWEB="Rapports/DIM_VISUM_TOT.xsl" rapport="visum diminutions" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\PAYMENT_TERM_HEAD.xml" File="PAYMENT_TERM_HEAD.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/tab.xml" XMLWEB="Rapports/PAYMENT_TERM_HEAD.xsl" rapport="PAYMENT_TERM" niveau="0" rapport_nr="55" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\BFB_SIT_LEVEL_2_1.xml" File="BFB_SIT_LEVEL_2_1.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/BFB_SIT_LEVEL_2.xml" XMLWEB="Rapports/BFB_SIT_LEVEL_2_1.xsl" rapport="Analytic Image - System" niveau="3" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\INV_COUNT_XLS.xml" File="INV_COUNT_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/INV_BIS.xml" XMLWEB="Rapports/INV_COUNT_XLS.xsl" rapport="PINV counting per STATUS and YEAR " niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\IR_DET.xml" File="IR_DET.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/ILIAS_ROLE.xml" XMLWEB="Rapports/IR_DET.xsl" rapport="ILIAS role by user" niveau="3" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\DC_DETAIL_XLS.xml" File="DC_DETAIL_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/DC.xml" XMLWEB="Rapports/DC_DETAIL_XLS.xsl" rapport="Monitoring of credit demands by LBA" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\VISA_BIS.xml" File="VISA_BIS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/VISA_BIS.xml" XMLWEB="Rapports/VISA_BIS.xsl" rapport="Monitoring of visum + available level imputation line (new version!) " niveau="0" rapport_nr="9" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\DU_UNIT.xml" File="DU_UNIT.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/DU.xml" XMLWEB="Rapports/DU_UNIT.xsl" rapport="Rights of use" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\Contrat.xml" File="Contrat.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/Contrat.xml" XMLWEB="Rapports/Contrat.xsl" rapport="Monitoring of PAID/ORDERED_TO_PAY invoices by FIRM/CONTRACT (PAYMENT YEAR&gt;2011) " niveau="1" rapport_nr="8" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\FED_BIS.xml" File="FED_BIS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/FEDCOM_REQUEST.xml" XMLWEB="Rapports/FED_BIS.xsl" rapport="List of requests for (new) suppliers" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\PAYMENT_TERM.xml" File="PAYMENT_TERM.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/PAYMENT_TERM.xml" XMLWEB="Rapports/PAYMENT_TERM.xsl" rapport="PAYMENT_TERM" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\BFB_SIT_LEVEL_5.xml" File="BFB_SIT_LEVEL_5.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/BFB_SIT_LEVEL_2.xml" XMLWEB="Rapports/BFB_SIT_LEVEL_5.xsl" rapport="Analytic Image - System" niveau="6" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\INVOICE_STAT_HEAD.xml" File="INVOICE_STAT_HEAD.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/INVOICE_STAT.xml" XMLWEB="Rapports/INVOICE_STAT_HEAD.xsl" rapport="Payment Terms and To late payment" niveau="0" rapport_nr="64" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\PAYMENT_TERM_INV.xml" File="PAYMENT_TERM_INV.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/PAYMENT_TERM_DETAIL.xml" XMLWEB="Rapports/PAYMENT_TERM_INV.xsl" rapport="PAYMENT_TERM" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\BA_DOPA_INCOME_NEW.xml" File="BA_DOPA_INCOME_NEW.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/BA_DOPA_INCOME.xml" XMLWEB="Rapports/BA_DOPA_INCOME_NEW.xsl" rapport="Income/debt level YEAR-BA-DOPA-LBA" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\SYNTH_WEEK.xml" File="SYNTH_WEEK.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/SYNTH_WEEK1.xml" XMLWEB="Rapports/SYNTH_WEEK.xsl" rapport="Evolution COM/ORD by month or days" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\DC.xml" File="DC.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/DC.xml" XMLWEB="Rapports/DC.xsl" rapport="Monitoring of credit demands by LBA" niveau="0" rapport_nr="10" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\ultimate\DEBT_EVOL_XLS_ULTIMATE.xml" File="DEBT_EVOL_XLS_ULTIMATE.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/ultimate/DEBT_MONTH_ULTIMATE.xml" XMLWEB="Rapports/ultimate/xsl/DEBT_EVOL_XLS_ULTIMATE.xsl" rapport="Evolution debt by DOPA-BA-LBA-CT(monthly) or by visum(global view)" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\ultimate\DEBT_MONTH_PR_ULTIMATE.xml" File="DEBT_MONTH_PR_ULTIMATE.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/ultimate/DEBT_MONTH_ULTIMATE.xml" XMLWEB="Rapports/ultimate/xsl/DEBT_MONTH_PR_ULTIMATE.xsl" rapport="Evolution debt by DOPA-BA-LBA-CT(monthly) or by visum(global view)" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Rapports\ultimate\DEBT_EVOL_ULTIMATE.xml" File="DEBT_EVOL_ULTIMATE.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Rapports/tab.xml" XMLWEB="Rapports/ultimate/xsl/DEBT_EVOL_ULTIMATE.xsl" rapport="Evolution debt by DOPA-BA-LBA-CT(monthly) or by visum(global view)" niveau="0" rapport_nr="28" />
            <row Path="\lrf_descriptors\XMLWeb\MRSYN\BP_BG_TOT_DOPABA_BFA-L_XLS.xml" File="BP_BG_TOT_DOPABA_BFA-L_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/MRSYN/BP_BG_TOT_DOPABA_BFA-L.xml" XMLWEB="MRSYN/XSL/BP_BG_TOT_DOPABA_BFA-L_XLS.xsl" rapport="Consumption in COM and ORD on target credit" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\MRSYN\BP_BG_TOT_DOPABA_PR.xml" File="BP_BG_TOT_DOPABA_PR.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Secure/MRSYN/BP_BG_TOT_DOPABA_PR.xml" XMLWEB="MRSYN/XSL/BP_BG_TOT_DOPABA_PR.xsl" rapport="BP_BG_TOT_DOPABA_PR (without LBA 82,84)" niveau="0" rapport_nr="37" />
            <row Path="\lrf_descriptors\XMLWeb\MRSYN\BP_VP_DOPABA_CAT.xml" File="BP_VP_DOPABA_CAT.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/MRSYN/BP_VP_DOPABA.xml" XMLWEB="MRSYN/XSL/BP_VP_DOPABA_CAT.xsl" rapport="Follow-up imputation lines group by DOPABA CAT" niveau="0" rapport_nr="5" />
            <row Path="\lrf_descriptors\XMLWeb\MRSYN\BP_VP_DOPABA.xml" File="BP_VP_DOPABA.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/MRSYN/BP_VP_DOPABA.xml" XMLWEB="MRSYN/XSL/BP_VP_DOPABA.xsl" rapport="Follow-up imputation lines group by DOPABA" niveau="0" rapport_nr="4" />
            <row Path="\lrf_descriptors\XMLWeb\MRSYN\BP_BG_TOT_DOPABA_BLOC_2.xml" File="BP_BG_TOT_DOPABA_BLOC_2.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/MRSYN/BP_BG_TOT_DOPABA_BLOC_2_NEW.xml" XMLWEB="MRSYN/XSL/BP_BG_TOT_DOPABA_BLOC_2.xsl" rapport="Blocage BFB by DOPA BA LBA" niveau="0" rapport_nr="39" />
            <row Path="\lrf_descriptors\XMLWeb\MRSYN\BP_BG_TOT_DOPABA.xml" File="BP_BG_TOT_DOPABA.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Secure/MRSYN/BP_BG_TOT_DOPABA.xml" XMLWEB="MRSYN/XSL/BP_BG_TOT_DOPABA.xsl" rapport="BP_BG_TOT_DOPABA (without LBA 82,84)" niveau="0" rapport_nr="1" />
            <row Path="\lrf_descriptors\XMLWeb\MRSYN\BP_BG_TOT_DOPABA_BLOC_2_XLS.xml" File="BP_BG_TOT_DOPABA_BLOC_2_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/MRSYN/BP_BG_TOT_DOPABA_BLOC_2_XLS_NEW.xml" XMLWEB="MRSYN/XSL/BP_BG_TOT_DOPABA_BLOC_2_XLS.xsl" rapport="Blocage BFB by DOPA BA LBA" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\MRSYN\BP_BG_TOT_DOPABA_PR_XLS.xml" File="BP_BG_TOT_DOPABA_PR_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Secure/MRSYN/BP_BG_TOT_DOPABA_PR_XLS.xml" XMLWEB="MRSYN/XSL/BP_BG_TOT_DOPABA_PR_XLS.xsl" rapport="BP_BG_TOT_DOPABA_PR (without LBA 82,84)" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\MRSYN\BP_BG_TOT_DOPABA_BFA-L.xml" File="BP_BG_TOT_DOPABA_BFA-L.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/MRSYN/BP_BG_TOT_DOPABA_BFA-L.xml" XMLWEB="MRSYN/XSL/BP_BG_TOT_DOPABA_BFA-L.xsl" rapport="Consumption in COM and ORD on target credit" niveau="0" rapport_nr="19" />
            <row Path="\lrf_descriptors\XMLWeb\MRSYN\BP_BG_TOT_DOPABA_CAT.xml" File="BP_BG_TOT_DOPABA_CAT.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Secure/MRSYN/BP_BG_TOT_DOPABA_CAT.xml" XMLWEB="MRSYN/XSL/BP_BG_TOT_DOPABA_CAT.xsl" rapport="BP_BG_TOT_DOPABA_CAT (without LBA 82,84)" niveau="0" rapport_nr="3" />
            <row Path="\lrf_descriptors\XMLWeb\Vanlandschoot\research_invoice\grid_nc.xml" File="grid_nc.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Vanlandschoot/research_invoice/grid_nc.xml" XMLWEB="Vanlandschoot/research_invoice/XSL/grid_nc.xsl" rapport="research_invoice" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Vanlandschoot\BFB\CODIR_2014_LBA.xml" File="CODIR_2014_LBA.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Vanlandschoot/BFB/CODIR_2014_LBA.xml" XMLWEB="Vanlandschoot/BFB/XSL/CODIR_2014_LBA.xsl" rapport="test COCKPIT DGBF" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Vanlandschoot\BFB\trends.xml" File="trends.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Vanlandschoot/BFB/trends_new.xml" XMLWEB="Vanlandschoot/BFB/XSL/trendsData.xsl" rapport="test COCKPIT DGBF" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Vanlandschoot\BFB\COCKPIT.xml" File="COCKPIT.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Vanlandschoot/BFB/CODIR_2014_LBA.xml" XMLWEB="Vanlandschoot/BFB/XSL/COKPIT.xsl" rapport="test COCKPIT DGBF" niveau="0" rapport_nr="96" />
            <row Path="\lrf_descriptors\XMLWeb\Vanlandschoot\BFB\COKPIT_LAYOUT.xml" File="COKPIT_LAYOUT.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Vanlandschoot/BFB/CODIR_2014_LBA.xml" XMLWEB="Vanlandschoot/BFB/XSL/COKPIT_LAYOUT.xsl" rapport="test COCKPIT DGBF" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Vanlandschoot\BFB\trends1.xml" File="trends1.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Vanlandschoot/BFB/trends_new.xml" XMLWEB="Vanlandschoot/BFB/XSL/trendsData1.xsl" rapport="test COCKPIT DGBF" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Vanlandschoot\BFB\change_range.xml" File="change_range.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Vanlandschoot/BFB/CODIR_2014_LBA.xml" XMLWEB="Vanlandschoot/BFB/XSL/change_range.xsl" rapport="test COCKPIT DGBF" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Vanlandschoot\BFB\CODIR_XLS.xml" File="CODIR_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Vanlandschoot/BFB/CODIR_2014.xml" XMLWEB="Vanlandschoot/BFB/XSL/CODIR_XLS.xsl" rapport="test COCKPIT DGBF" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Vanlandschoot\BFB\CODIR_2014_LBA_GRAPH.xml" File="CODIR_2014_LBA_GRAPH.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Vanlandschoot/BFB/CODIR_2014_LBA.xml" XMLWEB="Vanlandschoot/BFB/XSL/CODIR_2014_LBA_GRAPH.xsl" rapport="test COCKPIT DGBF" niveau="1" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Vanlandschoot\BFB\COKPIT_XLS.xml" File="COKPIT_XLS.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Vanlandschoot/BFB/BP_BG_TOT_DOPABA_PR_XLS.xml" XMLWEB="Vanlandschoot/BFB/XSL/COKPIT_XLS.xsl" rapport="test COCKPIT DGBF" niveau="2" rapport_nr="" />
            <row Path="\lrf_descriptors\XMLWeb\Vanlandschoot\research_invoice\CboFirm.xml" File="CboFirm.xml" DBWEB="DBWeb/ProcessDescriptor/descriptor/Vanlandschoot/research_invoice/CboFirm.xml" XMLWEB="Vanlandschoot/research_invoice/XSL/CboFirm.xsl" rapport="research_invoice" niveau="1" rapport_nr="" />
        </rows>
    </dbquery>
</dbqueries>

我需要根据报告名称对文件名进行分组,并将它们设置在名为XMLWEB的项标记中

结果应该是每个关系

<tree>
    <item id="rapport_nr" text="Evolution COM/ORD by month or days">
      <item text="XMLWEB">
         <item text="COM_WEEK.xml"/>
         <item text="SYNTH_MONTH.xml"/>
         <item text="ORD_WEEK.xml"/>
         <item text="ORD_MONTH.xml"/>
         .....
      </item>
   </item>
</tree>

这是我得到的结果

<tree>
    <item id="rapport_nr" text="Evolution COM/ORD by month or days">
      <item text="XMLWEB">
         <item text=""/>
      </item>
   </item>
</tree>

我现在拥有的是第一部分和第二部分 . 我似乎无法找到一种方法来循环最内部项目部分的行 .

这是我的代码 . 尝试使用xsl:for-each,但它不起作用 . 所以问题出在第3步 .

任何帮助都会受到欢迎 .

<?xml version="1.0" encoding="UTF-8"?> <!-- ENKEL CONVERSIE-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output version="1.0" method="xml" encoding="UTF-8" indent="yes"/>

<xsl:template match="/">           
    <tree>  
        <xsl:apply-templates select="//dbquery[@id='algemeen_overview']/rows/row"/>
    </tree>
</xsl:template>

<xsl:template match="//dbquery[@id='algemeen_overview']/rows/row">
<!-- step 1: each report item tag with ID from table DGBF_report_list and get name of report-->        
    <xsl:element name="item">
        <xsl:attribute name="id">
            <xsl:value-of select="@rapport_nr"/>
        </xsl:attribute>
        <xsl:attribute name="text">
            <xsl:value-of select="@rapport"/>
        </xsl:attribute>
<!-- End step 1 -->        
<!-- step 2: make new "folder" XMLWEB. -->
        <xsl:element name="item">
            <xsl:attribute name="text">XMLWEB</xsl:attribute>
<!-- step 3: loop to find all filles used in the same report -->                                                
                <xsl:for-each select="@rapport">
                    <xsl:element name="item">
                        <xsl:attribute name="text">
                            <xsl:value-of select="@File"/>
                        </xsl:attribute>
                    </xsl:element>
                </xsl:for-each>
<!-- END STEP 3 -->
        </xsl:element>
<!-- EINDE STEP 2 -->                     
    </xsl:element>
</xsl:template>
</xsl:stylesheet>

Thanks to michael.hor257k I came to the solution.

<xsl:stylesheet version="2.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:strip-space elements="*"/>

<xsl:template match="/dbqueries">
    <tree>
        <xsl:for-each-group select="dbquery/rows/row" group-by="@rapport">
                <xsl:element name="item">
                    <xsl:attribute name="id">
                        <xsl:value-of select="@rapport_nr"/>
                    </xsl:attribute>
                    <xsl:attribute name="text">
                        <xsl:value-of select="current-grouping-key()"/>
                    </xsl:attribute>
                <item text="XMLWEB">
                    <xsl:for-each select="current-group()" >
                        <item text="{@File}"/>
                    </xsl:for-each>
                </item> 
            </xsl:element>
        </xsl:for-each-group>
    </tree>
</xsl:template>

</xsl:stylesheet>

1 回答

  • 1

    我仍然觉得这个问题很混乱,但为了向前发展,我们将其视为一个起点:

    XSLT 2.0

    <xsl:stylesheet version="2.0" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:strip-space elements="*"/>
    
    <xsl:template match="/dbqueries">
        <tree>
            <xsl:for-each-group select="dbquery/rows/row" group-by="@rapport">
                <item id="rapport_nr" text="{current-grouping-key()}">
                    <item text="XMLWEB">
                        <xsl:for-each select="current-group()" >
                            <item text="{@File}"/>
                        </xsl:for-each>
                    </item> 
                </item> 
            </xsl:for-each-group>
        </tree>
    </xsl:template>
    
    </xsl:stylesheet>
    

    这将 row 元素按 rapport 属性分组,为每个组创建外部和内部 item 包装,并列出每个组成员的 File 属性 .

    应用于给定的示例,结果将是:

    <?xml version="1.0" encoding="UTF-8"?>
    <tree>
       <item id="rapport_nr" text="Evolution COM/ORD by month or days">
          <item text="XMLWEB">
             <item text="COM_WEEK.xml"/>
             <item text="SYNTH_MONTH.xml"/>
             <item text="ORD_WEEK.xml"/>
             <item text="ORD_MONTH.xml"/>
             <item text="COM_MONTH.xml"/>
             <item text="AGGR_10_DAYS_DET_XLS.xml"/>
             <item text="AGGR_MONTH_XLS.xml"/>
             <item text="SYNTH_WEEK.xml"/>
             <item text="COM_ORD_EVOL.xml"/>
          </item>
       </item>
       <item id="rapport_nr" text="Evolution orders by DOPA-BA-LBA-CT(monthly) ">
          <item text="XMLWEB">
             <item text="ORDER_EVOL_BIS_XLS.xml"/>
             <item text="ORDER_EVOL_BIS.xml"/>
          </item>
       </item>
       <item id="rapport_nr"
             text="Evolution debt by DOPA-BA-LBA-CT(monthly) or by visum(global view)">
          <item text="XMLWEB">
             <item text="DEBT_EVOL_XLS_ULTIMATE.xml"/>
             <item text="DEBT_MONTH_PR_ULTIMATE.xml"/>
             <item text="DEBT_VISUM_ULTIMATE.xml"/>
             <item text="DEBT_MONTH_ULTIMATE.xml"/>
             <item text="DEBT_EVOL_ULTIMATE.xml"/>
          </item>
       </item>
       <item id="rapport_nr" text="Compensation - Evolution of Fiches A and B">
          <item text="XMLWEB">
             <item text="CVE.xml"/>
          </item>
       </item>
    </tree>
    

    演示:http://xsltransform.net/93dEHGa

相关问题