%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/rng-loc.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!\210\300\305!\210\300\306!\207" [require nxml-util nxml-parse rng-parse rng-uri rng-util xmltok] 2)
#@88 Filename of schema being used for current buffer.
It is nil if using a vacuous schema.
(defvar rng-current-schema-file-name nil (#$ . 568))
(make-variable-buffer-local 'rng-current-schema-file-name)
#@57 Default value for variable `rng-schema-locating-files'.
(defvar rng-schema-locating-files-default (byte-code "\301\302\303\"D\207" [data-directory "schemas.xml" expand-file-name "schema/schemas.xml"] 4) (#$ . 773))
#@51 File containing schema for schema locating files.
(defvar rng-schema-locating-file-schema-file (expand-file-name "schema/locate.rnc" data-directory) (#$ . 995))
#@60 Schema for schema locating files or nil if not yet loaded.
(defvar rng-schema-locating-file-schema nil (#$ . 1162))
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable rng-schema-locating-files funcall function #[0 "\207" [rng-schema-locating-files-default] 1] "List of schema locating files." :type (repeat file) :group relax-ng] 8)
#@56 Alist of schema extensions vs schema loader functions.
(defvar rng-schema-loader-alist '(("rnc" . rng-c-load-schema)) (#$ . 1538))
(defvar rng-cached-document-element nil)
(defvar rng-document-type-history nil)
#@16 

(fn TYPE-ID)
(defalias 'rng-set-document-type #[257 "\3001%\211\301\230?\205#\302!\211\204\303\304\"\210\305!\266\306\307\"\210\310 0\207\311!\207" [(nxml-file-parse-error) "" rng-locate-schema-file error "Could not locate schema for type id `%s'" rng-set-schema-file-1 rng-save-schema-location-1 t rng-what-schema nxml-display-file-parse-error] 5 (#$ . 1755) (byte-code "\300 C\207" [rng-read-type-id] 1)])
(defalias 'rng-read-type-id #[0 "\3011\302 \303\304\305\306\307\"\303\310\303\311&)\2620\207\312!\207" [completion-ignore-case (nxml-file-parse-error) rng-possible-type-ids nil completing-read "Document type id: " mapcar #[257 "\211\300B\207" [nil] 3 "\n\n(fn X)"] t rng-document-type-history nxml-display-file-parse-error] 8])
#@491 Set the schema for the current buffer to the schema in FILENAME.
FILENAME must be the name of a file containing a schema.
The extension of FILENAME is used to determine what kind of schema it
is.  The variable `rng-schema-loader-alist' maps from schema
extensions to schema loader functions.  The function
`rng-c-load-schema' is the loader for RELAX NG compact syntax.  The
association is between the buffer and the schema: the association is
lost when the buffer is killed.

(fn FILENAME)
(defalias 'rng-set-schema-file #[257 "\3001
\301!\210\302\303!0\207\304!\207" [(nxml-file-parse-error) rng-set-schema-file-1 rng-save-schema-location-1 t nxml-display-file-parse-error] 4 (#$ . 2517) "fSchema file: "])
#@69 Set the schema for the current buffer to allow any well-formed XML.
(defalias 'rng-set-vacuous-schema #[0 "\300\301!\210\302 \207" [rng-set-schema-file-1 nil rng-what-schema] 2 (#$ . 3234) nil])
#@17 

(fn FILENAME)
(defalias 'rng-set-schema-file-1 #[257 "\211\205\303!\262\211\203\304!\202\211\305\306!\207" [rng-any-element rng-current-schema rng-current-schema-file-name expand-file-name rng-load-schema run-hooks rng-schema-change-hook] 3 (#$ . 3435)])
#@17 

(fn FILENAME)
(defalias 'rng-load-schema #[257 "\301!\302\"A\211\204\203\303\304\"\210\202\303\305!\210\211!\207" [rng-schema-loader-alist file-name-extension assoc error "No schema loader available for file extension `%s'" "No schema loader available for null file extension"] 6 (#$ . 3710)])
#@68 Display a message saying what schema `rng-validate-mode' is using.
(defalias 'rng-what-schema #[0 "\203\301\302\303!\"\207\301\304!\207" [rng-current-schema-file-name message "Using schema %s" abbreviate-file-name "Using vacuous schema"] 4 (#$ . 4024) nil])
#@111 Set the schema for this buffer based on the buffer's contents and file-name.

(fn &optional NO-DISPLAY-ERROR)
(defalias 'rng-auto-set-schema #[256 "\3001
\301\302 !\210\303 0\207\203\"\304\305\3068\3078\310A@!$\202%\311!\207" [(nxml-file-parse-error) rng-set-schema-file-1 rng-locate-schema-file rng-what-schema error "%s at position %s in %s" 3 2 abbreviate-file-name nxml-display-file-parse-error] 8 (#$ . 4293) nil])
#@197 Return the file-name of the schema to use for the current buffer.
Return nil if no schema could be located.
If TYPE-ID is non-nil, then locate the schema for this TYPE-ID.

(fn &optional TYPE-ID)
(defalias 'rng-locate-schema-file #[256 "\302\211\203\f\211\302B\202\303	!\302\211:\203F	\262@\262\302\262\235\203+\304\305\"\210B\262\203\204\306@\"\262A\262\2020\205M\307!)\207" [rng-cached-document-element rng-schema-locating-files nil rng-locate-schema-file-using error "Type-id loop for type-id `%s'" rng-locate-schema-file-from-type-id rng-uri-file-name] 7 (#$ . 4728)])
#@38 Return a list of the known type IDs.
(defalias 'rng-possible-type-ids #[0 "\301\203\302@\"\262A\262\202\303\304\305\"!\207" [rng-schema-locating-files nil rng-possible-type-ids-using rng-uniquify-equal sort string<] 6 (#$ . 5339)])
#@172 Locate a schema using the schema locating files FILES.
FILES is a list of file-names.
Return either a URI, a list (TYPE-ID) where TYPE-ID is a string,
or nil.

(fn FILES)
(defalias 'rng-locate-schema-file-using #[257 "\300\211\211\204\203\301@!\262A\262\202\203\264\211\203$\203\264@\211@\211\302NA\262\211\203P\203=>\203C\211A!\262\303>G\"\262\202\257\304\267\202\221\204\257\305A\236A\211\203u\306!\211\262>\204uC\244\262\210\202\257\307A\236A\211\203\215\310\301\311!!\"\262\210\202\257\211\203\257\203\237>\203\245\211A!\262\303>G\"\262\266\202\207" [nil rng-get-parsed-schema-locating-file rng-rule-matcher nbutlast #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (applyFollowingRules 86 include 121)) ruleType intern rules append rng-uri-file-name] 12 (#$ . 5590)])
(byte-code "\300\301\302\303#\210\300\304\302\305#\210\300\306\302\307#\210\300\310\302\311#\210\300\312\302\313#\207" [put documentElement rng-rule-matcher rng-match-document-element-rule namespace rng-match-namespace-rule uri rng-match-uri-rule transformURI rng-match-transform-uri-rule default rng-match-default-rule] 4)
#@14 

(fn PROPS)
(defalias 'rng-match-document-element-rule #[257 "\300 \301\236A\302\236A\203$G\303U\203A@?\202!A@\230\2053\211\2030\211\3048\230\2053\305!\207" [rng-document-element prefix localName 0 2 rng-match-default-rule] 7 (#$ . 6801)])
#@14 

(fn PROPS)
(defalias 'rng-match-namespace-rule #[257 "\300 \301\236A\205!\211\205!@\302\230?\205\303!=\205!\304!\207" [rng-document-element ns "" nxml-make-namespace rng-match-default-rule] 6 (#$ . 7064)])
#@113 Return a list (NS PREFIX LOCAL-NAME).
NS is t if the document has a non-nil, but not otherwise known namespace.
(defalias 'rng-document-element #[0 "\2069\212\214~\210eb\210\306\211\306\211\211\211\211\211\211
\307 \210\310 \210\311>\2055\312 \313 \314 E.\211\207" [rng-cached-document-element xmltok-dtd xmltok-errors xmltok-namespace-attributes xmltok-attributes xmltok-replacement nil xmltok-forward-prolog xmltok-forward (start-tag partial-start-tag empty-element partial-empty-element) rng-get-start-tag-namespace xmltok-start-tag-prefix xmltok-start-tag-local-name xmltok-name-end xmltok-name-colon xmltok-start xmltok-type] 9 (#$ . 7290)])
(defalias 'rng-get-start-tag-namespace #[0 "\301 \302\211\211\203>@\262A\203\"\303!\203\304!\230\202&\303!?\203\305!\262\211\2038\306!\2029\307\262\202\203J\204J\307\202K\207" [xmltok-namespace-attributes xmltok-start-tag-prefix nil xmltok-attribute-prefix xmltok-attribute-local-name xmltok-attribute-value nxml-make-namespace t] 6])
#@14 

(fn PROPS)
(defalias 'rng-match-transform-uri-rule #[257 "\300\236A\301\236A\302 \211\205R\303!\211\262\205R\304\"\205R\3051P\306\307 \310\311\312\313\314!\315\"\316$\216\317!)\262\320\321$\322!\205J\323!\205J\324!\2620\202R\210\321\207" [fromPattern toPattern buffer-file-name expand-file-name rng-file-name-matches-uri-pattern-p (rng-uri-error) replace-match match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 rng-uri-pattern-file-name-replace-match t nil file-name-absolute-p file-exists-p rng-file-name-uri] 12 (#$ . 8328)])
#@14 

(fn PROPS)
(defalias 'rng-match-uri-rule #[257 "\301\236A\302\236A\303 \211\205F\304!\211\262\205F\2038\30513\306\307!\310\311\304!\310\311&\312=0\202@\210\311\202F\205F\313\"\205F\314!\207" [nxml-file-name-ignore-case resource pattern buffer-file-name expand-file-name (rng-uri-error) compare-strings rng-uri-file-name 0 nil t rng-file-name-matches-uri-pattern-p rng-match-default-rule] 12 (#$ . 8928)])
#@26 

(fn FILE-NAME PATTERN)
(defalias 'rng-file-name-matches-uri-pattern-p #[514 "\3021\303\304!\")\205\3050\207\210\306\207" [nxml-file-name-ignore-case case-fold-search (rng-uri-error) string-match rng-uri-pattern-file-name-regexp t nil] 5 (#$ . 9362)])
#@14 

(fn PROPS)
(defalias 'rng-match-default-rule #[257 "\300\236A\206\301\236A\211\205\302!\303B\262\207" [uri typeId rng-collapse-space nil] 4 (#$ . 9629)])
#@22 

(fn FILE TYPE-IDS)
(defalias 'rng-possible-type-ids-using #[514 "\300!\301\203I@\262A\262\211@\302=\203+\303A\236A\211\203'\304!B\262\210\202\211@\305=\203\306A\236A\211\203E\307\300\310!!\"\262\210\202\207" [rng-get-parsed-schema-locating-file nil typeId id rng-collapse-space include rules rng-possible-type-ids-using rng-uri-file-name] 9 (#$ . 9799)])
#@164 Locate the schema for type id TYPE-ID using schema locating file FILE.
Return either a URI, a list (TYPE-ID) where TYPE-ID is a string,
or nil.

(fn TYPE-ID FILE)
(defalias 'rng-locate-schema-file-from-type-id #[514 "\300!\301\211\203V\204V@\262A\262\211@\302=\2039\303A\236\211\205+\304A!\230\262\2039\305A!\262\202\211@\306=\203\307A\236A\211\203R\310\311!\"\262\210\202\207" [rng-get-parsed-schema-locating-file nil typeId id rng-collapse-space rng-match-default-rule include rules rng-locate-schema-file-from-type-id rng-uri-file-name] 10 (#$ . 10188)])
(defvar rng-schema-locating-file-alist nil)
#@70 Return a list of rules for the schema locating file FILE.

(fn FILE)
(defalias 'rng-get-parsed-schema-locating-file #[257 "\301!\262\302\"\303!\3048\262\305\204#\203\306\"\305\202O\2035A@\232\2035\3078\202O\310!\262\203GD\241\210\202NEB\211\207" [rng-schema-locating-file-alist expand-file-name assoc file-attributes 5 nil delq 2 rng-parse-schema-locating-file] 7 (#$ . 10828)])
(defconst rng-locate-namespace-uri (nxml-make-namespace "http://thaiopensource.com/ns/locating-rules/1.0"))
#@287 Return list of rules.
Each rule has the form (TYPE (ATTR . VAL) ...), where
TYPE is a symbol for the element name, ATTR is a symbol for the attribute
and VAL is a string for the value.
Attribute values representing URIs are made absolute and xml:base
attributes are removed.

(fn FILE)
(defalias 'rng-parse-schema-locating-file #[257 "\204\f	\203\f\303	!\203\304\"\202\305!\211AA\306!\307\211\211\211\211\211\211\211\n@\n\310B\232\203\240	\203\240	@\262	A\262\n:\2032@\262@\n=\2032A@\262\307\262\203\220@\262@;\203\211\311@!\262A\262\312>\203\202\313\n\"\262BB\262A\262\202]\311A!\237BB\262\2022\237\207" [rng-schema-locating-file-schema rng-schema-locating-file-schema-file rng-locate-namespace-uri rng-load-schema rng-parse-validate-file nxml-parse-file rng-file-name-uri nil "locatingRules" intern (uri rules resource) rng-uri-resolve] 15 (#$ . 11358)])
#@276 Save the association between the buffer's file and the current schema.
This ensures that the schema that is currently being used will be used
if the file is edited in a future session.  The association will be
saved to the first writable file in `rng-schema-locating-files'.
(defalias 'rng-save-schema-location #[0 "\300\301!\207" [rng-save-schema-location-1 nil] 2 (#$ . 12285) nil])
#@33 

(fn PROMPT &optional TYPE-ID)
(defalias 'rng-save-schema-location-1 #[513 "\204\f\211\204\f\306\307!\210	\310 \311\2030\211\2040\312@!\203)\313@!\262\202A\262\202\211\204??\205\375\306\314!\202\375\204N?\205\375\306\315!\202\375\203f\316\317\320\203^\321\202_\322#!?\206\375r\323!q\210\324 \325 \326V\203\246\311eb\210\311\211\211\211\211\211\211\211*+,-.\327 \210\330 \210.\331=\204\241\306\332\"\210.	\202\270\333\334\335/!\336\261\210`\337c\210\211b\266\340c\210\341!\317\342\343\344\341	!\"!	\203\322\345\202\323\346\343\206\341\344\341\n!\"!$\262c\210\347 \210\211\203\370\316\317\350\310 \"!\205\372\351 \262)\207" [rng-current-schema-file-name rng-schema-locating-files xmltok-dtd xmltok-errors xmltok-namespace-attributes xmltok-attributes error "Buffer is using a vacuous schema" buffer-file-name nil file-writable-p expand-file-name "No writable schema locating file configured" "Buffer does not have a filename" y-or-n-p format "Save %s to %s " "type identifier" "schema location" find-file-noselect buffer-modified-p buffer-size 0 xmltok-forward-prolog xmltok-forward start-tag "Locating file `%s' invalid" "<?xml version=\"1.0\"?>\n" "<locatingRules xmlns=\"" nxml-namespace-name "\">" "\n</locatingRules>\n" "\n" rng-file-name-uri "<uri resource=\"%s\" %s=\"%s\"/>" rng-escape-string rng-relative-uri "typeId" "uri" indent-according-to-mode "Save file %s " save-buffer xmltok-replacement xmltok-name-end xmltok-name-colon xmltok-start xmltok-type rng-locate-namespace-uri] 16 (#$ . 12676)])
(provide 'rng-loc)

Zerion Mini Shell 1.0