From 009b53c4a958fd751686ea185b006fa1a383b703 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Sat, 2 Nov 2024 01:48:54 +0000 Subject: implement XML composers --- src/xml/parsers.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/xml/parsers.rs') diff --git a/src/xml/parsers.rs b/src/xml/parsers.rs index 93ff5b1..232ebd0 100644 --- a/src/xml/parsers.rs +++ b/src/xml/parsers.rs @@ -1082,8 +1082,8 @@ impl<'s> Parser<'s, DefaultDecl<'s>> for DefaultDecl<'s> { value(DefaultDecl::Required, tag("#REQUIRED")), value(DefaultDecl::Implied, tag("#IMPLIED")), map( - preceded(opt(pair(tag("#FIXED"), S::parse)), AttValue::parse), - |att_value| DefaultDecl::Fixed(att_value), + pair(opt(pair(tag("#FIXED"), S::parse)), AttValue::parse), + |(must, att_value)| DefaultDecl::Fixed(must.is_some(), att_value), ), ))(input) } @@ -1272,9 +1272,9 @@ impl<'s> Parser<'s, EntityDef<'s>> for EntityDef<'s> { }), map( pair(ExternalID::parse, opt(NDataDecl::parse)), - |(external_id, ndata_decl)| EntityDef::ExternalID { + |(external_id, n_data_decl)| EntityDef::ExternalID { external_id, - ndata_decl, + n_data_decl, }, ), ))(input) -- cgit