@@ -65,7 +65,7 @@ macro_rules! configure_methods {
65
65
/// If true the emitted [`End`] event is stripped of trailing whitespace after the markup name.
66
66
///
67
67
/// Note that if set to `false` and `check_end_names` is true the comparison of markup names is
68
- /// going to fail erronously if a closing tag contains trailing whitespaces.
68
+ /// going to fail erroneously if a closing tag contains trailing whitespaces.
69
69
///
70
70
/// (`true` by default)
71
71
///
@@ -77,6 +77,19 @@ macro_rules! configure_methods {
77
77
78
78
/// Changes whether mismatched closing tag names should be detected.
79
79
///
80
+ /// Note, that start and end tags [should match literally][spec], they cannot
81
+ /// have different prefixes even if both prefixes resolve to the same namespace.
82
+ /// The XML
83
+ ///
84
+ /// ```xml
85
+ /// <outer xmlns="namespace" xmlns:p="namespace">
86
+ /// </p:outer>
87
+ /// ```
88
+ ///
89
+ /// is not valid, even though semantically the start tag is the same as the
90
+ /// end tag. The reason is that namespaces are an extension of the original
91
+ /// XML specification (without namespaces) and it should be backward-compatible.
92
+ ///
80
93
/// When set to `false`, it won't check if a closing tag matches the corresponding opening tag.
81
94
/// For example, `<mytag></different_tag>` will be permitted.
82
95
///
@@ -91,6 +104,7 @@ macro_rules! configure_methods {
91
104
///
92
105
/// (`true` by default)
93
106
///
107
+ /// [spec]: https://www.w3.org/TR/xml11/#dt-etag
94
108
/// [`End`]: Event::End
95
109
pub fn check_end_names( & mut self , val: bool ) -> & mut Self {
96
110
self $( . $holder) ? . check_end_names = val;
0 commit comments