?
Current Path : /usr/share/emacs/24.3/lisp/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/xml.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:34 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/xml.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file contains utf-8 non-ASCII characters, ;;; and so cannot be loaded into Emacs 22 or earlier. (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (string-lessp emacs-version "23") (error "`%s' was compiled for Emacs 23 or later" #$)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@43 What to substitute for undefined entities (defconst xml-undefined-entity "?" (#$ . 546)) #@53 Alist mapping default XML namespaces to their URIs. (defconst xml-default-ns '((#1="" . #1#) ("xml" . "http://www.w3.org/XML/1998/namespace") ("xmlns" . "http://www.w3.org/2000/xmlns/")) (#$ . 641)) #@55 Alist mapping XML entities to their replacement text. (defvar xml-entity-alist '(("lt" . "<") ("gt" . ">") ("apos" . "'") ("quot" . "\"") ("amp" . "&")) (#$ . 846)) #@293 The maximum size of entity reference expansions. If the size of the buffer increases by this many characters while expanding entity references in a segment of character data, the XML parser signals an error. Setting this to nil removes the limit (making the parser vulnerable to XML bombs). (defvar xml-entity-expansion-limit 20000 (#$ . 1026)) #@43 Alist of defined XML parametric entities. (defvar xml-parameter-entity-alist nil (#$ . 1378)) #@57 Non-nil when the XML parser is parsing an XML fragment. (defvar xml-sub-parser nil (#$ . 1478)) #@42 Set to non-nil to get validity checking. (defvar xml-validating-parser nil (#$ . 1580)) #@382 Return the tag associated with NODE. Without namespace-aware parsing, the tag is a symbol. With namespace-aware parsing, the tag is a cons of a string representing the uri of the namespace with the local name of the tag. For example, <foo> would be represented by '("" . "foo"). If you'd just like a plain symbol instead, use 'symbol-qnames in the PARSE-NS argument. (defalias 'xml-node-name #[(node) "@\207" [node] 1 (#$ . 1675)]) (put 'xml-node-name 'byte-optimizer 'byte-compile-inline-expand) #@61 Return the list of attributes of NODE. The list can be nil. (defalias 'xml-node-attributes #[(node) "A@\207" [node] 1 (#$ . 2193)]) (put 'xml-node-attributes 'byte-optimizer 'byte-compile-inline-expand) #@82 Return the list of children of NODE. This is a list of nodes, and it can be nil. (defalias 'xml-node-children #[(node) "\211AA)\207" [node x] 2 (#$ . 2403)]) (put 'xml-node-children 'byte-optimizer 'byte-compile-inline-expand) #@117 Return the children of NODE whose tag is CHILD-NAME. CHILD-NAME should match the value returned by `xml-node-name'. (defalias 'xml-get-children #[(node child-name) "\306 \211\211AA*\306\211\203. \f@\211<\203' \211@) \232\203' B\fA\211\204 *\237)\207" [match node x child --dolist-tail-- child-name nil] 3 (#$ . 2639)]) #@113 Get from NODE the value of ATTRIBUTE. Return nil if the attribute was not found. See also `xml-get-attribute'. (defalias 'xml-get-attribute-or-nil #[(node attribute) "\302 \211A@)\"A\207" [attribute node assoc] 4 (#$ . 2979)]) #@137 Get from NODE the value of ATTRIBUTE. An empty string is returned if the attribute was not found. See also `xml-get-attribute-or-nil'. (defalias 'xml-get-attribute #[(node attribute) "\302 \"\206 \303\207" [node attribute xml-get-attribute-or-nil ""] 3 (#$ . 3216)]) (put 'xml-get-attribute 'byte-optimizer 'byte-compile-inline-expand) (defconst xml-name-start-char-re "[[:word:]:_]") (defconst xml-name-char-re "[-0-9.[:word:]:_·̀-ͯ‿-⁀]") (defconst xml-name-re (concat xml-name-start-char-re xml-name-char-re "*")) (defconst xml-names-re (concat xml-name-re "\\(?: " xml-name-re "\\)*")) (defconst xml-nmtoken-re (concat xml-name-char-re "+")) (defconst xml-nmtokens-re (concat xml-nmtoken-re "\\(?: " xml-name-re "\\)*")) (defconst xml-char-ref-re "\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)") (defconst xml-entity-ref (concat "&" xml-name-re ";")) (defconst xml-entity-or-char-ref-re (concat "&\\(?:#\\(x\\)?\\([0-9a-fA-F]+\\)\\|\\(" xml-name-re "\\)\\);")) (defconst xml-pe-reference-re (concat "%\\(" xml-name-re "\\);")) (defconst xml-reference-re (concat "\\(?:" xml-entity-ref "\\|" xml-char-ref-re "\\)")) (defconst xml-att-value-re (concat "\\(?:\"\\(?:[^&\"]\\|" xml-reference-re "\\)*\"\\|" "'\\(?:[^&']\\|" xml-reference-re "\\)*'\\)")) (defconst xml-tokenized-type-re "\\(?:ID\\|IDREF\\|IDREFS\\|ENTITY\\|ENTITIES\\|NMTOKEN\\|NMTOKENS\\)") (defconst xml-notation-type-re (concat "\\(?:NOTATION\\s-+(\\s-*" xml-name-re "\\(?:\\s-*|\\s-*" xml-name-re "\\)*\\s-*)\\)")) (defconst xml-enumeration-re (concat "\\(?:(\\s-*" xml-nmtoken-re "\\(?:\\s-*|\\s-*" xml-nmtoken-re "\\)*\\s-+)\\)")) (defconst xml-enumerated-type-re (concat "\\(?:" xml-notation-type-re "\\|" xml-enumeration-re "\\)")) (defconst xml-att-type-re (concat "\\(?:CDATA\\|" xml-tokenized-type-re #1="\\|" xml-notation-type-re #1# xml-enumerated-type-re "\\)")) (defconst xml-default-decl-re (concat "\\(?:#REQUIRED\\|#IMPLIED\\|" "\\(?:#FIXED\\s-+\\)*" xml-att-value-re "\\)")) (defconst xml-att-def-re (concat "\\(?:\\s-*" xml-name-re #1="\\s-*" xml-att-type-re #1# xml-default-decl-re "\\)")) (defconst xml-entity-value-re (concat "\\(?:\"\\(?:[^%&\"]\\|" xml-pe-reference-re #1="\\|" xml-reference-re "\\)*\"\\|'\\(?:[^%&']\\|" xml-pe-reference-re #1# xml-reference-re "\\)*'\\)")) #@147 Syntax table used by the XML parser. In this syntax table, the XML space characters [ \t\r\n], and only those characters, have whitespace syntax. (defvar xml-syntax-table (byte-code "\303\304\305\"\306\307\211\203 \n@\310 \311#\210\nA\211\204 *\310\312\313#\210\310\314\313#\210\310\315\313#\210\310\316\313#\210\310\317\313#\210\310\320\313#\210\310\321\313#\210\310\322\313#\210\310\323\313#\210\310\324\313#\210\310\325\313#\210\310\326\313#\210\310\327\313#\210\310\330\313#\210)\207" [table c --dolist-tail-- make-char-table syntax-table (3) (32 9 13 10) nil modify-syntax-entry " " (65 . 90) "w" (97 . 122) (192 . 214) (216 . 246) (248 . 767) (880 . 893) (895 . 8191) (8204 . 8205) (8304 . 8591) (11264 . 12271) (12289 . 55295) (63744 . 64975) (65008 . 65533) (65536 . 983039)] 5) (#$ . 5490)) #@646 Parse the well-formed XML file FILE. Return the top node with all its children. If PARSE-DTD is non-nil, the DTD is parsed rather than skipped. If PARSE-NS is non-nil, then QNAMES are expanded. By default, the variable `xml-default-ns' is the mapping from namespaces to URIs, and expanded names will be returned as a cons ("namespace:" . "foo"). If PARSE-NS is an alist, it will be used as the mapping from namespace to URIs instead. If it is the symbol 'symbol-qnames, expanded names will be returned as a plain symbol 'namespace:foo instead of a cons. Both features can be combined by providing a cons cell (symbol-qnames . ALIST). (defalias 'xml-parse-file #[(file &optional parse-dtd parse-ns) "\304\305!rq\210\306\216\307 !\210\310\n\"+\207" [#1=#:temp-buffer file parse-dtd parse-ns generate-new-buffer " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) insert-file-contents xml--parse-buffer] 3 (#$ . 6320)]) #@865 Parse the region from BEG to END in BUFFER. Return the XML parse tree, or raise an error if the region does not contain well-formed XML. If BEG is nil, it defaults to `point-min'. If END is nil, it defaults to `point-max'. If BUFFER is nil, it defaults to the current buffer. If PARSE-DTD is non-nil, parse the DTD and return it as the first element of the list. If PARSE-NS is non-nil, then QNAMES are expanded. By default, the variable `xml-default-ns' is the mapping from namespaces to URIs, and expanded names will be returned as a cons ("namespace:" . "foo"). If PARSE-NS is an alist, it will be used as the mapping from namespace to URIs instead. If it is the symbol 'symbol-qnames, expanded names will be returned as a plain symbol 'namespace:foo instead of a cons. Both features can be combined by providing a cons cell (symbol-qnames . ALIST). (defalias 'xml-parse-region #[(&optional beg end buffer parse-dtd parse-ns) "\204 p\306\307!r q\210\310\216\311\n#\210\312\f \"+\207" [buffer #1=#:temp-buffer beg end parse-dtd parse-ns generate-new-buffer " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) insert-buffer-substring-no-properties xml--parse-buffer] 4 (#$ . 7296)]) (defalias 'xml--parse-buffer #[(parse-dtd parse-ns) "\306 p\307\216\310\n!\210\311\f\311\211\211eb\210m\204\202 \312\313\311\314#\203| \315u\210\316\"\211\204B m\204 \317u\210\202 \203S \204S \320\321!\210\202 @<\203s \203s @A\203 \322\323A\"\210\202 \322\323\"\210\202 db\210\202 \203\217 \237B\202\222 \237. \207" [#1=#:buffer #2=#:table xml-syntax-table xml-entity-alist xml-parameter-entity-alist dtd syntax-table ((byte-code "rq\210\302 !\210)\302\207" [#1# #2# set-syntax-table] 2)) set-syntax-table nil search-forward "<" t -1 xml-parse-tag-1 1 error "XML: (Not Well-Formed) Only one root tag allowed" add-to-list xml result case-fold-search parse-dtd parse-ns xml-sub-parser] 7]) #@574 Perform any namespace expansion. NAME is the name to perform the expansion on. DEFAULT is the default namespace. XML-NS is a cons of namespace names to uris. When namespace-aware parsing is off, then XML-NS is nil. During namespace-aware parsing, any name without a namespace is put into the namespace identified by DEFAULT. nil is used to specify that the name shouldn't be given a namespace. Expanded names will by default be returned as a cons. If you would like to get plain symbols instead, provide a cons cell (symbol-qnames . ALIST) in the XML-NS argument. (defalias 'xml-maybe-do-ns #[(name default xml-ns) ":\203y \242\301=\306\307\n\"\211\203 \n\310\225\311O\202 \n\203) \n\310\211\224O\202* \f\312\230\2055 ?\313\203A \312\202C \203L A\202M \"A\206S \314 \203i \312\230\204i \315\fP!\202v \203t \314\202u \fB.\207\315\n!\207" [xml-ns symbol-qnames name nsp lname default string-match ":" 0 nil "xmlns" assoc "" intern prefix special ns] 4 (#$ . 9280)]) #@383 Parse the tag at point. If PARSE-DTD is non-nil, the DTD of the document, if any, is parsed and returned as the first element in the list. If PARSE-NS is non-nil, expand QNAMES; for further details, see `xml-parse-region'. Return one of: - a list : the matching node - nil : the point is not looking at a tag. - a pair : the first element is the DTD, the second is the node. (defalias 'xml-parse-tag #[(&optional parse-dtd parse-ns) "\306 \np`\307\310!r q\210\311\216\312 p\313\216\314!\210\315\f\"\210eb\210\316\".\207" [case-fold-search xml-entity-alist xml-parameter-entity-alist buf pos #1=#:temp-buffer nil generate-new-buffer " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) syntax-table ((byte-code "rq\210\302 !\210)\302\207" [#2=#:buffer #3=#:table set-syntax-table] 2)) set-syntax-table insert-buffer-substring-no-properties xml-parse-tag-1 #2# #3# xml-syntax-table parse-dtd parse-ns] 3 (#$ . 10293)]) #@69 Like `xml-parse-tag', but possibly modify the buffer while working. (defalias 'xml-parse-tag-1 #[(&optional parse-dtd parse-ns) "\206 \n\306=\203 \306B\202. \n\242:\204% \n\242\306=\203) \nA<\203) \n\202. \n\205. \307\310!\203D \311\312!\210\313\314!\210\315\f\"\202\354\307\316!\203e \317\225\311\320\321\322#\204Y \323\324!\210\325 \317\224\"\326 P)\202\354\307\327!\203\212 \330\n!.\313\314!\210 \203\202 .\315\321\f\"B\202\206 \315\321\f\")\202\354\307\331!\203\250 \311\332!\210\313\314!\210m?\205\354\322/\315\f\")\202\354\307\333!\203\262 \321\202\354\307\334!\203\341\335\225b\210\336\335!0\337\f!1\3212\f:\203%1\3213\2114\203$4@\2113@:\2033\2115@@)\340\232\2033\2115@A)3AB6\f@9\203\f\211767AB\241\210)\2026\fB)4A\2114\204\331 *1\3410\342\f#D2\307\343!\203?\344u\2102\237\202\335\321f\345=\203\323\335u\210\3330\346Q8\3078!\204\310m\203d\323\3470\"\210\202P\307\333!\203\211\344u\210\323\350`\211\351\346\321\322#\203\317\224\202\200d{)0#\210\202P\321f\352U\203\245\315\321\f\"\2119\203\24192B2)\202P\326 :2@;\203\2752\211A2@:P\202\277:2B2)\202P\317\225b\2102\237)\202\335\323\353\325`\354Z`T\"\"+\202\354/\204\352\323\355!\210\326 *\207" [parse-dtd xml-validating-parser parse-ns xml-default-ns xml-ns pos symbol-qnames looking-at "<\\?" search-forward "?>" skip-syntax-forward " " xml-parse-tag-1 "<!\\[CDATA\\[" 0 "]]>" nil t error "XML: (Not Well Formed) CDATA section does not end anywhere in the document" buffer-substring-no-properties xml-parse-string "<!DOCTYPE[ \n ]" xml-parse-dtd "<!--" "-->" "</" "<\\([[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\)" 1 match-string-no-properties xml-parse-attlist "http://www.w3.org/2000/xmlns/" xml-maybe-do-ns "" "/>" 2 62 "\\s-*>" "XML: (Not Well-Formed) End of document while reading element `%s'" "XML: (Not Well-Formed) Invalid end tag `%s' (expecting `%s')" re-search-forward 60 "XML: (Well-Formed) Couldn't parse tag: %s" 10 "XML: (Well-Formed) Invalid character" dtd xml-sub-parser node-name attrs children attr --dolist-tail-- x #1=#:v #2=#:v end tag expansion] 8 (#$ . 11279)]) #@195 Parse character data at point, and return it as a string. Leave point at the start of the next thing to parse. This function can modify the buffer by expanding entity and character references. (defalias 'xml-parse-string #[nil "`\306 `Z\307\211m\204\252 \310\311!\204\252 \312\307w\210\307f\313=\203 \310\f!\204* \314\315!\210\316\317!\211\203j \320 \321\216\322\323\324 \316\325!\205B \326\"\"*\211\204V $\203V \314\327\316\330!\"\210\331\203a \332!\202c %\333\211#\210\202\222 \316\334!\335 &\"\211\204\202 $\203\202 \314\336 \"\210\331A\206\212 %\333\211#\210\330\224b\210'\203 \306 `Z\n'\\V\203 \314\337!\210\202 \340 (b\210\341\342(\333#\203\303 \331\343\333\211#\210\202\261 (b\210`{-\207" [val ref old-remaining-size start xml-entity-or-char-ref-re save-match-data-internal buffer-size nil looking-at "<" "^<&" 38 error "XML: (Not Well-Formed) Invalid entity reference" match-string 2 match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) decode-char ucs string-to-number 1 16 "XML: (Validity) Invalid character reference `%s'" 0 replace-match string t 3 assoc "XML: (Validity) Undefined entity `%s'" "XML: Entity reference expansion surpassed `xml-entity-expansion-limit'" point-marker re-search-forward " \n?" "\n" xml-validating-parser xml-undefined-entity xml-entity-alist xml-entity-expansion-limit end-marker] 7 (#$ . 13427)]) #@100 Return the attribute-list after point. Leave point at the first non-blank character after the tag. (defalias 'xml-parse-attlist #[(&optional xml-ns) "\306\211\211\307\310!\210\311\312!\203m \313\225\314\315\316!\306# b\210\311\317!\203* \313\225\202: \311\320!\2036 \313\225\202: \321\322!\210\323\n\"\203E \321\324!\210\315\316!\325\326\310\f#\210\327\f!\211;\204\\ \321\330!\210 B\nB* b\210\307\310!\210\202\n \n\237+\207" [name end-pos attlist xml-ns string expansion nil skip-syntax-forward " " looking-at "\\([[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\)\\s-*=\\s-*" 0 xml-maybe-do-ns match-string-no-properties 1 "\"\\([^\"]*\\)\"" "'\\([^']*\\)'" error "XML: (Not Well-Formed) Attribute values must be given between quotes" assoc "XML: (Not Well-Formed) Each attribute must be unique within an element" replace-regexp-in-string "\\s-\\{2,\\}" xml-substitute-special "XML: (Not Well-Formed) Entities in attributes cannot expand into elements"] 5 (#$ . 14846)]) #@78 Skip the DTD at point. This follows the rule [28] in the XML specifications. (defalias 'xml-skip-dtd #[nil "\301\302 )\207" [xml-validating-parser nil xml-parse-dtd] 1 (#$ . 15834)]) #@25 Parse the DTD at point. (defalias 'xml-parse-dtd #[(&optional parse-ns) "\306u\210\307\310!\210\311\312!\203 \203 \313\314!\210\311 !\210\315\316!\304D\n\317\316\225b\210\307\310!\210\311\320!\203r \316\225b\210\321\322\317\323#\204I \321\324\317\323#\204I \313\325!\210\315\326!\307\310!\210\321\327\317\323#\204e \321\330\317\323#\204e \313\331!\210 \315\326!\332E\fB)\202\230 \311\333!\203\230 \316\225b\210\321\327\317\323#\204\220 \321\330\317\323#\204\220 \313\331!\210\315\326!\334D\fB\307\310!\210\317f\335=\203\251 \317u\210\202j\317f\336=\204\264 \313\337!\210\317u\210\212\321@\317\323#\205\303 \316\224)\311\340!\204^\307\310!\210m\203\332 \313\341!\210\202\305 \311\342!\203[\203\353 \316\225X\203[\315\326!\315\343!\316\225ABC\344\345B\"\203\346B\2029\344\347B\"\203\350B\2029\344\351B\"\203)\352\315\326B\"!B\2029\344\353B\"\2049\2039\313\354!\210\355C\f\"\203K\203K\313\356C\"\210CBD\fBAb\210+\202\305 \311\357!\203s\203l\316\225X\203s\316\225b\210\202\305 \311\360!\203\230\361\362!\210\203\305 `V\203\305 \212\321@\317\323#\205\223\316\224)\202\305 \311\363!\203\344\203\251\316\225X\203\344\315\343!\316\225b\210D\364\326!\203\274\302\202\275\365E\366\315\367!\326\370O!F\355DEJ\"\204\340EDFBEJBL\210+\202\305 \311\371!\204\360\311\372!\203\203\373\316\225X\203\316\225b\210\202\305 \203L\212b\210\311@!\204\313\373!\210\364\326!G\374 H\355G\n\"\211I\2037\375IA\323\211#\210b\210\202;\316\225b\210+\321@\317\323#\205G\316\224)\202\305 \203W\313\376!\210\202\305 \377\317w\210\202\305 \311\201J !\203j\316\225b\210\f\237+\207" [xml-validating-parser xml-name-re xml-parameter-entity-alist next-parameter-entity dtd pubid 9 skip-syntax-forward " " looking-at ">" error "XML: (Validity) Invalid DTD (expecting name of the document)" match-string-no-properties 0 nil "PUBLIC\\s-+" re-search-forward "\\=\"\\([[:space:][:alnum:]-'()+,./:=?;!*#@$_%]*\\)\"" t "\\='\\([[:space:][:alnum:]-()+,./:=?;!*#@$_%]*\\)'" "XML: Missing Public ID" 1 "\\='\\([^']*\\)'" "\\=\"\\([^\"]*\\)\"" "XML: Missing System ID" public "SYSTEM\\s-+" system 62 91 "XML: Bad DTD" "\\s-*\\]" "XML: (Well-Formed) End of document while reading DTD" "<!ELEMENT\\s-+\\([[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\)\\s-+\\([^>]+\\)>" 2 string-match "\\`EMPTY\\s-*\\'" empty "\\`ANY\\s-*$" any "\\`(\\(.*\\))\\s-*\\'" xml-parse-elem-type "^%[^;]+;[ \n ]*\\'" "XML: (Validity) Invalid element type in the DTD" assoc "XML: (Validity) DTD element declarations must be unique (<%s>)" "<!ATTLIST[ \n ]*\\([[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\)[ \n ]*\\(\\(?:\\s-*[[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\s-*\\(?:CDATA\\|\\(?:ID\\|IDREF\\|IDREFS\\|ENTITY\\|ENTITIES\\|NMTOKEN\\|NMTOKENS\\)\\|\\(?:NOTATION\\s-+(\\s-*[[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\(?:\\s-*|\\s-*[[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\)*\\s-*)\\)\\|\\(?:\\(?:NOTATION\\s-+(\\s-*[[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\(?:\\s-*|\\s-*[[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\)*\\s-*)\\)\\|\\(?:(\\s-*[-0-9.[:word:]:_·̀-ͯ‿-⁀]+\\(?:\\s-*|\\s-*[-0-9.[:word:]:_·̀-ͯ‿-⁀]+\\)*\\s-+)\\)\\)\\)\\s-*\\(?:#REQUIRED\\|#IMPLIED\\|\\(?:#FIXED\\s-+\\)*\\(?:\"\\(?:[^&\"]\\|\\(?:&[[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^&']\\|\\(?:&[[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)\\)\\)\\)*[ \n ]*>" "<!--" search-forward "-->" "<!ENTITY[ \n ]+\\(%[ \n ]+\\)?\\([[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\)[ \n ]*\\(\\(?:\"\\(?:[^%&\"]\\|%\\([[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\);\\|\\(?:&[[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^%&']\\|%\\([[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\);\\|\\(?:&[[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)\\)[ \n ]*>" match-string xml-entity-alist xml--entity-replacement-text 3 -1 "<!ENTITY[ \n ]+\\(%[ \n ]+\\)?\\([[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\)[ \n ]+SYSTEM[ \n ]+\\(\"[^\"]*\"\\|'[^']*'\\)[ \n ]*>" "<!ENTITY[ \n ]+\\(%[ \n ]+\\)?\\([[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\)[ \n ]+PUBLIC[ \n ]+\"[- \na-zA-Z0-9'()+,./:=?;!*#@$_%]*\"\\|'[- \na-zA-Z0-9()+,./:=?;!*#@$_%]*'[ \n ]+\\(\"[^\"]*\"\\|'[^']*'\\)[ \n ]*>" "XML: Internal error" point-marker replace-match "XML: (Validity) Invalid DTD item" "^]" xml-pe-reference-re end-pos type element name alist value entity beg elt "\\s-*]>"] 5 (#$ . 16024)]) #@158 Return the replacement text for the entity value STRING. The replacement text is obtained by replacing character references and parameter-entity references. (defalias 'xml--entity-replacement-text #[(string) "\306\307\310 \n\"\203\205 \n\311\211\224OB\n\311\225\307O\307\211\312\313\n\"\211\203: \314\315\316\f!\"\211\203 \302!B\202 \312\317\n\"\211\203X \314\315\316\f\320\"\"\211\203 \302!B\202 \312\321\n\"\211\203 \322\f\"\211\204u \203u \323\324\f\"\210A\206| B +\202 \325\326\nB\237\327#*\207" [children ref-re string val ref remainder "\\(?:&#\\([0-9]+\\)\\|&#x\\([0-9a-fA-F]+\\)\\|%\\([[:word:]:_][-0-9.[:word:]:_·̀-ͯ‿-⁀]*\\)\\);" nil string-match 0 match-string 1 decode-char ucs string-to-number 2 16 3 assoc error "XML: (Validity) Undefined parameter entity `%s'" mapconcat identity "" xml-parameter-entity-alist xml-validating-parser xml-undefined-entity] 6 (#$ . 20645)]) #@52 Convert element type STRING into a Lisp structure. (defalias 'xml-parse-elem-type #[(string) "\303\211\304\305\n\"\203= \306\307\n\"\306\310\n\"\304\311 \"\203) \312\313\314\315 \311\"\"B\202N \304\316 \"\203N \317\313\314\315 \316\"\"B\202N \304\320\n\"\203N \306\307\n\"\306\310\n\" ;\203[ \321\230\203[ \322\323\230\203g \324 D\202\200 \325\230\203s \326 D\202\200 \327\230\203 \330 D\202\200 *\207" [modifier elem string nil string-match "(\\([^)]+\\))\\([+*?]?\\)" match-string-no-properties 1 2 "|" choice mapcar xml-parse-elem-type split-string "," seq "[ \n ]*\\([^+*?]+\\)\\([+*?]?\\)" "#PCDATA" pcdata "+" + "*" * "?" \?] 6 (#$ . 21579)]) #@122 Return STRING, after substituting entity and character references. STRING is assumed to occur in an XML attribute value. (defalias 'xml-substitute-special #[(string) "G\306\307\"\203\234 \310\211\224O B\310\225\306O\311\312\"\311\313\"\211\203] \314\315\316 \2053 \317\"\"\211\203B \300!\202Q \203O \320\321\"\202Q B\f\211G)\202\230 \311\322\"\323\"A\206| \203z \320\324\"\202| \211\fP)\203\230 G\n\\V\203\230 \320\325\"\210+\202 \326\327 B\237\330#*\207" [string children strlen xml-entity-or-char-ref-re remainder is-hex nil string-match 0 match-string 1 2 decode-char ucs string-to-number 16 error "XML: (Validity) Undefined character `x%s'" 3 assoc "XML: (Validity) Undefined entity `%s'" "XML: Passed `xml-entity-expansion-limit' while expanding `&%s;'" mapconcat identity "" ref val xml-validating-parser xml-undefined-entity xml-entity-alist xml-entity-expansion-limit] 6 (#$ . 22251)]) #@206 Substitute SGML numeric entities by their respective utf characters. This function replaces numeric entities in the input STRING and returns the modified string. For example "*" gets replaced by "*". (defalias 'xml-substitute-numeric-entities #[(string) "\205! ;\205! \302\303\304 #\203 \305\306\307\217\210\302\224T\202 )\207" [string start 0 string-match "&#\\([0-9]+\\);" nil (byte-code "\301\300\302\303\224\303\225O!!\304\211$\304\207" [string replace-match read 1 nil] 6) ((error))] 4 (#$ . 23207)]) #@138 Outputs the XML in the current buffer. XML can be a tree or a list of nodes. The first line is indented with the optional INDENT-STRING. (defalias 'xml-debug-print #[(xml &optional indent-string) "\206 \304 \305\211\205 @\306\n\"\210A\211\204 \305*\207" [indent-string xml node --dolist-tail-- "" nil xml-debug-print-internal] 4 (#$ . 23736)]) (defalias 'xml-print 'xml-debug-print) #@404 Convert STRING into a string containing valid XML character data. Replace occurrences of &<>'" in STRING with their default XML entity references (e.g. replace each & with &). XML character data must not contain & or < characters, nor the > character under some circumstances. The XML spec does not impose restriction on " or ', but we just substitute for these too (as is permitted by the spec). (defalias 'xml-escape-string #[(string) "\304\305!rq\210\306\216 c\210\307\310\211\2036 @eb\210\311\n@\310\312#\203/ \313\nA\312\211\310$\210\202 A\211\204 *\314 +\207" [#1=#:temp-buffer string substitution --dolist-tail-- generate-new-buffer " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) (("&" . "&") ("<" . "<") (">" . ">") ("'" . "'") ("\"" . """)) nil search-forward t replace-match buffer-string] 6 (#$ . 24138)]) #@92 Outputs the XML tree in the current buffer. The first line is indented with INDENT-STRING. (defalias 'xml-debug-print-internal #[(xml indent-string) "\306\307\310\n\211@)!\261\210\n\211A@)\211\2038 \311\310 \211@@)!\312\313 \211@A)!\314\261\210 A\211\204 \n\211\211AA*\211\204L \315\316\261\202\245 \316c\210\n\306\211\203\210 @\211<\203n \317c\210\320\f\321P\"\210\202 \f;\203{ \313\f!c\210\202 \322\323!\210A\211\204X *\nA\204\224 \n@;\204\231 \317\261\210\307\315\310\211@)!\316\261*\207" [xml attlist tree indent-string node x nil 60 symbol-name 32 "=\"" xml-escape-string 34 47 62 10 xml-debug-print-internal " " error "Invalid XML tree" --dolist-tail--] 6 (#$ . 25040)]) (provide 'xml)