(rng-dt-error "The string datatype does not take any parameters")))
((eq name 'token)
(if (null params)
- '(t rng-collapse-space)
+ '(t string-clean-whitespace)
(rng-dt-error "The token datatype does not take any parameters")))
(t
(rng-dt-error "There is no built-in datatype %s" name))))
(or (cdr (assq 'uri props))
(let ((type-id (cdr (assq 'typeId props))))
(and type-id
- (cons (rng-collapse-space type-id) nil)))))
+ (cons (string-clean-whitespace type-id) nil)))))
(defun rng-possible-type-ids-using (file type-ids)
(let ((rules (rng-get-parsed-schema-locating-file file))
(let ((id (cdr (assq 'id (cdr rule)))))
(when id
(setq type-ids
- (cons (rng-collapse-space id)
+ (cons (string-clean-whitespace id)
type-ids)))))
((eq (car rule) 'include)
(let ((uri (cdr (assq 'rules (cdr rule)))))
(cond ((and (eq (car rule) 'typeId)
(let ((id (assq 'id (cdr rule))))
(and id
- (string= (rng-collapse-space (cdr id)) type-id))))
+ (string= (string-clean-whitespace (cdr id)) type-id))))
(setq schema (rng-match-default-rule (cdr rule))))
((eq (car rule) 'include)
(let ((uri (cdr (assq 'rules (cdr rule)))))
s
t))
-(defun rng-collapse-space (string)
- (string-trim
- (replace-regexp-in-string "[ \t\r\n]+" " " string t t)))
-
(define-error 'rng-error nil)
(defun rng-uniquify-eq (list)
(define-obsolete-function-alias 'rng-uniquify-equal #'seq-uniq "28.1")
(define-obsolete-function-alias 'rng-blank-p #'string-blank-p "29.1")
+(define-obsolete-function-alias 'rng-collapse-space #'string-clean-whitespace "29.1")
(provide 'rng-util)