diff options
author | 2024-11-19 14:52:14 +0000 | |
---|---|---|
committer | 2024-11-19 14:52:14 +0000 | |
commit | c8ed16a2d1d1f1b5278936eeadeae87da7cb104e (patch) | |
tree | a05ee9522535faab24ad2917918f30177a1aa712 /src/element.rs | |
parent | 4c235b972e2400bd2bb92b74b12558b485dc7142 (diff) | |
download | peanuts-c8ed16a2d1d1f1b5278936eeadeae87da7cb104e.tar.gz peanuts-c8ed16a2d1d1f1b5278936eeadeae87da7cb104e.tar.bz2 peanuts-c8ed16a2d1d1f1b5278936eeadeae87da7cb104e.zip |
store only namespace name in qualified name, not namespace declaration
Diffstat (limited to 'src/element.rs')
-rw-r--r-- | src/element.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/element.rs b/src/element.rs index 9bdde35..4c39c6a 100644 --- a/src/element.rs +++ b/src/element.rs @@ -10,7 +10,7 @@ use crate::{ // when are namespaces names chosen then if they are automatically calculated // namespaces are held by readers and writers. #[derive(PartialEq, Eq, Hash, Clone, Debug)] -pub struct Namespace { +pub struct NamespaceDeclaration { pub prefix: Option<String>, pub namespace: String, } @@ -18,7 +18,7 @@ pub struct Namespace { // names are qualified, they contain a reference to the namespace (held within the reader/writer) #[derive(PartialEq, Eq, Hash, Clone, Debug)] pub struct Name { - pub namespace: Namespace, + pub namespace: String, pub name: String, } @@ -40,7 +40,7 @@ pub struct Element { // namespace: String, // hashmap of explicit namespace declarations on the element itself only // possibly not needed as can be calculated at write time depending on context and qualified namespace, and for reading, element validity and namespaces are kept track of by the reader. - pub namespace_decl: HashSet<Namespace>, + // pub namespace_decl: HashSet<Namespace>, // attributes can be in a different namespace than the element. how to make sure they are valid? // maybe include the namespace instead of or with the prefix // you can calculate the prefix from the namespaced name and the current writer context |