manpagez: man pages & more
info guile
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Matching Nodesets

A nodeset pattern is designated by a list in the pattern, beginning the identifier list. The example below illustrates matching a nodeset.

(sxml-match '("i" "j" "k" "l" "m")
  [(list ,a ,b ,c ,d ,e)
   `((p ,a) (p ,b) (p ,c) (p ,d) (p ,e))])

This example wraps each nodeset item in an HTML paragraph element. This example can be rewritten and simplified through using ellipsis:

(sxml-match '("i" "j" "k" "l" "m")
  [(list ,i ...)
   `((p ,i) ...)])

This version will match nodesets of any length, and wrap each item in the nodeset in an HTML paragraph element.

This document was generated on April 20, 2013 using texi2html 5.0.

© 2000-2019
Individual documents may contain additional copyright information.