-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from sybila/namespaces
Add support for namespaces
- Loading branch information
Showing
13 changed files
with
672 additions
and
247 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
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 +1,2 @@ | ||
pub mod document; | ||
pub mod namespaces; |
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,27 @@ | ||
/// A "namespace" is just a pair of strings which specify the (1) default prefix | ||
/// and (2) namespace url. | ||
type Namespace = (&'static str, &'static str); | ||
|
||
/// The URL of the "core" SBML namespace. | ||
pub const URL_SBML_CORE: &str = "http://www.sbml.org/sbml/level3/version1/core"; | ||
|
||
/// The URL of the HTML namespace. | ||
pub const URL_HTML: &str = "http://www.w3.org/1999/xhtml"; | ||
|
||
/// The URL of the MathML namespace. | ||
pub const URL_MATHML: &str = "http://www.w3.org/1998/Math/MathML"; | ||
|
||
/// The URL of the "default" empty namespace. | ||
pub const URL_EMPTY: &str = ""; | ||
|
||
/// The "core" SBML namespace. Default prefix for this namespace is empty. | ||
pub const NS_SBML_CORE: Namespace = ("", URL_SBML_CORE); | ||
|
||
/// The "core" HTML namespace. Default prefix for this namespace is empty. | ||
pub const NS_HTML: Namespace = ("", URL_HTML); | ||
|
||
/// The MathML namespace. Default prefix for this namespace is empty. | ||
pub const NS_MATHML: (&str, &str) = ("", URL_MATHML); | ||
|
||
/// The "default" empty namespace. Default prefix for this namespace is empty. | ||
pub const NS_EMPTY: (&str, &str) = ("", URL_EMPTY); |
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
Oops, something went wrong.