Hex Artifact Content
Not logged in

Artifact 42a0150f777e24590ca6997af56d520b1a6d8b54:


0000: 0a 28 6c 69 62 72 61 72 79 20 28 73 78 6d 6c 20  .(library (sxml 
0010: 73 78 70 61 74 68 29 0a 20 20 28 65 78 70 6f 72  sxpath).  (expor
0020: 74 20 6e 6f 64 65 73 65 74 3f 0a 20 20 20 20 20  t nodeset?.     
0030: 20 20 20 20 20 6e 6f 64 65 2d 74 79 70 65 6f 66       node-typeof
0040: 3f 0a 20 20 20 20 20 20 20 20 20 20 6e 6f 64 65  ?.          node
0050: 2d 65 71 3f 0a 20 20 20 20 20 20 20 20 20 20 6e  -eq?.          n
0060: 6f 64 65 2d 65 71 75 61 6c 3f 0a 20 20 20 20 20  ode-equal?.     
0070: 20 20 20 20 20 6e 6f 64 65 2d 70 6f 73 0a 20 20       node-pos.  
0080: 20 20 20 20 20 20 20 20 74 61 6b 65 2d 75 6e 74          take-unt
0090: 69 6c 0a 20 20 20 20 20 20 20 20 20 20 74 61 6b  il.          tak
00a0: 65 2d 61 66 74 65 72 0a 20 20 20 20 20 20 20 20  e-after.        
00b0: 20 20 6d 61 70 2d 75 6e 69 6f 6e 0a 20 20 20 20    map-union.    
00c0: 20 20 20 20 20 20 6e 6f 64 65 2d 72 65 76 65 72        node-rever
00d0: 73 65 0a 20 20 20 20 20 20 20 20 20 20 6e 6f 64  se.          nod
00e0: 65 2d 74 72 61 63 65 0a 20 20 20 20 20 20 20 20  e-trace.        
00f0: 20 20 73 65 6c 65 63 74 2d 6b 69 64 73 0a 20 20    select-kids.  
0100: 20 20 20 20 20 20 20 20 6e 6f 64 65 2d 73 65 6c          node-sel
0110: 66 0a 20 20 20 20 20 20 20 20 20 20 6e 6f 64 65  f.          node
0120: 2d 6a 6f 69 6e 0a 20 20 20 20 20 20 20 20 20 20  -join.          
0130: 6e 6f 64 65 2d 72 65 64 75 63 65 0a 20 20 20 20  node-reduce.    
0140: 20 20 20 20 20 20 6e 6f 64 65 2d 6f 72 0a 20 20        node-or.  
0150: 20 20 20 20 20 20 20 20 6e 6f 64 65 2d 63 6c 6f          node-clo
0160: 73 75 72 65 0a 20 20 20 20 20 20 20 20 20 20 6e  sure.          n
0170: 6f 64 65 2d 70 61 72 65 6e 74 0a 20 20 20 20 20  ode-parent.     
0180: 20 20 20 20 20 73 78 70 61 74 68 29 0a 20 20 28       sxpath).  (
0190: 69 6d 70 6f 72 74 20 28 65 78 63 65 70 74 20 28  import (except (
01a0: 73 63 68 65 6d 65 29 0a 20 20 20 20 20 20 20 20  scheme).        
01b0: 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6e 67            string
01c0: 2d 63 6f 70 79 20 73 74 72 69 6e 67 2d 66 6f 72  -copy string-for
01d0: 2d 65 61 63 68 20 73 74 72 69 6e 67 2d 3e 6c 69  -each string->li
01e0: 73 74 20 73 74 72 69 6e 67 2d 75 70 63 61 73 65  st string-upcase
01f0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  .               
0200: 20 20 20 73 74 72 69 6e 67 2d 64 6f 77 6e 63 61     string-downca
0210: 73 65 20 73 74 72 69 6e 67 2d 74 69 74 6c 65 63  se string-titlec
0220: 61 73 65 20 73 74 72 69 6e 67 2d 68 61 73 68 20  ase string-hash 
0230: 73 74 72 69 6e 67 2d 63 6f 70 79 21 20 73 74 72  string-copy! str
0240: 69 6e 67 2d 66 69 6c 6c 21 0a 20 20 20 20 20 20  ing-fill!.      
0250: 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 6c 64              fold
0260: 2d 72 69 67 68 74 20 65 72 72 6f 72 20 66 69 6c  -right error fil
0270: 74 65 72 29 0a 20 20 20 20 20 20 20 20 20 20 28  ter).          (
0280: 70 72 65 66 69 78 20 28 6f 6e 6c 79 20 28 73 63  prefix (only (sc
0290: 68 65 6d 65 29 20 65 72 72 6f 72 29 20 73 63 68  heme) error) sch
02a0: 65 6d 65 3a 29 0a 20 20 20 20 20 20 20 20 20 20  eme:).          
02b0: 28 73 72 66 69 20 73 31 33 20 73 74 72 69 6e 67  (srfi s13 string
02c0: 73 29 29 0a 20 20 0a 20 20 28 69 6e 63 6c 75 64  s)).  .  (includ
02d0: 65 20 22 75 74 69 6c 73 2e 73 73 22 29 0a 20 20  e "utils.ss").  
02e0: 28 69 6e 63 6c 75 64 65 20 22 73 78 70 61 74 68  (include "sxpath
02f0: 2d 69 6d 70 6c 2e 73 73 22 29 0a 20 20 0a 20 20  -impl.ss").  .  
0300: 29 0a                                            ).