diff options
author | 2024-11-02 01:48:54 +0000 | |
---|---|---|
committer | 2024-11-02 01:48:54 +0000 | |
commit | 009b53c4a958fd751686ea185b006fa1a383b703 (patch) | |
tree | b873536fa86cc2d4859887c5e603a96332f60bcb /src/xml/parsers.rs | |
parent | d0a8d25d256a72c18a1dde14fdb77b732f4f3ac7 (diff) | |
download | peanuts-009b53c4a958fd751686ea185b006fa1a383b703.tar.gz peanuts-009b53c4a958fd751686ea185b006fa1a383b703.tar.bz2 peanuts-009b53c4a958fd751686ea185b006fa1a383b703.zip |
implement XML composers
Diffstat (limited to '')
-rw-r--r-- | src/xml/parsers.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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) |