(provide 'txpath) (module txpath (sxml:core-last sxml:core-position sxml:core-count sxml:core-id sxml:core-local-name sxml:core-namespace-uri sxml:core-name sxml:core-string sxml:core-concat sxml:core-starts-with sxml:core-contains sxml:core-substring-before sxml:core-substring-after sxml:core-substring sxml:core-string-length sxml:core-normalize-space sxml:core-translate sxml:core-boolean sxml:core-not sxml:core-true sxml:core-false sxml:core-lang sxml:core-number sxml:core-sum sxml:core-floor sxml:core-ceiling sxml:core-round sxml:classic-params sxml:xpath sxml:xpointer sxml:xpath-expr sxml:xpath+index sxml:xpath+root sxml:xpath+root+vars sxml:xpointer+index sxml:xpointer+root+vars txpath) (import chicken scheme (only srfi-1 filter) (only srfi-13 string-prefix-ci? string-contains) (prefix (only data-structures string-split) chicken:)) (require-extension sxpath-lolevel) (define (substring? pattern str) (string-contains str pattern)) ;; This is a simplified version of the "string-split" procedure provided ;; by SSAX/lib/util.scm (which is 57 lines long!); this one is enough for txpath (define (string-split str separators . rest) (if (not (null? rest)) (error (string-append "String-split called with more arguments. " "This shouldn't happen and is a bug in the " "chicken-specific code of the sxpath egg.")) (chicken:string-split str (list->string separators)))) (include "chicken/common.scm") (include "sxml-tools/xpath-parser.scm") (include "sxml-tools/txpath.scm") )