File: example.example.1

package info (click to toggle)
libxml2 2.6.16-7sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 39,520 kB
  • ctags: 17,752
  • sloc: xml: 145,516; ansic: 140,533; python: 10,324; sh: 8,559; makefile: 1,535; php: 366; perl: 67
file content (14 lines) | stat: -rw-r--r-- 658 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?xml version="1.0"?>
<!DOCTYPE example PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<example><title>A DSSSL Function</title><programlisting>
(define (node-list-filter-by-gi nodelist gilist)
  ;; Returns the node-list that contains every element of the original
  ;; nodelist whose gi is in gilist
  (let loop ((result (empty-node-list)) (nl nodelist))
    (if (node-list-empty? nl)
	result
	(if (member (gi (node-list-first nl)) gilist)
	    (loop (node-list result (node-list-first nl)) 
		  (node-list-rest nl))
	    (loop result (node-list-rest nl))))))
</programlisting></example>