XML | XML-Schema | XPath | XSL-T | XSL-FO | XQuery | XProc | SVG |
XPath / XPath-Funktionen / XPath: Sequenz-Funktionen / XPath 3.1: Map, xsl:map / XPath: map:remove
![]() |
![]() |
➪ map:remove generiert eine Map, in der alle Inhalte der ursprünglichen Map enthalten sind, jedoch ohne jenen Schlüssel, der mit map:remove entfernt wurde.
Signatur:
map:remove($map as map(*), $keys as xs:anyAtomicType*) as map(*)
Siehe https://www.w3.org/TR/xpath-functions-31/#func-map-remove
<xsl:template match="/">
<root>
<remove>
<xsl:variable name="vmap4"
select="map:remove($vmap, 1)"/>
<xsl:for-each select="map:keys($vmap4)">
<key nr="{.}">
<xsl:value-of select="map:get($vmap4, .)"/>
</key>
</xsl:for-each>
</remove>
</root>
</xsl:template>
Auch dieses Ergebnis ist nachvollziehbar:
<root>
<remove>
<key nr="0">Hugo Holzflos</key>
<key nr="2">Resi Denzschlos</key>
</remove>
</root>
wg / 7. April 2020
Fragen? Anmerkungen? Tipps?
Bitte nehmen Sie Kontakt zu mir auf.
V.i.S.d.P.: Wilfried Grupe * Klus 6 * 37643 Negenborn
☎ 0151. 750 360 61 * eMail: info10@wilfried-grupe.de