Skip to content

Commit

Permalink
Be consistent in used references to the XML standard
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingun authored and dralley committed Mar 12, 2023
1 parent f822669 commit 078cd4c
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/de/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl<'de, 'd> Deserializer<'de> for QNameDeserializer<'de, 'd> {
ignored_any
}

/// According to the <https://www.w3.org/TR/xmlschema-2/#boolean>,
/// According to the <https://www.w3.org/TR/xmlschema11-2/#boolean>,
/// valid boolean representations are only `"true"`, `"false"`, `"1"`,
/// and `"0"`. But this method also handles following:
///
Expand Down
2 changes: 1 addition & 1 deletion src/de/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2121,7 +2121,7 @@ where
T::deserialize(&mut de)
}

// TODO: According to the https://www.w3.org/TR/xmlschema-2/#boolean,
// TODO: According to the https://www.w3.org/TR/xmlschema11-2/#boolean,
// valid boolean representations are only "true", "false", "1", and "0"
fn str2bool<'de, V>(value: &str, visitor: V) -> Result<V::Value, DeError>
where
Expand Down
2 changes: 1 addition & 1 deletion src/de/simple_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ impl<'de, 'a> Deserializer<'de> for AtomicDeserializer<'de, 'a> {
self.deserialize_str(visitor)
}

/// According to the <https://www.w3.org/TR/xmlschema-2/#boolean>,
/// According to the <https://www.w3.org/TR/xmlschema11-2/#boolean>,
/// valid boolean representations are only `"true"`, `"false"`, `"1"`,
/// and `"0"`. But this method also handles following:
///
Expand Down
2 changes: 1 addition & 1 deletion src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ pub mod serialize {
/// would occur if map key is a complex type that cannot be serialized as
/// a primitive type (i.e. string, char, bool, unit struct or unit variant).
///
/// [XML name]: https://www.w3.org/TR/REC-xml/#sec-common-syn
/// [XML name]: https://www.w3.org/TR/xml11/#sec-common-syn
Unsupported(Cow<'static, str>),
/// Too many events were skipped while deserializing a sequence, event limit
/// exceeded. The limit was provided as an argument
Expand Down
4 changes: 2 additions & 2 deletions src/name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ impl<'a> AsRef<[u8]> for Prefix<'a> {
////////////////////////////////////////////////////////////////////////////////////////////////////

/// A namespace prefix declaration, `xmlns` or `xmlns:<name>`, as defined in
/// [XML Schema specification](https://www.w3.org/TR/xml-names/#ns-decl)
/// [XML Schema specification](https://www.w3.org/TR/xml-names11/#ns-decl)
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum PrefixDeclaration<'a> {
/// XML attribute binds a default namespace. Corresponds to `xmlns` in `xmlns="..."`
Expand Down Expand Up @@ -250,7 +250,7 @@ impl<'a> Namespace<'a> {
/// This is because XML entity references are expanded during attribute value
/// normalization.
///
/// [non-normalized]: https://www.w3.org/TR/REC-xml/#AVNormalize
/// [non-normalized]: https://www.w3.org/TR/xml11/#AVNormalize
/// [IRI reference]: https://datatracker.ietf.org/doc/html/rfc3987
#[inline(always)]
pub fn into_inner(self) -> &'a [u8] {
Expand Down
2 changes: 1 addition & 1 deletion src/se/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::fmt::Write;
/// [not allowed] in XML names, because in some cases it should pass names
/// that would be filtered on higher level.
///
/// [not allowed]: https://www.w3.org/TR/REC-xml/#sec-common-syn
/// [not allowed]: https://www.w3.org/TR/xml11/#sec-common-syn
pub struct QNameSerializer<W: Write> {
/// Writer to which this serializer writes content
pub writer: W,
Expand Down
8 changes: 4 additions & 4 deletions src/se/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ where
/// );
/// ```
///
/// [XML name]: https://www.w3.org/TR/REC-xml/#NT-Name
/// [XML name]: https://www.w3.org/TR/xml11/#NT-Name
pub fn to_writer_with_root<W, T>(mut writer: W, root_tag: &str, value: &T) -> Result<(), DeError>
where
W: Write,
Expand Down Expand Up @@ -249,7 +249,7 @@ where
/// );
/// ```
///
/// [XML name]: https://www.w3.org/TR/REC-xml/#NT-Name
/// [XML name]: https://www.w3.org/TR/xml11/#NT-Name
pub fn to_string_with_root<T>(root_tag: &str, value: &T) -> Result<String, DeError>
where
T: ?Sized + Serialize,
Expand Down Expand Up @@ -369,7 +369,7 @@ pub(self) struct XmlName<'n>(&'n str);
impl<'n> XmlName<'n> {
/// Checks correctness of the XML name according to [XML 1.1 specification]
///
/// [XML 1.1 specification]: https://www.w3.org/TR/REC-xml/#NT-Name
/// [XML 1.1 specification]: https://www.w3.org/TR/xml11/#NT-Name
pub fn try_from(name: &'n str) -> Result<XmlName<'n>, DeError> {
//TODO: Customization point: allow user to decide if he want to reject or encode the name
match name.chars().next() {
Expand Down Expand Up @@ -514,7 +514,7 @@ impl<'w, 'r, W: Write> Serializer<'w, 'r, W> {
/// );
/// ```
///
/// [XML name]: https://www.w3.org/TR/REC-xml/#NT-Name
/// [XML name]: https://www.w3.org/TR/xml11/#NT-Name
pub fn with_root(writer: &'w mut W, root_tag: Option<&'r str>) -> Result<Self, DeError> {
Ok(Self {
ser: ContentSerializer {
Expand Down

0 comments on commit 078cd4c

Please sign in to comment.