(if (or (rng--ipattern-nullable
(rng-data-deriv child value))
(and (rng--ipattern-nullable child)
- (rng-blank-p value)))
+ (string-blank-p value)))
(rng--ipattern-after ipattern)
rng-not-allowed-ipattern)))
((eq type 'data)
(unless (rng-match-element-value (or text ""))
(cons "Invalid data" (and text 'text))))
((and text
- (not (rng-blank-p text))
+ (not (string-blank-p text))
(not (rng-match-mixed-text)))
(cons "Text not allowed" 'text))
((not start-tag)
(defconst rng-builtin-datatypes-uri (rng-make-datatypes-uri ""))
-(defun rng-blank-p (str) (string-match "\\`[ \t\n\r]*\\'" str))
-
(defun rng-substq (new old list)
"Replace first member of LIST (if any) that is `eq' to OLD by NEW.
LIST is not modified."
(define-error 'rng-error nil)
-;; Obsolete.
-
(defun rng-uniquify-eq (list)
(declare (obsolete seq-uniq "28.1"))
(seq-uniq list #'eq))
(define-obsolete-function-alias 'rng-uniquify-equal #'seq-uniq "28.1")
+(define-obsolete-function-alias 'rng-blank-p #'string-blank-p "29.1")
(provide 'rng-util)
(defun rng-segment-blank-p (segment)
(if (car segment)
- (rng-blank-p (car segment))
+ (string-blank-p (car segment))
(apply #'rng-region-blank-p
(cdr segment))))
((not (or (and whitespace
(or (eq whitespace t)
(if value
- (rng-blank-p value)
+ (string-blank-p value)
(rng-region-blank-p start end))))
(rng-match-mixed-text)))
(rng-mark-invalid "Text not allowed" start (or end (point))))))