【问题标题】:SOA Composite XSLT TransformationSOA 组合 XSLT 转换
【发布时间】:2017-08-10 11:38:08
【问题描述】:
Sample input data

interfaceSourceCode,requisitioningBUName,InterfaceHeaderKey,CategoryName,CurrencyCode,DeliverToLocationCode,DeliverToOrganizationCode,DestinationTypeCode,InterfaceLineKey,ItemDescription,ItemNumber,LineType,NoteToBuyer,ProcurementBUName,Quantity,RequesterEmail,UnitOfMeasureCode,Price,ChargeAccountSegment1,ChargeAccountSegment2,ChargeAccountSegment3,ChargeAccountSegment4,ChargeAccountSegment5,ChargeAccountSegment6,ChargeAccountSegment7,DistributionQuantity,InterfaceDistributionKey,Percent
SCO,XXXX Internal Customer Service - CA,300000039139651,"Chemicals, Lubricants and Non-Gen Fuels.Additives.Additives",CAD,Nisku Distribution Centre,NDC,INVENTORY,400000039139652,"TRANSFORMER, 25 KVA OH, 12470GRDY/7200/347/600Y 1PH C/W TAPS SPEC. #YECL-T-15",16340094,Goods,TEST12345678,XXXX Internal Customer Service - CA,6,xyz@discard.mail.us2.oracle.cloud.com,zzr,500,10002,00000,00000,00000,130000,00000,00,6,500000039139652,100
SCO,XXXX Internal Customer Service - CA,300000039139651,"Chemicals, Lubricants and Non-Gen Fuels.Additives.Additives",CAD,Nisku Distribution Centre,NDC,INVENTORY,400000039139653,"TRANSFORMER, 25 KVA OH, 12470GRDY/7200/347/600Y 1PH C/W TAPS SPEC. #YECL-T-15",16340094,Goods,TEST12345678,XXXX Internal Customer Service - CA,6,xyz@discard.mail.us2.oracle.cloud.com,zzr,500,10002,00000,00000,00000,130000,00000,00,6,500000039139653,100
SCO,XXXX Internal Customer Service - CA,300000039139652,"Chemicals, Lubricants and Non-Gen Fuels.Additives.Additives",CAD,Nisku Distribution Centre,NDC,INVENTORY,400000039139654,"TRANSFORMER, 25 KVA OH, 12470GRDY/7200/347/600Y 1PH C/W TAPS SPEC. #YECL-T-15",16340094,Goods,TEST12345678,XXXX Internal Customer Service - CA,6,xyz@discard.mail.us2.oracle.cloud.com,zzr,500,10002,00000,00000,00000,130000,00000,00,6,500000039139654,100
SCO,XXXX Internal Customer Service - CA,300000039139652,"Chemicals, Lubricants and Non-Gen Fuels.Additives.Additives",CAD,Nisku Distribution Centre,NDC,INVENTORY,400000039139655,"TRANSFORMER, 25 KVA OH, 12470GRDY/7200/347/600Y 1PH C/W TAPS SPEC. #YECL-T-15",16340094,Goods,TEST12345678,XXXX Internal Customer Service - CA,6,xyz@discard.mail.us2.oracle.cloud.com,zzr,500,10002,00000,00000,00000,130000,00000,00,6,500000039139655,100

我想编写XSLT转换,根据接口源代码requisitionbuname进行分组,然后循环InterfaceHeaderKey。请。建议

【问题讨论】:

  • 这道题好像不完整,请完成
  • 对于每个 interfaceSourceCode,RequisitionBUName 后跟对于每个 InterfaceHeaderKey,循环遍历所有行
  • 请输入你已经尝试过的代码
  • :purchaseRequestPayload>

标签: xslt-2.0 soa


【解决方案1】:

考虑使用 for-each-group xslt 2.0 构造.....

 <xsl:for-each-group select="//put your parent tag here let say interfaceSourceCode" group-by="//put your element">

      <xsl:for-each-group select="current-group().. if next grouping element is at same level or change accordingly" group-by="..put second grouping element let say requisitioningBUName and so on">

            <xsl:for-each select="//element  let say InterfaceHeaderKey">
              .....values go here
            </xsl:for-each>

      </xsl:for-each-group>

  </xsl:for-each-group>

【讨论】:

    猜你喜欢
    • 2020-02-11
    • 2014-09-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-07
    • 2020-02-26
    相关资源
    最近更新 更多