Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
15.09.2011, 11:40
|
|||
---|---|---|---|
|
|||
получение сумммарного значения |
|||
#18+
нетривиальная задача имеется xml <?xml version="1.0" encoding="UTF-8" ?> - <root xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"> - <bnk> <num>1</num> - <info> <date>01.09.2011</date> - <amount> <sum>12</sum> - <currency> <codcurrency>840</codcurrency> </currency> </amount> - <amount> <sum>23</sum> - <currency> <codcurrency>974</codcurrency> </currency> </amount> - <amount2> <rest>1291</rest> - <currency> <codcurrency>840</codcurrency> </currency> </amount2> </info> - <info> <date>01.08.2011</date> - <amount4> <rest>1234</rest> - <currency> <codcurrency>840</codcurrency> </currency> </amount4> - <amount4> <rest>1234</rest> - <currency> <codcurrency>974</codcurrency> </currency> </amount4> </info> - <info> <date>01.07.2011</date> - <amount> <sum>1</sum> - <currency> <codcurrency>840</codcurrency> </currency> </amount> - <amount2> <rest>5555</rest> - <currency> <codcurrency>974</codcurrency> </currency> </amount2> - <amount2> <rest>12913</rest> - <currency> <codcurrency>840</codcurrency> </currency> </amount2> - <amount3> <rest>12913</rest> - <currency> <codcurrency>840</codcurrency> </currency> </amount3> </info> </bnk> - <bnk> <num>21</num> - <info> <date>01.09.2011</date> - <amount> <sum>10</sum> - <currency> <codcurrency>840</codcurrency> </currency> </amount> - <amount2> <rest>80</rest> - <currency> <codcurrency>840</codcurrency> </currency> </amount2> </info> </bnk> - <bnk> <num>25</num> - <info> <date>01.08.2011</date> - <amount> <sum>45</sum> - <currency> <codcurrency>974</codcurrency> </currency> </amount> - <amount2> <rest>12913</rest> - <currency> <codcurrency>840</codcurrency> </currency> </amount2> - <amount4> <rest>1234</rest> - <currency> <codcurrency>840</codcurrency> </currency> </amount4> - <amount4> <rest>8888</rest> - <currency> <codcurrency>974</codcurrency> </currency> </amount4> </info> - <info> <date>01.07.2011</date> - <amount> <sum>1234.12</sum> - <currency> <codcurrency>840</codcurrency> </currency> </amount> - <amount2> <rest>88668</rest> - <currency> <codcurrency>974</codcurrency> </currency> </amount2> - <amount3> <rest>12913</rest> - <currency> <codcurrency>840</codcurrency> </currency> </amount3> </info> </bnk> </root> в xml передается хронология изменения 4 видов сумм (amount,amount2,amount3,amount4) неких предприятий (bnk) в xsl требуется получить суммарное значение по всем bnk для каждой суммы (amount,amount2,amount3,amount4) в каждой валюте, суммируя только актуальные ( на максимальную дату для этой суммы в этой валюте для этого bnk) значения каждой суммы в каждой валюте Может не совсем понятно, но вот такая таблица выбранных значений и результат суммирования просьбо помочь выбрать нужные значения ( проблема что дата находится на уровне выше чем значения сумм и что то не получается выбрать amount Max amount2 Max Max amount3 Max M amount4 M M date date date date date date date bnk 840 974 840 974 840 974 840 974 1 12 01.09 23 01.09 1292 01.09 12913 01.07 1234 01.08 1234 01.08 bnk 21 10 01.09 80 01.09 bnk 25 45 01.08 12923 01.08 12913 01.07 1234 01.08 8888 01.08 итого Получить (sum) 22 68 14295 0 25826 0 2468 10122 может кто- нибудь помочь получить сумму итого в xsl 1.0 ... |
|||
:
Нравится:
Не нравится:
|
|||
|
23.09.2011, 13:45
|
|||
---|---|---|---|
получение сумммарного значения |
|||
#18+
guest9596, вообще-то считать - не задача XSL, это как микроскопом гвозди... забить то можно, но проблема в консерватории. ладно я отвлекся, опубликуйте свой XSL и проблемы, и я, или кто-нибудь еще его подправит. писать с нуля по "слепку мысли", честно, не очень хочется. ... |
|||
:
Нравится:
Не нравится:
|
|||
|
|
start [/forum/topic.php?fid=14&tablet=1&tid=1332866]: |
0ms |
get settings: |
8ms |
get forum list: |
12ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
80ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
40ms |
get tp. blocked users: |
1ms |
others: | 15ms |
total: | 172ms |
0 / 0 |