;ELC ;;; Compiled ;;; in Emacs version 27.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar xmltok-type nil) (defvar xmltok-start nil) (defvar xmltok-name-colon nil) (defvar xmltok-name-end nil) #@68 String containing replacement for a character or entity reference. (defvar xmltok-replacement nil (#$ . 519)) #@377 List containing attributes of last scanned element. Each member of the list is a vector representing an attribute, which can be accessed using the functions `xmltok-attribute-name-start', `xmltok-attribute-name-colon', `xmltok-attribute-name-end', `xmltok-attribute-value-start', `xmltok-attribute-value-end', `xmltok-attribute-raw-normalized-value', `xmltok-attribute-refs'. (defvar xmltok-attributes nil (#$ . 636)) #@110 List containing namespace declarations of last scanned element. List has same format as `xmltok-attributes'. (defvar xmltok-namespace-attributes nil (#$ . 1061)) #@1219 Information about the DTD used by `xmltok-forward'. `xmltok-forward-prolog' sets this up. It consists of an alist of general entity names vs definitions. The first member of the alist is t if references to entities not in the alist are well-formed (e.g. because there's an external subset that wasn't parsed). Each general entity name is a string. The definition is either nil, a symbol, a string, a cons cell. If the definition is nil, then it means that it's an internal entity but the result of parsing it is unknown. If it is a symbol, then the symbol is either `unparsed', meaning the entity is an unparsed entity, `external', meaning the entity is or references an external entity, `element', meaning the entity includes one or more elements, or `not-well-formed', meaning the replacement text is not well-formed. If the definition is a string, then the replacement text of the entity is that string; this happens only during the parsing of the prolog. If the definition is a cons cell (ER . AR), then ER specifies the string that results from referencing the entity in element content and AR is either nil, meaning the replacement text included a <, or a string which is the normalized attribute value. (defvar xmltok-dtd nil (#$ . 1231)) #@375 List of errors detected by `xmltok-forward' and `xmltok-forward-prolog'. When `xmltok-forward' and `xmltok-forward-prolog' detect a well-formedness error, they will add an entry to the beginning of this list. Each entry is a vector [MESSAGE START END], where MESSAGE is a string giving the error message and START and END are integers indicating the position of the error. (defvar xmltok-errors nil (#$ . 2492)) #@19 (fn &rest BODY) (defalias 'xmltok-save '(macro . #[128 "\300\301BB\207" [let (xmltok-type xmltok-start xmltok-name-colon xmltok-name-end xmltok-replacement xmltok-attributes xmltok-namespace-attributes xmltok-errors)] 4 (#$ . 2911)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put xmltok-save lisp-indent-function 0 put edebug-form-spec t] 5) #@12 (fn ATT) (defalias 'xmltok-attribute-name-start #[257 "\211\300H\207" [0] 3 (#$ . 3283)]) (put 'xmltok-attribute-name-start 'byte-optimizer 'byte-compile-inline-expand) #@12 (fn ATT) (defalias 'xmltok-attribute-name-colon #[257 "\211\300H\207" [1] 3 (#$ . 3460)]) (put 'xmltok-attribute-name-colon 'byte-optimizer 'byte-compile-inline-expand) #@12 (fn ATT) (defalias 'xmltok-attribute-name-end #[257 "\211\300H\207" [2] 3 (#$ . 3637)]) (put 'xmltok-attribute-name-end 'byte-optimizer 'byte-compile-inline-expand) #@12 (fn ATT) (defalias 'xmltok-attribute-value-start #[257 "\211\300H\207" [3] 3 (#$ . 3810)]) (put 'xmltok-attribute-value-start 'byte-optimizer 'byte-compile-inline-expand) #@12 (fn ATT) (defalias 'xmltok-attribute-value-end #[257 "\211\300H\207" [4] 3 (#$ . 3989)]) (put 'xmltok-attribute-value-end 'byte-optimizer 'byte-compile-inline-expand) #@262 Return an object representing the normalized value of ATT. This can be t indicating that the normalized value is the same as the buffer substring from the start to the end of the value, or nil indicating that the value is not well-formed or a string. (fn ATT) (defalias 'xmltok-attribute-raw-normalized-value #[257 "\211\300H\207" [5] 3 (#$ . 4165)]) (put 'xmltok-attribute-raw-normalized-value 'byte-optimizer 'byte-compile-inline-expand) #@287 Return a list of the entity and character references in ATT. Each member is a vector [TYPE START END] where TYPE is either char-ref or entity-ref and START and END are integers giving the start and end of the reference. Nested entity references are not included in the list. (fn ATT) (defalias 'xmltok-attribute-refs #[257 "\211\300H\207" [6] 3 (#$ . 4613)]) (put 'xmltok-attribute-refs 'byte-optimizer 'byte-compile-inline-expand) #@12 (fn ATT) (defalias 'xmltok-attribute-prefix #[257 "\211\211\300H\262\211\205\301\211\302H\262\"\207" [1 buffer-substring-no-properties 0] 6 (#$ . 5053)]) #@12 (fn ATT) (defalias 'xmltok-attribute-local-name #[257 "\211\211\300H\262\301\203T\202\211\302H\262\211\303H\262\"\207" [1 buffer-substring-no-properties 0 2] 7 (#$ . 5221)]) #@12 (fn ATT) (defalias 'xmltok-attribute-value #[257 "\211\211\300H\262\211\205!\211;\203\211\202!\301\211\302H\262\211\303H\262\"\207" [5 buffer-substring-no-properties 3 4] 7 (#$ . 5414)]) (defalias 'xmltok-start-tag-prefix #[0 "\205 \302 T\"\207" [xmltok-name-colon xmltok-start buffer-substring-no-properties] 3]) (defalias 'xmltok-start-tag-local-name #[0 "\303\206 T\n\"\207" [xmltok-name-colon xmltok-start xmltok-name-end buffer-substring-no-properties] 3]) (defalias 'xmltok-end-tag-prefix #[0 "\205\n\302\303 \\\"\207" [xmltok-name-colon xmltok-start buffer-substring-no-properties 2] 3]) (defalias 'xmltok-end-tag-local-name #[0 "\303\203\nT\202 \304 \\\n\"\207" [xmltok-name-colon xmltok-start xmltok-name-end buffer-substring-no-properties 2] 3]) (defalias 'xmltok-start-tag-qname #[0 "\302T \"\207" [xmltok-start xmltok-name-end buffer-substring-no-properties] 3]) (defalias 'xmltok-end-tag-qname #[0 "\302\303\\ \"\207" [xmltok-start xmltok-name-end buffer-substring-no-properties 2] 3]) #@283 Make an attribute. RAW-NORMALIZED-VALUE is nil if the value is not well-formed, t if the normalized value is the string between VALUE-BEGIN and VALUE-END, otherwise a STRING giving the value. (fn NAME-BEGIN NAME-COLON NAME-END &optional VALUE-BEGIN VALUE-END RAW-NORMALIZED-VALUE) (defalias 'xmltok-make-attribute #[1539 "\300\301&\207" [vector nil] 14 (#$ . 6446)]) (put 'xmltok-make-attribute 'byte-optimizer 'byte-compile-inline-expand) #@12 (fn ERR) (defalias 'xmltok-error-message #[257 "\211\300H\207" [0] 3 (#$ . 6906)]) (put 'xmltok-error-message 'byte-optimizer 'byte-compile-inline-expand) #@12 (fn ERR) (defalias 'xmltok-error-start #[257 "\211\300H\207" [1] 3 (#$ . 7069)]) (put 'xmltok-error-start 'byte-optimizer 'byte-compile-inline-expand) #@12 (fn ERR) (defalias 'xmltok-error-end #[257 "\211\300H\207" [2] 3 (#$ . 7228)]) (put 'xmltok-error-end 'byte-optimizer 'byte-compile-inline-expand) #@26 (fn MESSAGE START END) (defalias 'xmltok-make-error #[771 "\300#\207" [vector] 7 (#$ . 7383)]) (put 'xmltok-make-error 'byte-optimizer 'byte-compile-inline-expand) #@36 (fn MESSAGE &optional START END) (defalias 'xmltok-add-error #[769 "\206\206 `\302#\266\203 B\211\207" [xmltok-start xmltok-errors vector] 10 (#$ . 7558)]) (defalias 'xmltok-forward #[0 "`\303\304\303w\303f\211\305\267\2028\306V\203\307\211\202\216\310u\210\311 \202\216\306V\203/\307\211\202\216\310u\210\312\313!\202\216\314\315\303\316#\203v\310\224\204O\306\224b\210\317\211\202\216\310\224U\203`\320\321!\210\322\211\202\216\306\224b\210`\\U\203p\307\202q\317\211\202\216\211\303=\203\210\306V\205\203\307\211\202\216db\210\317\211)\207" [xmltok-start case-fold-search xmltok-type nil " \n" #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (60 15 38 35)) 0 space 1 xmltok-scan-after-lt xmltok-scan-after-amp xmltok-handle-entity re-search-forward "[<&]\\|\\(]]>\\)" t data xmltok-add-error "Found `]]>' not closing a CDATA section" not-well-formed] 6]) (defconst xmltok-ncname-regexp "\\(?:[_[:alpha:]][-._[:alnum:]]*\\)") (defalias 'xmltok-scan-after-lt #[0 "\306\307!\204\310\311!\210\312\211\207\313\225b\210\314\224\203%\315\225\316\224\317\211\320\211\207\321\224\2034\322\225\323\224\324\211\207\325\224\203H\315\225\316\224\317\211\326 \210\207\327\224\203[\315\225\316\224\317\211\330\211\207\331\224\203j\332\333\317\334#\210\335\211\207\336\224\203r\337 \207\340\224\203z\341 \207\342\224\203\223\315\225\316\224\317\211\310\343`S\"\210\344\211\207\315\224\203\255\310\345\317 T#\210\315\225\316\224\317\211\346\211\207\322\224\203\333\322\225\323\224\211\204\320\317f\347=\203\320`Tb\210\310\350`S\"\210\202\327\310\345\317 T#\210\351\211\207\352\224\203\354\310\353!\210\317\211\351\211\207\354\224\203\375\310\355 \314 \\#\210\312\211\207\356\224\203\310\357 \314 \\#\210\312\211\207\360\224\203\310\361 \316 \\#\210\312\211\207\310\362!\210\312\211\207" [xmltok-type xmltok-name-end xmltok-name-colon xmltok-attributes xmltok-namespace-attributes xmltok-start looking-at "\\([_[:alpha:]][-._[:alnum:]]*\\(:[_[:alpha:]][-._[:alnum:]]*\\)?\\)\\(?:\\([ \n]*>\\)\\|\\(?:\\([ \n]*/\\)\\(>\\)?\\)\\|\\([ \n]+\\)\\)?\\|\\(/\\)\\(?:\\([_[:alpha:]][-._[:alnum:]]*\\(:[_[:alpha:]][-._[:alnum:]]*\\)?\\)\\([ \n]*>\\)?\\)?\\|!\\(\\[\\)\\(?:C\\(?:D\\(?:A\\(?:T\\(?:A\\(\\[\\)?\\)?\\)?\\)?\\)?\\)?\\|\\(!\\)\\(-\\(-\\)?\\)?\\|\\(\\?\\)" xmltok-add-error "`<' that is not markup must be entered as `<'" not-well-formed 0 3 1 2 nil start-tag 10 8 9 end-tag 6 xmltok-scan-attributes 5 empty-element 12 search-forward "]]>" move cdata-section 16 xmltok-scan-after-processing-instruction-open 15 xmltok-scan-after-comment-open 4 "Expected `/>'" partial-empty-element "Missing `>'" partial-start-tag 58 "Expected name following `:'" partial-end-tag 7 "Expected name following `\204D `\310ZU\204D\314\320 \211T#\210\202e \321\\U\203e\212\310\\b\210\322\311\323!*\203e\314\324\310\\\321\\#\210\325\211\207" [xmltok-start xmltok-name-end case-fold-search xmltok-type search-forward "?>" nil move 2 looking-at "\\(?:[_[:alpha:]][-._[:alnum:]]*\\)" 0 xmltok-add-error "\\)?" nil move 1 xmltok-add-error "`--' not followed by `>'" 0 comment] 4]) (defalias 'xmltok-scan-attributes #[0 "\304\211\305\306!\204\"\305\307!\203\226\204\"\310\311`\212\312\224b\210\313\304x\210`)#\210\304\262\314\225b\210\315 \211\2034\211B\262\210\316\224\204\317\224\203D\320\202\340\321\224\203N\322\202\340\323\224\203^\324\310\325`S\"\210\202\340\305\326!\203t\314\225b\210\310\327`S\"\210\330\262\202\305\331!\203\212\312\225b\210\310\332\312\224\"\210\330\262\202\310\333`S\"\210\330\262\202\305\334!\203\263`\314\225b\210\204\255\310\335`\336Z#\210\210\322\202\340\305\337!\203\317`\314\225b\210\204\311\310\340`S#\210\210\320\202\340\203\327\341\304w\210\310\342 \211T#\210\343\211\203\360\344@!\210\211A\262\202\340\266\n\237 \237\211\207" [xmltok-type xmltok-start xmltok-attributes xmltok-namespace-attributes nil looking-at "\\(\\(?:\\(xmlns\\)\\|[_[:alpha:]][-._[:alnum:]]*\\)\\(:[_[:alpha:]][-._[:alnum:]]*\\)?\\)[ \n]*=\\(?:[ \n]*\\('[^<'& \n ]*\\([& \n ][^<']*\\)?'\\|\"[^<\"& \n ]*\\([& \n ][^<\"]*\\)?\"\\)\\(?:\\([ \n]*>\\)\\|\\(?:\\([ \n]*/\\)\\(>\\)?\\)\\|\\([ \n]+\\)\\)\\)?" "[^<>\n]+?\\(\\(?:\\(xmlns\\)\\|[_[:alpha:]][-._[:alnum:]]*\\)\\(:[_[:alpha:]][-._[:alnum:]]*\\)?\\)[ \n]*=\\(?:[ \n]*\\('[^<'& \n ]*\\([& \n ][^<']*\\)?'\\|\"[^<\"& \n ]*\\([& \n ][^<\"]*\\)?\"\\)\\(?:\\([ \n]*>\\)\\|\\(?:\\([ \n]*/\\)\\(>\\)?\\)\\|\\([ \n]+\\)\\)\\)?" xmltok-add-error "Malformed attribute" 1 " \n " 0 xmltok-add-attribute 10 7 start-tag 9 empty-element 8 partial-empty-element "Expected `/>'" "[ \n]*[\"']" "Missing closing delimiter" t "[ ]*\\([^ \n\"'=<>/]+\\)[ \n/>]" "Attribute value not quoted" "Missing attribute value" "[^<>\n]*/>" "Malformed empty-element" 2 "[^<>\n]*>" "Malformed start-tag" "^<>\n" "Missing `>'" partial-start-tag xmltok-normalize-attribute] 8]) #@62 Return the attribute if it needs normalizing, otherwise nil. (defalias 'xmltok-add-attribute #[0 "\302\303\224\2032\304\224\206 \305\224\262\306\224\307\224\306\225\303\224T\303\225S?\310\302&\266\206\202M\306\224\307\224\306\225\302\211\211\310\302&\266\206\311\224\203Y\211B\202]\211 B\205b\211\207" [xmltok-namespace-attributes xmltok-attributes nil 4 5 6 1 3 vector 2] 15 (#$ . 13210)]) #@12 (fn ATT) (defalias 'xmltok-normalize-attribute #[257 "\211\211\303H\262\304\305\211\212\211\306H\262b\210\307w\211\310V\203%\311`Z`\"B\262\210`W\203v`Tb\210`Sf\312=\203q`S\305\211\313\314!\210 \315=\204O \316=\203j\317 \n`#B\262\203dB\262\202m\305\262\202m\305\262+\202v\320B\262`W\204)\203\212\321\322\323\237\"I\210\324\237I\207" [xmltok-replacement xmltok-type xmltok-start 4 t nil 3 "^ \n&" 0 buffer-substring-no-properties 38 xmltok-scan-after-amp #[514 "\300\301#\207" [xmltok-handle-entity t] 6 "\n\n(fn START END)"] char-ref entity-ref vector " " 5 apply concat 6] 10 (#$ . 13645)]) #@23 (fn ENTITY-HANDLER) (defalias 'xmltok-scan-after-amp #[257 "\301\302!\204\303\304!\210\305\211\207\306\225b\210\307\224\203\"\211\310\224\310\225\"\210\311\211\207\312\224\203/\313\314\224\314\225\315#\207\316\224\203<\313\317\224\317\225\320#\207\321\224\203I\303\322!\210\305\211\207\303\323!\210\305\211\207" [xmltok-type looking-at "\\([_[:alpha:]][-._[:alnum:]]*\\)\\(;\\)?\\|\\(#\\)\\(?:\\([0-9]+\\)\\(;\\)?\\|x\\(?:\\([[:xdigit:]]+\\)\\(;\\)?\\)?\\)?" xmltok-add-error "`&' that is not markup must be entered as `&'" not-well-formed 0 2 1 entity-ref 5 xmltok-scan-char-ref 4 10 7 6 16 3 "Missing character number" "Missing closing `;'"] 5 (#$ . 14286)]) (defconst xmltok-entity-error-messages '((unparsed . "Referenced entity is unparsed") (not-well-formed . "Referenced entity is not well-formed") (external nil . "Referenced entity is external") (element nil . "Referenced entity contains <"))) #@39 (fn START END &optional ATTRIBUTEP) (defalias 'xmltok-handle-entity #[770 "\303\"\304\"\211A\211:\205\203\211A\202\211@\211\206k\2045@\305=?\205k\306\307#\202k\203H\211:\203H\306\310#\202k\211\n\236A\211:\203^\203Z\211A\202\\\211@\262\211\205i\306#\262\207" [xmltok-dtd xmltok-replacement xmltok-entity-error-messages buffer-substring-no-properties assoc t xmltok-add-error "Referenced entity has not been defined" "Referenced entity contains <"] 11 (#$ . 15212)]) #@23 (fn START END BASE) (defalias 'xmltok-scan-char-ref #[771 "\302\303\"\"\211\250\203!\304!\203!\305!\262\211\205(\306!\202(\307\310#\210\311\262\312\211\207" [xmltok-replacement xmltok-type string-to-number buffer-substring-no-properties xmltok-valid-char-p xmltok-unicode-to-char string xmltok-add-error "Invalid character code" nil char-ref] 8 (#$ . 15727)]) #@18 (fn START END) (defalias 'xmltok-char-number #[514 "\300\\f\301=\203 \302\202\303\304\305\302U\203\306\202\300\\S\"\"\211\250\205.\307!\205.\211\207" [2 120 16 10 string-to-number buffer-substring-no-properties 3 xmltok-valid-char-p] 8 (#$ . 16111)]) #@75 Return non-nil if N is the Unicode code of a valid XML character. (fn N) (defalias 'xmltok-valid-char-p #[257 "\211\300W\203\n\211\301>\207\211\302W\203\303\207\211\304W\203\305\207\211\306W\203\"\303\207\211\307V\205+\211\310W\207" [32 (10 13 9) 55296 t 57344 nil 65534 65535 1114112] 3 (#$ . 16385)]) #@107 Return the character corresponding to Unicode scalar value N. Return nil if unsupported in Emacs. (fn N) (defalias 'xmltok-unicode-to-char #[257 "\300\301\"\207" [decode-char ucs] 4 (#$ . 16703)]) (defvar xmltok-contains-doctype nil) (defvar xmltok-doctype-external-subset-flag nil) (defvar xmltok-internal-subset-start nil) (defvar xmltok-had-param-entity-ref nil) (defvar xmltok-prolog-regions nil) #@70 Non-nil if there was an XML declaration specifying standalone="yes". (defvar xmltok-standalone nil (#$ . 17112)) (defvar xmltok-markup-declaration-doctype-flag nil) (defconst xmltok-predefined-entity-alist '(("lt" "<" . "<") ("gt" ">" . ">") ("amp" "&" . "&") ("apos" "'" . "'") ("quot" "\"" . "\""))) #@545 Move forward to the end of the XML prolog. Returns a list of vectors [TYPE START END] where TYPE is a symbol and START and END are integers giving the start and end of the region of that type. TYPE can be one of xml-declaration, xml-declaration-attribute-name, xml-declaration-attribute-value, comment, processing-instruction-left, processing-instruction-right, markup-declaration-open, markup-declaration-close, internal-subset-open, internal-subset-close, hash-name, keyword, literal, encoding-name. Adds to `xmltok-errors' as appropriate. (defalias 'xmltok-forward-prolog #[0 "\306\211\211\211\211\211\211\211\211\211\307 \210\310 \210\31111\312 \205-\310 0\2024\210\313 \204\"\f\203B\314\315\fS\f#\210\316 \210\237.\n\207" [xmltok-markup-declaration-doctype-flag xmltok-doctype-external-subset-flag xmltok-standalone xmltok-had-param-entity-ref xmltok-internal-subset-start xmltok-contains-doctype nil xmltok-scan-xml-declaration xmltok-next-prolog-token (xmltok-markup-declaration-parse-error) xmltok-parse-prolog-item xmltok-skip-markup-declaration xmltok-add-error "No closing ]" xmltok-parse-entities xmltok-prolog-regions xmltok-type xmltok-start case-fold-search xmltok-predefined-entity-alist xmltok-dtd] 10 (#$ . 17421)]) (defconst xmltok-bad-xml-decl-regexp "[ \n]*<\\?xml\\(?:[ \n]\\|\\?>\\)") #@587 Return the position of the encoding in the XML declaration at point. If there is a well-formed XML declaration starting at point and it contains an encoding declaration, then return (START . END) where START and END are the positions of the start and the end of the encoding name; if there is no encoding declaration return the position where and encoding declaration could be inserted. If there is XML that is not well-formed that looks like an XML declaration, return nil. Otherwise, return t. If LIMIT is non-nil, then do not consider characters beyond LIMIT. (fn &optional LIMIT) (defalias 'xmltok-get-declared-encoding-position #[256 "\302\303\304!\205\211?\206\305\225X)\203-\306\225\211\203$\306\224TSB\202,\307\225\206,`\310\\\207\311\303 !)?\207" [case-fold-search xmltok-bad-xml-decl-regexp nil looking-at "<\\?xml\\(?:[ \n]+\\(version\\)[ \n]*=[ \n]*\\(\\(?:\"[-._:a-zA-Z0-9]+\"\\|'[-._:a-zA-Z0-9]+'\\)\\)\\)?\\(?:[ \n]+\\(encoding\\)[ \n]*=[ \n]*\\(\\(?:\"[-._:a-zA-Z0-9]+\"\\|'[-._:a-zA-Z0-9]+'\\)\\)\\)?\\(?:[ \n]+\\(standalone\\)[ \n]*=[ \n]*\\(\"\\(?:yes\\|no\\)\"\\|'\\(?:yes\\|no\\)'\\)\\)?[ \n]*\\?>" 0 4 2 5 t] 4 (#$ . 18767)]) (defalias 'xmltok-scan-xml-declaration #[0 "\301\302!\205l\303\304`\305\225#\210\305\225b\210\306\224\203)\303\307\306\224\306\225#\210\310\224\310\225\303\311#\266\312\224\203I\303\307\312\224\312\225#\210\313\224\313\225\303\314TS#\210\303\311#\266\315\224\203k\303\307\315\224\315\225#\210\316\224\316\225\303\311#\210\317TS\"\320\230\266\321\207" [xmltok-standalone looking-at "<\\?xml\\(?:[ \n]+\\(version\\)[ \n]*=[ \n]*\\(\\(?:\"[-._:a-zA-Z0-9]+\"\\|'[-._:a-zA-Z0-9]+'\\)\\)\\)?\\(?:[ \n]+\\(encoding\\)[ \n]*=[ \n]*\\(\\(?:\"[-._:a-zA-Z0-9]+\"\\|'[-._:a-zA-Z0-9]+'\\)\\)\\)?\\(?:[ \n]+\\(standalone\\)[ \n]*=[ \n]*\\(\"\\(?:yes\\|no\\)\"\\|'\\(?:yes\\|no\\)'\\)\\)?[ \n]*\\?>" xmltok-add-prolog-region xml-declaration 0 1 xml-declaration-attribute-name 2 xml-declaration-attribute-value 3 4 encoding-name 5 6 buffer-substring-no-properties "yes" t] 6]) (defconst xmltok-markup-declaration-alist '(("ELEMENT" . xmltok-parse-element-declaration) ("ATTLIST" . xmltok-parse-attlist-declaration) ("ENTITY" . xmltok-parse-entity-declaration) ("NOTATION" . xmltok-parse-notation-declaration))) (defalias 'xmltok-parse-prolog-item #[0 "\306\267\202R\307\310 `#\210\311\207\311\207\312\307\313 `#\210\314 \315\\`\"\316 \"A\211\2035\f\204/\317\320!\210\211 \210\202N\321\230\203A\322 \210\202N\317\323 \315\\\"\210\324 \210\325 \210\266\311\207\326=\204\\\204^\312\207\327\267\202\220\307\330 \211T#\210\307\331`S`#\210\f\203{\312\202\317\332!\210\311\207\f\203\212\311\202\216\317\333!\210\311\207\f\204\256@\211?\206\244\211\211\315H\262 X\262\203\254 b\210\312\207\334=\203\266\311\207\317\335!\210\311\207" [xmltok-type xmltok-start xmltok-markup-declaration-doctype-flag xmltok-markup-declaration-alist xmltok-internal-subset-start xmltok-had-param-entity-ref #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (comment 6 processing-instruction 14 named-markup-declaration 16)) xmltok-add-prolog-region comment t nil markup-declaration-open buffer-substring-no-properties 2 assoc xmltok-add-error "Declaration allowed only in internal subset" "DOCTYPE" xmltok-parse-doctype "Unknown markup declaration" xmltok-next-prolog-token xmltok-markup-declaration-parse-error end-prolog #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (internal-subset-close 100 param-entity-ref 129)) internal-subset-close markup-declaration-close "]> outside internal subset" "Parameter entity reference outside document type declaration" not-well-formed "Token allowed only inside markup declaration" xmltok-errors] 6]) (defalias 'xmltok-parse-doctype #[0 "\305\306 \210 \203\307\310!\210\311 \210\n\203\307\312!\210\311 \210\305\313\314\315\"\210\316\317\320\321\322$\210 \323\267\2025`\211\207\305\207\305\324 \210\313\321\322\"\210 \321=\205H`\211\207" [xmltok-markup-declaration-doctype-flag xmltok-internal-subset-start xmltok-contains-doctype xmltok-type xmltok-doctype-external-subset-flag t xmltok-next-prolog-token xmltok-add-error "DOCTYPE declaration not allowed in internal subset" xmltok-markup-declaration-parse-error "Duplicate DOCTYPE declaration" xmltok-require-token name prefixed-name xmltok-require-next-token "SYSTEM" "PUBLIC" 91 62 #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (91 47 62 51)) xmltok-parse-external-id] 5]) (defalias 'xmltok-parse-attlist-declaration #[0 "\301\302\303\"\210\301\304\303\302#\210\304=?\205O\301\305\306\307\310\311\312\313\314\315\316&\n\210\305=\203,\317 \210\202:\320 \316\230\203:\301\305!\210\317 \210\301\321\322\323\324$\210\320 \323\230\203\301\324!\210\202\207" [xmltok-type xmltok-require-next-token prefixed-name name 62 40 "CDATA" "ID" "IDREF" "IDREFS" "ENTITY" "ENTITIES" "NMTOKEN" "NMTOKENS" "NOTATION" xmltok-parse-nmtoken-group xmltok-current-token-string "#IMPLIED" "#REQUIRED" "#FIXED" literal] 11]) (defalias 'xmltok-parse-nmtoken-group #[0 "\301\302\303\304#\210\301\305\306\"\210\305=\205\202\207" [xmltok-type xmltok-require-next-token nmtoken prefixed-name name 124 41] 4]) (defalias 'xmltok-parse-element-declaration #[0 "\301\302\303\"\210\301\304\305\306#\210\306=\203;\301\307\302\303\310\306%\210\311=\2038\301\312\313\314#\210\312=\203;\301\302\303\"\210\301\314\312\"\210\202%\315 \210\301\316!\207" [xmltok-type xmltok-require-next-token name prefixed-name "EMPTY" "ANY" 40 "#PCDATA" name-occur hash-name 124 41 close-paren-star xmltok-parse-model-group 62] 6]) (defalias 'xmltok-parse-model-group #[0 "\301 \210\302\303\304\305\306\307%\210\310>\205*\311 \210\301 \210\302\305\306\307$\210=\205(\202\262\207" [xmltok-type xmltok-parse-model-group-member xmltok-require-next-token 124 44 41 close-paren-star close-paren-occur (44 124) xmltok-next-prolog-token] 6]) (defalias 'xmltok-parse-model-group-member #[0 "\301\302\303\304\305$\210\305=\205\306 \210\307 \207" [xmltok-type xmltok-require-token name prefixed-name name-occur 40 xmltok-next-prolog-token xmltok-parse-model-group] 5]) (defalias 'xmltok-parse-entity-declaration #[0 "\301\211\302\303\304\"\210\304=\203\305\262\302\303!\210\306 \262\302\307\310\311#\210\307=\2036\312 \204/\313\"\210\210\302\314!\202a\315 \210\203C\316\314!\202a\316\314\317\"\210\314=\203U\313\320\"\202a\302\303!\210\302\314!\210\313\321\"\207" [xmltok-type nil xmltok-require-next-token name 37 t xmltok-current-token-string literal "SYSTEM" "PUBLIC" xmltok-parse-entity-value xmltok-define-entity 62 xmltok-parse-external-id xmltok-require-token "NDATA" external unparsed] 6]) #@19 (fn NAME VALUE) (defalias 'xmltok-define-entity #[514 "\203 \205\303\n\"?\205B\nB\211\207" [xmltok-had-param-entity-ref xmltok-standalone xmltok-dtd assoc] 5 (#$ . 25583)]) (defalias 'xmltok-parse-entity-value #[0 "`S\303\304\211\212Tb\210`\262\305w\210`W\203[`Tb\210`Sf\306=\2030\307\310`S`#\210\304\262\202 `S\304\211\311\312!\210\n\313\267\202W\314\"B\262 B\262`\262\202W\304\262+\202 )\205k\315\316\314\"B\237\"\207" [xmltok-start xmltok-replacement xmltok-type t nil "^%&" 37 xmltok-add-error "Parameter entity references are not allowed in the internal subset" xmltok-scan-after-amp #[514 "\300\207" [nil] 3 "\n\n(fn START END)"] #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (char-ref 65 not-well-formed 84)) buffer-substring-no-properties apply concat] 9]) (defalias 'xmltok-parse-notation-declaration #[0 "\301\302!\210\301\303\304\"\210\305 \304\230\301\306!\210\211\203'\301\306\307\"\210\307=?\205*\301\307!\202*\301\307!\207" [xmltok-type xmltok-require-next-token name "SYSTEM" "PUBLIC" xmltok-current-token-string literal 62] 4]) (defalias 'xmltok-parse-external-id #[0 "\300\301\302\"\210\303 \302\230\304\305!\210\211\203\304\305!\210\210\306 \207" [xmltok-require-token "SYSTEM" "PUBLIC" xmltok-current-token-string xmltok-require-next-token literal xmltok-next-prolog-token] 3]) #@20 (fn &rest TYPES) (defalias 'xmltok-require-next-token #[128 "\300 \210\301\302\"\207" [xmltok-next-prolog-token apply xmltok-require-token] 4 (#$ . 26973)]) #@20 (fn &rest TYPES) (defalias 'xmltok-require-token #[128 "\211@@;\203\302 \230\202\211=\262\204\211A\211\262\204\211\2044\2031\303=\2041\304\305!\210\306 \210\307@!\211\205A\310 `#\207" [xmltok-type xmltok-start xmltok-current-token-string not-well-formed xmltok-add-error "Unexpected token" xmltok-markup-declaration-parse-error xmltok-prolog-region-type xmltok-add-prolog-region] 6 (#$ . 27139)]) (defalias 'xmltok-current-token-string #[0 "\301`\"\207" [xmltok-start buffer-substring-no-properties] 3]) (define-error 'xmltok-markup-declaration-parse-error "Syntax error in markup declaration") (defalias 'xmltok-markup-declaration-parse-error #[0 "\300\301\302\"\207" [signal xmltok-markup-declaration-parse-error nil] 3]) (defalias 'xmltok-skip-markup-declaration #[0 "\303=\203\f\304 \210\2024 \203\305=\203`\304 \210\2024\306>\2044\n\203.\307=\2044\304 \210\202\207" [xmltok-type xmltok-markup-declaration-doctype-flag xmltok-internal-subset-start 62 xmltok-next-prolog-token 91 (nil end-prolog named-markup-declaration comment processing-instruction) internal-subset-close] 2]) #@17 (fn REQUIRED) (defalias 'xmltok-prolog-region-type #[257 "\301\236A\206\211;\205\302=\205\303\207" [xmltok-type ((literal . literal) (62 . markup-declaration-close) (91 . internal-subset-open) (hash-name . hash-name)) name keyword] 3 (#$ . 28270)]) (defalias 'xmltok-next-prolog-token #[0 "\304\305w\210`\306\307!\203\310\225b\204*\305f\211\203&`Tb\210\311\312!\210\313\211\202)\305\211\207\314\224\2044\315\224\203>`S\316\224\317\211\207\316\224\203V`\316\224\306\320!\204R\311\321!\210\322\211\207\323\224\204`\324\224\203n\306\320!\204j\311\325!\210\326\211\207\327\224\203\205`\305\306\320!\204\201\311\321!\210\330\211\207\331\224\203\232`\306\332!\204\226\311\321!\210\333\211\207\334\224\203\242\335 \207\336\224\203\252\337 \207\340\224\203\263\341\211\207\342\224\203\277b\210\343\211\207\344\224\203\310\345\211\207\346\224\203\321\347\211\207\350\224\203\344\306\351!\204\340\311\352!\210\353\211\207\354\224\203\373`Sf\211\355>\203\367\356 \202\372\211\211\207\357\224\203-\360\224\203\f`S\361\211\207\362\224\203\311\363!\210`\361\211\207\306\364!\203%\365\211\207\311\366!\210\313\211\207\367\224\203@\306\320!\204<\311\325!\210\326\211\207\370\224\203I\371\211\207\372\224\203V\311\373!\210\313\211\207\374\224\203c\311\375!\210\313\211\207\376\224\203p\311\377!\210\313\211\207\201@\224\203\201\311\201A!\210\313\211\207\201B\201C\201D\310!\"\207" [xmltok-start xmltok-type xmltok-name-end xmltok-name-colon " \n" nil looking-at "\\(<\\(?:\\(!\\(?:\\(-\\(-\\)?\\)\\|\\([_[:alpha:]][-._[:alnum:]]*\\)\\)?\\)\\|\\(\\?\\)\\|\\([_[:alpha:]][-._[:alnum:]]*\\)\\)?\\)\\|\\([[|,(\"'>]\\)\\|\\()\\(?:\\([+?]\\)\\|\\(\\*\\)\\)?\\)\\|\\(%\\([_[:alpha:]][-._[:alnum:]]*\\(;\\)?\\)?\\)\\|\\([_[:alpha:]][-._[:alnum:]]*\\(?:\\(:\\(?:\\(?:[-.[:digit:]]\\|:\\)\\(?:[-._[:alnum:]]\\|:\\)*\\|[_[:alpha:]][-._[:alnum:]]*:\\(?:[-._[:alnum:]]\\|:\\)*\\)\\)\\|\\(?:\\(:[_[:alpha:]][-._[:alnum:]]*\\)\\([?+*]\\)?\\)\\|\\([?+*]\\)\\|\\(:\\)\\)?\\)\\|\\(\\(?:[-.[:digit:]]\\|:\\)\\(?:[-._[:alnum:]]\\|:\\)*\\)\\|\\(#\\([_[:alpha:]][-._[:alnum:]]*\\)\\)\\|\\(][ \n]*>\\)" 0 xmltok-add-error "Illegal char in prolog" not-well-formed 19 18 17 name-occur "[ \n>),|[%]" "Missing space after name" prefixed-name 16 20 "Missing space after name token" nmtoken 15 name 23 "[ \n>)|%]" hash-name 6 xmltok-scan-prolog-after-processing-instruction-open 4 xmltok-scan-after-comment-open 5 named-markup-declaration 7 end-prolog 11 close-paren-star 10 close-paren-occur 9 "[ \n>,|)]" "Missing space after )" 41 8 (34 39) xmltok-scan-prolog-literal 12 14 param-entity-ref 13 "Missing ;" "[ \n%]" 37 "Expected name after %" 21 24 internal-subset-close 22 "Expected name after #" 2 "Expected name or -- after []" nil search-forward t looking-at "[ \n>%[]" xmltok-add-error format "Missing space after %s" literal] 7]) (defalias 'xmltok-scan-prolog-after-processing-instruction-open #[0 "\303\304\305\306#\210`\212\307\\b\210\310\311!\205'\312\225f\313>\204$\312\225\307ZU\205'\314\312!)\211\2049\315\316\307\\\317\\#\210\202w\211G\317U\203w\320\321\322\")\203w\323U\203Y\315\324`#\210\202w\212b\210\310\325!)\203m\315\326`#\210\202w\315\327\307\\\330\\#\210\331\332\333\307\203\210G\202\211\312##\210\331\334\203\244\212\333G\307#b\210\335\305w\210`)\202\247\307\\`#\266\336\211\207" [xmltok-start case-fold-search xmltok-type search-forward "?>" nil move 2 looking-at "\\(?:[_[:alpha:]][-._[:alnum:]]*\\)" 0 (10 9 13 32) match-string-no-properties xmltok-add-error "Processing instruction does not start with a name" 3 t string-match "xml" 1 "Invalid XML declaration" "<\\?xml\\(?:[ \n]+\\(version\\)[ \n]*=[ \n]*\\(\\(?:\"[-._:a-zA-Z0-9]+\"\\|'[-._:a-zA-Z0-9]+'\\)\\)\\)?\\(?:[ \n]+\\(encoding\\)[ \n]*=[ \n]*\\(\\(?:\"[-._:a-zA-Z0-9]+\"\\|'[-._:a-zA-Z0-9]+'\\)\\)\\)?\\(?:[ \n]+\\(standalone\\)[ \n]*=[ \n]*\\(\"\\(?:yes\\|no\\)\"\\|'\\(?:yes\\|no\\)'\\)\\)?[ \n]*\\?>" "XML declaration not at beginning of file" "Processing instruction has target of xml" 5 xmltok-add-prolog-region processing-instruction-left + processing-instruction-right " \n" processing-instruction] 9]) (defalias 'xmltok-parse-entities #[0 " \204 \n\203 \204\304B\211\205!\305@!\210\211A\262\202\207" [xmltok-dtd xmltok-had-param-entity-ref xmltok-doctype-external-subset-flag xmltok-standalone t xmltok-parse-entity] 3]) #@17 (fn NAME-DEF) (defalias 'xmltok-parse-entity #[257 "\211A\301;\205>\302\303\"\203\211B\241\202>\304\241\210\305\306\307@\"!\262r\211q\210\310 \210c\210eb\210\311 \241\210)\312!)\207" [xmltok-dtd nil string-match "\\`[^&< \n]*\\'" not-well-formed get-buffer-create format " *Entity %s*" erase-buffer xmltok-parse-entity-replacement kill-buffer] 8 (#$ . 33071)]) (defalias 'xmltok-parse-entity-replacement #[0 "\306\211B`\307\310\311\312#\211\205`Sf\313\203\314\224\202d\"\315\211B\"\262\204-\311\202\307\316\267\202\274\317\262\311\202\307\311\211\211\211\211\211\211\211`S\320 \210\315\321\267\202t\322\202u\306\311B\202u\313\323\\`\324Z\"\311B\202u\317\"\262.\312\202\307`S\311\211\211\325\326!\210\327\267\202\264\315 \"\262\202\267\315 \203\251 \211B\202\256\205\256\317\"\262\202\267\317\262,\312\202\307\315\330\314!\331B\"\262\312\266\204\204\211\207" [xmltok-errors xmltok-namespace-attributes xmltok-attributes xmltok-replacement xmltok-name-end xmltok-name-colon "" re-search-forward "[<& \n]\\|]]>" nil t buffer-substring-no-properties 0 xmltok-append-entity-def #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (62 51 60 58 38 126)) not-well-formed xmltok-scan-after-lt #s(hash-table size 6 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (start-tag 92 end-tag 92 empty-element 92 comment 96 processing-instruction 96 cdata-section 102)) element 9 3 xmltok-scan-after-amp xmltok-handle-nested-entity #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (entity-ref 148 char-ref 157)) match-string-no-properties " " xmltok-start xmltok-type] 13]) #@18 (fn START END) (defalias 'xmltok-handle-nested-entity #[514 "\302\303\"\"\211A\211;\203\304!\210A\262\204&@\305=?\2051\306\2021\211\307=\2030\306\2021\211\211\207" [xmltok-dtd xmltok-replacement assoc buffer-substring-no-properties xmltok-parse-entity t not-well-formed unparsed] 6 (#$ . 34807)]) #@14 (fn D1 D2) (defalias 'xmltok-append-entity-def #[514 ":\203!\211:\203 @@PA\205A\205AAPB\207\207\211:\203(\207\300\211@=\204>\211@=\204>\211A\262\202)\211@\207" [(not-well-formed external element)] 5 (#$ . 35128)]) #@23 (fn TYPE START END) (defalias 'xmltok-add-prolog-region #[771 "\301#B\211\207" [xmltok-prolog-regions vector] 7 (#$ . 35371)]) #@248 Return a list merging `xmltok-attributes' and `xmltok-namespace-attributes'. The members of the merged list are in order of occurrence in the document. The list may share list structure with `xmltok-attributes' and `xmltok-namespace-attributes'. (defalias 'xmltok-merge-attributes #[0 "\204 \207 \204\f\207 \302\203C\203C@\211\303H\262@\211\303H\262W\2036@B\262A\262\202@B\262A\262\202\211\237\262\203S\211\244\262\202\\\203\\\211\244\262\207" [xmltok-namespace-attributes xmltok-attributes nil 0] 7 (#$ . 35512)]) (defalias 'xmltok-forward-test #[0 "\301 \203\n\302\303\"\207\302\304!\207" [xmltok-type xmltok-forward message "Scanned %s" "Scanned nothing"] 3 nil nil]) (defalias 'xmltok-next-prolog-token-test #[0 "\301 \203\302\303\250\203\304!\202\"\207\302\305!\207" [xmltok-type xmltok-next-prolog-token message "Scanned %s" string "Scanned end of file"] 4 nil nil]) (provide 'xmltok)