%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/nxml/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/nxml/nxml-parse.elc

;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; 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.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [require nxml-util xmltok nxml-enc nxml-ns] 2)
(defvar nxml-parse-file-name nil)
#@1621 Either nil or a function called by `nxml-parse-file' to perform validation.
The function will be called once for each start-tag or end-tag.  The
function is passed two arguments TEXT and START-TAG.  For a start-tag,
START-TAG is a list (NAME ATTRIBUTES) where NAME and ATTRIBUTES are in
the same form as returned by `nxml-parse-file'.  For an end-tag,
START-TAG is nil.  TEXT is a string containing the text immediately
preceding the tag, or nil if there was no such text.  An empty element
is treated as a start-tag followed by an end-tag.

For a start-tag, the namespace state will be the state after
processing the namespace declarations in the start-tag.  For an
end-tag, the namespace state will be the state before popping the
namespace declarations for the corresponding start-tag.

The function must return nil if no error is detected or a
cons (MESSAGE . LOCATION) where MESSAGE is a string containing
an error message and LOCATION indicates what caused the error
as follows:

- nil indicates the tag as whole caused it; this is always allowed;

- text indicates the text caused it; this is allowed only if
TEXT is non-nil;

- tag-close indicates the close of the tag caused it; this is
allowed only if START-TAG is non-nil;

- (attribute-name . N) indicates that the name of the Nth attribute
caused it; N counts from 0; this is allowed only if START-TAG is non-nil
and N must be less than the number of attributes;

- (attribute-value . N) indicates that the value of the Nth attribute
caused it; N counts from 0; this is allowed only if START-TAG is non-nil
and N must be less than the number of attributes.
(defvar nxml-validate-function nil (#$ . 557))
#@1572 Parse the XML document in FILE and return it as a list.
An XML element is represented as a list (NAME ATTRIBUTES . CHILDREN).
NAME is either a string, in the case where the name does not have a
namespace, or a cons (NAMESPACE . LOCAL-NAME), where NAMESPACE is a
symbol and LOCAL-NAME is a string, in the case where the name does
have a namespace.  NAMESPACE is a keyword whose name is `:URI', where
URI is the namespace name.  ATTRIBUTES is an alist of attributes where
each attribute has the form (NAME . VALUE), where NAME has the same
form as an element name, and VALUE is a string.  A namespace
declaration is represented as an attribute whose name is
(:http://www.w3.org/2000/xmlns/ . LOCAL-NAME).  CHILDREN is a list
containing strings and child elements; CHILDREN never contains two
consecutive strings and never contains an empty string.  Processing
instructions and comments are not represented.  The return value is a
list representing the document element.

If the XML document is not well-formed, an error having the condition
`nxml-file-parse-error' will be signaled; the error data will be a
list of the form (FILE POSITION MESSAGE), where POSITION is an
integer specifying the position where the error was detected, and
MESSAGE is a string describing the error.

The current contents of FILE will be parsed even if there is a
modified buffer currently visiting FILE.

If the variable `nxml-validate-function' is non-nil, it will be called
twice for each element, and any reported error will be signaled in the
same way as well-formedness error.

(fn FILE)
(defalias 'nxml-parse-file #[257 "r\301!q\210\302\216\211\303 +\207" [nxml-parse-file-name nxml-parse-find-file #[0 "\300\301!\207" [kill-buffer nil] 2] nxml-parse-instance] 3 (#$ . 2232)])
#@13 

(fn FILE)
(defalias 'nxml-parse-find-file #[257 "r\301\302!q\210\303 \210\304\305!\210)p)\207" [set-auto-coding-function get-buffer-create " *nXML Parse*" erase-buffer nxml-set-xml-coding insert-file-contents] 3 (#$ . 4001)])
(defalias 'nxml-parse-instance #[0 "\306\211\306\211\211\211\211\211\211\n\f\307 \210\310 \210
\311 .\n\207" [xmltok-dtd xmltok-errors xmltok-namespace-attributes xmltok-attributes xmltok-replacement xmltok-name-end nil xmltok-forward-prolog nxml-check-xmltok-errors nxml-parse-instance-1 xmltok-name-colon xmltok-start xmltok-type nxml-ns-initial-state nxml-ns-state] 9])
(defalias 'nxml-parse-instance-1 #[0 "\302\211B\211\302\211\211\211\303 \203\330\304 \210\305\267\202\203+\306\307\237\"\262\302B\241\210A\262\310=\204j\204A=\204A\311\302\312\"\210\313 B\262\314 \210\315 \316#\210\302\262\302B\241\210A\262B\262\317!\262\210\320=\204\251\321=\204\221@\322 \232\204\221\203\214\311\302\323@#\210\202\221\311\302\324\"\210\316\302#\210\302\262\325 \210A\262@\262A\262\302\262\202\203\303\211\204\272	\262\326 B\262\202\327=\204\311\302\330\331\236A#\210\202\202A\204\342\311d\332\"\210A@\207" [xmltok-type xmltok-start nil xmltok-forward nxml-check-xmltok-errors #s(hash-table size 8 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (start-tag 22 end-tag 22 empty-element 22 space 175 data 175 entity-ref 175 char-ref 175 cdata-section 175)) apply concat end-tag nxml-parse-error "Multiple top-level elements" xmltok-start-tag-qname nxml-ns-push-state nxml-parse-start-tag nxml-validate-tag last start-tag empty-element xmltok-end-tag-qname "Unbalanced end-tag; expected </%s>" "Extra end-tag" nxml-ns-pop-state nxml-current-text-string space "%s at top-level" ((data . "Text characters") (entity-ref . "Entity reference") (char-ref . "Character reference") (cdata-section . "CDATA section")) "Missing document element"] 11])
(defalias 'nxml-parse-start-tag #[0 "\304\211\211\211\211\211\211\211\211\262\203z@\262\305!\206!\306\304\307\"\262\310!\262\311!\2053\312!\262\235\203C\306\304\313\"\210\202_\204N\314!\210\202_\203Z\315\"\210\202_\306\304\316\"\210B\262\317	\312!\"BB\262A\262\202\f\317\320 \211\203\220\321!\206\222\306\nT\322#\202\222\323 \262\324 \"\262\262\203\371@\262\311!\211\205\277\321!\206\277\306\211\325H\262\322#\262\262\317\312!\"\326\"\203\335\306\211\325H\262\327\"\210\211\305!\206\351\306\304\307\"B\nB\262\262	A\262\202\234\203	\244\262	\211	\237D\207" [xmltok-namespace-attributes nxml-xmlns-namespace-uri xmltok-start xmltok-attributes nil xmltok-attribute-value nxml-parse-error "Invalid attribute value" nxml-make-namespace xmltok-attribute-prefix xmltok-attribute-local-name "Duplicate namespace declaration" nxml-ns-set-default nxml-ns-set-prefix "Cannot undeclare namespace prefix" nxml-make-name xmltok-start-tag-prefix nxml-ns-get-prefix "Prefix `%s' undeclared" nxml-ns-get-default xmltok-start-tag-local-name 0 assoc "Duplicate attribute"] 15])
#@26 

(fn TEXT TEXT-POS TAG)
(defalias 'nxml-validate-tag #[771 "\205*\"\301\205(\302A\205#\262\211\204#\303\304\"\210\305@\"\266\202\207" [nxml-validate-function nil nxml-validate-error-position error "Incorrect return value from %s" nxml-parse-error] 9 (#$ . 7130)])
#@30 

(fn LOCATION TEXT-POS TAG)
(defalias 'nxml-validate-error-position #[771 "\204\207\304\267\202 \207\211\205Z`	\305=\203\306\202\307Z\207:\205ZA\n8\211\2046A\nGZ8\262\211?\206X@\310=\203K\211\211\311H\262\202X@\312=\205X\211\211\313H\262\262\207" [xmltok-start xmltok-type xmltok-attributes xmltok-namespace-attributes #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (text 12 tag-close 14)) empty-element 2 1 attribute-name 0 attribute-value 3] 7 (#$ . 7420)])
#@22 

(fn NS LOCAL-NAME)
(defalias 'nxml-make-name #[514 "\203B\207\207" [] 4 (#$ . 7953)])
(defalias 'nxml-current-text-string #[0 "\303\267\202)\304	`\"\207\304	\305\\`\306Z\"\207\n\204'\307\310\311=\203$\312\202%\313\"\210\n\207\310\207" [xmltok-type xmltok-start xmltok-replacement #s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (space 6 data 6 cdata-section 11 char-ref 20 entity-ref 20)) buffer-substring-no-properties 9 3 nxml-parse-error nil char-ref "Reference to unsupported Unicode character" "Unresolvable entity reference"] 4])
#@28 

(fn POSITION &rest ARGS)
(defalias 'nxml-parse-error #[385 "\302\206	\303\304\"#\207" [nxml-parse-file-name xmltok-start nxml-signal-file-parse-error apply format-message] 8 (#$ . 8545)])
(defalias 'nxml-check-xmltok-errors #[0 "\205\302!@\303	\211\304H\262\211\305H\262#\262\207" [xmltok-errors nxml-parse-file-name last nxml-signal-file-parse-error 1 0] 7])
(provide 'nxml-parse)

Zerion Mini Shell 1.0