Ignore:
Timestamp:
08/03/12 22:25:10 (9 years ago)
Author:
sjamaan
Message:

sxpath: Refactor library structure by putting low-level xpath parser into its own module. This will allow ddo-sxpath and sxml-modifications to re-use it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/sxpath/trunk/chicken/txpath.scm

    r24873 r27178  
    1 (provide 'txpath)
    2 
    31(module txpath
    42  (sxml:core-last
     
    4038   txpath)
    4139
    42 (import chicken scheme (only srfi-1 filter)
    43         (only srfi-13 string-prefix-ci? string-contains)
    44         (prefix (only data-structures string-split) chicken:))
    45 
    46 (require-extension sxpath-lolevel)
    47 
    48 (define (substring? pattern str) (string-contains str pattern))
    49 ;; This is a simplified version of the "string-split" procedure provided
    50 ;; by SSAX/lib/util.scm (which is 57 lines long!); this one is enough for txpath
    51 (define (string-split str separators . rest)
    52   (if (not (null? rest))
    53       (error (string-append "String-split called with more arguments. "
    54                             "This shouldn't happen and is a bug in the "
    55                             "chicken-specific code of the sxpath egg."))
    56       (chicken:string-split str (list->string separators))))
     40(import chicken scheme)
     41(use sxpath-lolevel txpath-parser)
    5742
    5843(include "chicken/common.scm")
    59 
    60 (include "sxml-tools/xpath-parser.scm")
    6144(include "sxml-tools/txpath.scm")
    6245)
Note: See TracChangeset for help on using the changeset viewer.