File tree 4 files changed +206
-25
lines changed
4 files changed +206
-25
lines changed Original file line number Diff line number Diff line change 12
12
13
13
### New Features
14
14
15
+ - [ #541 ] : Deserialize specially named ` $text ` enum variant in [ externally tagged]
16
+ enums from textual content
17
+ - [ #545 ] : Resolve well-known namespaces (xml and xmlns) to their approrpriate URIs.
18
+ Also, enforce namespace constraints related to these well-known namespaces.
19
+
15
20
### Bug Fixes
16
21
17
22
### Misc Changes
Original file line number Diff line number Diff line change @@ -9,6 +9,16 @@ use std::str::Utf8Error;
9
9
use std:: string:: FromUtf8Error ;
10
10
use std:: sync:: Arc ;
11
11
12
+ #[ derive( Clone , Debug ) ]
13
+ pub struct ReservedNamespacePrefixError {
14
+ pub prefix : String ,
15
+ }
16
+
17
+ #[ derive( Clone , Debug ) ]
18
+ pub struct ReservedNamespaceNameError {
19
+ pub name : String ,
20
+ }
21
+
12
22
/// The error type used by this crate.
13
23
#[ derive( Clone , Debug ) ]
14
24
pub enum Error {
@@ -45,6 +55,8 @@ pub enum Error {
45
55
InvalidAttr ( AttrError ) ,
46
56
/// Escape error
47
57
EscapeError ( EscapeError ) ,
58
+ ReservedNamespacePrefixError ( ReservedNamespacePrefixError ) ,
59
+ ReservedNamespaceNameError ( ReservedNamespaceNameError ) ,
48
60
/// Specified namespace prefix is unknown, cannot resolve namespace for it
49
61
UnknownPrefix ( Vec < u8 > ) ,
50
62
}
@@ -120,7 +132,13 @@ impl fmt::Display for Error {
120
132
f. write_str ( "Unknown namespace prefix '" ) ?;
121
133
write_byte_string ( f, prefix) ?;
122
134
f. write_str ( "'" )
123
- }
135
+ } ,
136
+ Error :: ReservedNamespacePrefixError ( e) => write ! (
137
+ f, "The namespace prefix `{}` is invalid." , e. prefix
138
+ ) ,
139
+ Error :: ReservedNamespaceNameError ( e) => write ! (
140
+ f, "The namespace name `{}` is invalid." , e. name
141
+ ) ,
124
142
}
125
143
}
126
144
}
You can’t perform that action at this time.
0 commit comments