forked from clojure/data.xml
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clojure.data.xml.preload: preloadable reader tags
This can be required to make xml reader tags work, but loading the impl nss only when used. This makes AOT-ing projects that use #xml/ns in the (ns clause) possible, by requiring clojure.data.xml.preload from user.clj
- Loading branch information
Showing
3 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(ns clojure.data.xml.preload) | ||
|
||
(defn xml-ns [uri] | ||
(require 'clojure.data.xml.name) | ||
((find-var 'clojure.data.xml.name/uri-symbol) uri)) | ||
|
||
(defn xml-element [el] | ||
(require 'clojure.data.xml.node) | ||
((find-var 'clojure.data.xml.node/tagged-element) el)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{xml/ns clojure.data.xml.name/uri-symbol | ||
xml/element clojure.data.xml.node/tagged-element} | ||
{xml/ns clojure.data.xml.preload/xml-ns | ||
xml/element clojure.data.xml.preload/xml-element} |