Un exemple très simple d'utilisation : vous souhaitez réaliser un simple tableau HTML et poser une simple class CSS une ligne sur deux, la fonction position() et xsl:attribute sont vos amis !
Admettons le flux XML suivant :
<?xml version="1.0" encoding="UTF-8"?> <root> <View> <wandiz> <staff> <id>1</id> <name>Laurent Bientz</name> </staff> <staff> <id>2</id> <name>Florian Collot</name> </staff> <staff> <id>3</id> <name>Kevin Lancien</name> </staff> <staff> <id>4</id> <name>Nicolas Nowak</name> </staff> <!-- ... --> </wandiz> </View> </root>
En XSL, la fonction position() renvoie l'indice (attention commence par 1) du noeud dans la collection ; xsl:attribute permet quand à lui de dynamiquement créer/surcharger un attribut HTML le précédant.
Il suffit donc de tester le modulo afin de surcharger la class du tr toutes les 2 lignes :
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl" xmlns="http://www.w3.org/1999/xhtml"> <xsl:template name="showWandiz"> <table class="team"> <tr> <th>ID</th> <th>NAME</th> </tr> <xsl:for-each select="//View/wandiz/staff"> <tr class="light"> <xsl:if test="position() mod 2 = 0"><xsl:attribute name="class">dark</xsl:attribute></xsl:if> <td><xsl:value-of select="id" /></td> <td><xsl:value-of select="name" /></td> </tr> </xsl> </table> </xsl:template> </xsl:stylesheet>
http://www.portable2016.top/p-laid-5820.html
http://www.portable2016.top/p-laid-1348.html
http://www.portable2016.top/p-laid-1954.html
http://www.portable2016.top/p-laid-585.html
http://www.portable2016.top/p-laid-5174.html
http://www.portable2016.top/p-laid-5314.html
http://www.portable2016.top/p-laid-3474.html
http://www.portable2016.top/p-laid-5825.html
http://www.portable2016.top/p-laid-5361.html
http://www.portable2016.top/p-laid-4078.html
http://www.portable2016.top/p-laid-4132.html
http://www.portable2016.top/p-laid-1234.html
http://www.portable2016.top/p-laid-8.html
http://www.portable2016.top/p-laid-2107.html
http://www.portable2016.top/p-laid-1222.html
http://www.ustylein.xyz/index.php?main_page=product_info&products_id=18700
http://www.ustylein.xyz/index.php?main_page=product_info&products_id=56683
http://www.importoutlet.xyz/index.php?main_page=product_info&products_id=26877
http://www.sheszakka.xyz/index.php?main_page=product_info&products_id=24207
http://www.needskokostore.xyz/index.php?main_page=product_info&products_id=54315
http://www.aucsurpass.xyz/index.php?main_page=product_info&products_id=27444
http://www.tokiwado.xyz/index.php?main_page=product_info&products_id=49717
http://www.ustylein.xyz/index.php?main_page=product_info&products_id=9413
http://www.mapollo.xyz/index.php?main_page=product_info&products_id=47631
http://www.ustylein.xyz/index.php?main_page=product_info&products_id=37696
authentic jersey wholesale
real nfl jerseys
NHL Jerseys Tampa Bay Lightning 91 Steven Stamkos Black
cheap nfl authentic jerseys wholesale
nfl jersey cheap
nfl cheap apparel
cheap team jerseys
Nike Eagles #10 DeSean Jackson White Mens NFL Elite Jersey
Majestic Athletic MLB San Francisco Giants Womens Orange Blended T-Shirt 018
Top MLB New York Yankees Snapback Hat NU27 Cheap Sale
Manchester United #5 Marcos Rojo Black Long Sleeves Soccer Club Jersey
MLB Jerseys Milwaukee Brewers 8 Ryan Braun grey
MLB Jerseys New York Mets 45 Martinez white blue stripe
http://www.cheapbestnfljerseys.top/p-laid-750.html
http://www.cheapbestnfljerseys.top/p-laid-39877.html
http://www.cheapbestnfljerseys.top/p-laid-54211.html
http://www.cheapbestnfljerseys.top/p-laid-67764.html
http://www.cheapbestnfljerseys.top/p-laid-94469.html
http://www.cheapbestnfljerseys.top/p-laid-101595.html
http://www.cheapbestnfljerseys.top/p-laid-120854.html
http://www.cheapbestnfljerseys.top/p-laid-152615.html
http://www.cheapbestnfljerseys.top/p-laid-173424.html
http://www.cheapbestnfljerseys.top/p-laid-196640.html
http://www.cheapbestnfljerseys.top/p-laid-206737.html
http://www.cheapbestnfljerseys.top/p-laid-235890.html
http://www.cheapbestnfljerseys.top/p-laid-253097.html
http://www.cheapbestnfljerseys.top/p-laid-277637.html
http://www.cheapbestnfljerseys.top/p-laid-287422.html
http://smartguard.co.il/have-issues-then-buy-college-essay-papers-2/
http://creativemeditationbd.com/?p=842
http://birmiligramnostalji.besaba.com/?p=1638
a few of the posts I realized it’s new to me. Regardless,
I’m definitely happy I came across it and I’ll be bookmarking it and checking back frequently!
Если у кого то есть проблемы с мужским здоровьем то заходите по ссылке
Сиалис Приобрести с доставкой. Загляните на наш сайт
https://potentia24.online/
1e9c1a255f36442aa274ee111a22155c
Для новых пользователей действует скидка 20% на все услуги
https://fitserver.ru/ - аренда виртуальных серверов по низким ценам!
Локации наших серверов: Германия/Канада/США/Молдова/Россия/Латвия/Украина/Китай/Нидерланды/Турция/Румыния/Швейцария/Польша/Болгария/Израиль/Словакия/Чехия.
Преимущества работы с нами:
- Использование любого софта с использованием прокси
- Возможность загрузки на сервера любых онлайн игр
- 1gb/s канал без ограничений
- Поддерживаем почти любые ОС: Windows, Linux, CentOS, Debian, Ubuntu...
- Защита от DDoS
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Несколько наших серверов:
Нидерланды Z1 - [1 Ядро, 512 Mb ОЗУ, 5 GB SSD] - 265 руб/мес
США P2 - [2 Ядра, 2 GB ОЗУ, 30 GB NVME] - 456 руб/мес
Украина P3 - [2 Ядра, 4 GB ОЗУ, 50 GB SSD NVME] - 772 руб/мес
Молдова P4 - [4 Ядра, 6 GB ОЗУ, 60 GB SSD NVME] - 1198 руб/мес
Великобритания P5 - [4 Ядра, 8 GB ОЗУ, 80 GB SSD NVME] - 1418 руб/мес
Россия P6 - [6 Ядер, 10 GB ОЗУ, 90 GB SSD NVME] - 2275 руб/мес
Латвия P7 - [8 Ядер, 12 GB ОЗУ, 140 GB SSD NVME] - 2809 руб/мес
Германия P8 - [10 Ядер, 14 GB ОЗУ, 160 GB SSD NVME] - 3879 руб/мес
Гонконг P9 - [16 Ядер, 16 GB ОЗУ, 200 GB SSD NVME] - 4813 руб/мес
Канада P10 - [20 Ядер, 24 GB ОЗУ, 300 GB SSD NVME] - 8022 руб/мес
С полным списком всех серверов можно ознакомиться на сайте
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Заказать - на сайте https://fitserver.ru/
Правила - https://fitserver.ru/rules.php
"Перед заказом правила обязательны к прочтению"
Оплату принимаем: QIWI, ЮMoney, VISA, MasterCard, Криптовалюта.
Telegram: @fitserver_ru
АрендаVPS/VDS, аренда виртуального сервера, аренда windows, Linux, VDS, VPS, сервер, арендовать сервер, виртуальный сервер. сервер под любые задачи, VPS для любых целей.
https://hop.cx/freesex
NEW SEASON 2022!
GREAT VALID!
GREAT PRICE! 100$
REAL VALID 90%
BASE: exclusive_fat_usa
HUGE OF USA!
http://tor-cc-shop.onlineshoppingwithoutcvv.ru
http://validcc-checker.liveccfullz.ru
http://fullz.approvedccshop.ru
http://shopcccarding.ru
http://joker-s-stash-cc-dumps.creditcarddumpswithpin.ru
httpcc-shopping2020-fullzru
https://commemoratewtc.com/how-was-synapse-x-made-v3rm/
Ретушь фотографий
Удаление родинок, татуировок и других дефектов на коже
Пластика фигуры и лица, увеличение/уменьшение объёмов
Коллажирование из нескольких фотографий
Обтравка и замена фона с максимальной реалистичностью
Обтравка предметов на любой фоновый цвет
Обтравка с удалением фона (PNG)
Изменение цвета любых деталей на фото
Добавление/Удаление нежелательных объектов
Добавление/Удаление водяных знаков
Реставрация старых фотографий
Создание экшнов для пакетной обработки
Инфографика для маркетплейсов
Любые баннеры, листовки и т. д.
Посмотреть мое портфоли можно в группе https://vk.com/kabanova_ps
https://toliveischrist.cc/jilkbreak-roblox-speed-hacks/
Here is the link https://kwork.com/offpageseo/13467403/professional-website-promotion-1500-good-back-links
https://gay0day.com/tags/bus/
https://xlilith.com/search/asshole-closeup/
Apporter votre contribution