Home
Über mich
Veröffentlichungen

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:keys

XPath: map:keys

XPath: map:keys

map:keys gibt eine Sequenz aller Schlüsselwerte zurück.

Signatur:


map:keys($map as map(*)) as xs:anyAtomicType*

Siehe https://www.w3.org/TR/xpath-functions-31/#func-map-keys und den dortigen Hinweis, dass die Reihenfolge der Ergebnisse nicht garantiert ist (The function is non-deterministic with respect to ordering (see 1.7.4 Properties of functions). This means that two calls with the same argument are not guaranteed to produce the results in the same order. ).


<xsl:template match="/">
  <root>
   <keys nr="1">
    <xsl:for-each select="map:keys($vmap)">
     <key>
      <xsl:value-of select="."/>
     </key>
    </xsl:for-each>
   </keys>
  </root>
</xsl:template>

Die Einzelwerte der generierten Sequenz lesen Sie hier:


<root>
 <keys nr="1">
  <key>0</key>
  <key>1</key>
  <key>2</key>
 </keys>
</root>

wg / 7. April 2020



Fragen? Anmerkungen? Tipps?

Bitte nehmen Sie Kontakt zu mir auf.






Vielen Dank für Ihr Interesse an meiner Arbeit.



V.i.S.d.P.: Wilfried Grupe * Klus 6 * 37643 Negenborn

☎ 0151. 750 360 61 * eMail: info10@wilfried-grupe.de

www.wilfried-grupe.de/map2.html