Xml 比较两个参数值
我似乎不明白这个基本要求 尝试匹配参数token&id以打印给定语言的值 首先尝试了每个语句,但这些语句只是继续打印所有数据,因为它们不会中断。有了模板,它越来越近了,但我错过了一些东西 xml:Xml 比较两个参数值,xml,xslt,Xml,Xslt,我似乎不明白这个基本要求 尝试匹配参数token&id以打印给定语言的值 首先尝试了每个语句,但这些语句只是继续打印所有数据,因为它们不会中断。有了模板,它越来越近了,但我错过了一些东西 xml: <dictionary> <tokens> <afk token="G133" symbol="AIP"/> <afk token="G001" symbol="APP"/> <afk token="G002" symbol
<dictionary>
<tokens>
<afk token="G133" symbol="AIP"/>
<afk token="G001" symbol="APP"/>
<afk token="G002" symbol="AUDIT"/>
<afk token="G209" symbol="BACC"/>
<afk token="G003" symbol="BASE"/>
</tokens>
<translations>
<item id="G001">
<en>Actual Payout Percentage</en>
<de>Effektiver Auszahlungs-Prozentsatz</de>
<es>Porcentaje de pago real</es>
<zh></zh>
<zs></zs>
<fr>Pourcentage de paiement réel</fr>
<it></it>
<nl></nl>
</item>
<item id="G002">
<en>Audit</en>
<de>Audit</de>
<es>Auditoría</es>
<zh></zh>
<zs></zs>
<fr>Audit</fr>
<it></it>
<nl></nl>
</item>
<item id="G003">
<en>Base value, start value, restart value</en>
<de>Basiswert, Startwert, Neustart-Wert</de>
<es>Valor de base, valor de inicio, valor de reinicio</es>
<zh></zh>
<zs></zs>
<fr>Valeur de base, valeur de démarrage, valeur de redémarrage</fr>
<it></it>
<nl></nl>
</item>
<item id="G004">
<en>Bill Box Level</en>
<de>Bill-Box-Füllstand</de>
<es>Nivel de la caja de billetes</es>
<zh></zh>
<zs></zs>
<fr>Niveau de caisse à billets</fr>
<it></it>
<nl></nl>
</item>
<item id="G005">
<en>Bill Count</en>
<de>Banknoten-Zählung</de>
<es>Recuento de billetes</es>
<zh></zh>
<zs></zs>
<fr>Comptage de billets</fr>
<it></it>
<nl></nl>
</item>
<item id="G006">
<en>Bill Drop</en>
<de>Banknoten-Drop</de>
<es>Drop de billetes</es>
<zh></zh>
<zs></zs>
<fr>Recettes en billets</fr>
<it></it>
<nl></nl>
</item>
<item id="G007">
<en>Bill(s)</en>
<de>Banknote(n) </de>
<es>Billete(s)</es>
<zh></zh>
<zs></zs>
<fr>Billet(s)</fr>
<it></it>
<nl></nl>
</item>
</translations>
实际支出百分比
Auszahlungs Prozentsatz有效驾驶员
帕戈皇家酒店
佩耶尔城堡酒店
审计
审计
审计员
审计
基本值、开始值、重新启动值
巴斯维特,斯塔维特,纽斯维特
基地之战、伊尼西奥之战、雷尼西奥之战
贝基之家、婚姻之家、红色之家
票据箱液位
比尔·博克斯·弗尔斯坦德
比勒特斯之家酒店
Niveau de caisseáa钢坯
帐单计数
钞票n-Zählung
比勒特斯酒店
钢坯成本
付账单
纸币滴
下料
坯料收料槽
条例草案(s)
钞票(n)
钢坯(s)
钢坯
xsl:
我不知道解析器是如何得到这个结果的:
AIP
应用程序
实际支出百分比
稽核
实际支出百分比
BACC
基地
实际支付百分比声明密钥
<xsl:key name="ref" match="item" use="@id"/>
并使用它
<xsl:template match="afk">
<strong>
<xsl:value-of select="@symbol"/>
</strong>
<xsl:value-of select="key('ref', @token)/en"/>
<br/>
</xsl:template>
您想要得到的结果(代码)是什么?漂亮,我不知道这项技术。非常感谢。
<xsl:template match="afk">
<strong>
<xsl:value-of select="@symbol"/>
</strong>
<xsl:value-of select="key('ref', @token)/en"/>
<br/>
</xsl:template>