Function: rng-ipattern-to-string
rng-ipattern-to-string is a byte-compiled function defined in
rng-match.el.gz.
Signature
(rng-ipattern-to-string IPATTERN)
Source Code
;; Defined in /usr/src/emacs/lisp/nxml/rng-match.el.gz
;;; Debugging utilities
(defun rng-ipattern-to-string (ipattern)
(let ((type (rng--ipattern-type ipattern)))
(cond ((eq type 'after)
(concat (rng-ipattern-to-string
(rng--ipattern-child ipattern))
" </> "
(rng-ipattern-to-string
(rng--ipattern-after ipattern))))
((eq type 'element)
(concat "element "
(rng-name-class-to-string
(rng--ipattern-name-class ipattern))
;; we can get cycles with elements so don't print it out
" {...}"))
((eq type 'attribute)
(concat "attribute "
(rng-name-class-to-string
(rng--ipattern-name-class ipattern))
" { "
(rng-ipattern-to-string
(rng--ipattern-child ipattern))
" } "))
((eq type 'empty) "empty")
((eq type 'text) "text")
((eq type 'not-allowed) "notAllowed")
((eq type 'one-or-more)
(concat (rng-ipattern-to-string
(rng--ipattern-child ipattern))
"+"))
((eq type 'choice)
(concat "("
(mapconcat 'rng-ipattern-to-string
(rng--ipattern-child ipattern)
" | ")
")"))
((eq type 'group)
(concat "("
(mapconcat 'rng-ipattern-to-string
(rng--ipattern-child ipattern)
", ")
")"))
((eq type 'interleave)
(concat "("
(mapconcat 'rng-ipattern-to-string
(rng--ipattern-child ipattern)
" & ")
")"))
(t (symbol-name type)))))