本文介绍了如何在邮件中进行相同的选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个消息结构,如:
<?xml version =" 1.0" encoding =" utf-8"?>
< Root>
< PayAdjustmentList>
< PayAdjustment PayAdjustmentID =" 1" PayCode =" 11">< / PayAdjustment>
< PayAdjustment PayAdjustmentID =" 2" PayCode =" 09">< / PayAdjustment>
< PayAdjustment PayAdjustmentID =" 3" PayCode =" 02">< / PayAdjustment>
< / PayAdjustmentList>
< PayCategoryList>< PayCategory PayCategoryID =" 2" PayCode =" 05">< / PayCategory>
< PayCategory PayCategoryID =" 3" PayCode =" 08">< / PayCategory>
< / PayCategoryList>
< Employees>
< Employee EmployeeID =" 1">
< ; PayDetail PayAdjustmentID =" 1" PayCategoryID =" 2">< / PayDetail>
< PayDetail PayAdjustmentID =" 2" PayCategoryID =" 2">< / PayDetail>
< PayDetail PayCategoryID =" 3">< / PayDetail>
< / Employee>
< Employee EmployeeID =" 3">< PayDetail PayAdjustmentID =" 3" PayCategoryID =" 2">< / PayDetail>
< PayDetail PayAdjustmentID =" 2" PayCategoryID =" 3">< / PayDetail>
< PayDetail PayCategoryID =" 2">< / PayDetail>
< / Employee>
< / Employees> ;< / root>

我希望遍历每个员工 PayDetail ,以及每个 PayDetail ,我希望根据 PayAdjustmentID 或 PayCategory 或 PayAdjustment 获取 PayCode strong> PayCategoryID 每个 PayDetail 记录都有。 如果 PayDetail PayAdjustmentID ,则使用该记录找到 PayCode ,否则,使用 PayCategoryID 查找 PayCode

所以这就像消息中的嵌套循环,但消息的不同部分。

我完成了数字o的步骤如果需要使用 PayAdjustmentID PayCategoryID ,请输入。但我不确定如何使用该ID循环 PayCategory PayAdjustment 记录。

如何使用functoid而不是定制XSLT?

谢谢。

解决方案

I have a message structure like:
<?xml version="1.0" encoding="utf-8"?>
<Root>
  <PayAdjustmentList>
    <PayAdjustment PayAdjustmentID="1" PayCode="11"></PayAdjustment>
    <PayAdjustment PayAdjustmentID="2" PayCode="09"></PayAdjustment>
    <PayAdjustment PayAdjustmentID="3" PayCode="02"></PayAdjustment>
  </PayAdjustmentList>
  <PayCategoryList>
    <PayCategory PayCategoryID="2" PayCode="05"></PayCategory>
    <PayCategory PayCategoryID="3" PayCode="08"></PayCategory>
  </PayCategoryList>
  <Employees>
    <Employee EmployeeID="1">
      <PayDetail PayAdjustmentID="1" PayCategoryID="2"></PayDetail>
      <PayDetail PayAdjustmentID="2" PayCategoryID="2"></PayDetail>
      <PayDetail PayCategoryID="3"></PayDetail>
    </Employee>
    <Employee EmployeeID="3">
      <PayDetail PayAdjustmentID="3" PayCategoryID="2"></PayDetail>
      <PayDetail PayAdjustmentID="2" PayCategoryID="3"></PayDetail>
      <PayDetail PayCategoryID="2"></PayDetail>
    </Employee>
  </Employees>
</Root>

I want to loop through the PayDetail for each Employee , and for each PayDetail , I want to get the PayCode from either PayCategory or PayAdjustment according to the PayAdjustmentID or PayCategoryID each PayDetail record has. If a PayDetail has PayAdjustmentID , then use that to find the PayCode , otherwise, use the PayCategoryID to find the PayCode .

So that's something like a nested looping within a message, but different part of the message.

I am up to the step which figures out if PayAdjustmentID or PayCategoryID needs to be used. but I am not sure how to use that ID to loop either PayCategory or PayAdjustment records.

How can I do this by using functoid rather than customized XSLT?

Thank you.

解决方案


这篇关于如何在邮件中进行相同的选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 15:06