xso-proc: Add support for the codec field on attribute meta

This allows a custom TextCodec to be used for encoding and decoding the
attribute’s value, instead of FromXmlText and AsOptionalXmlText.
This commit is contained in:
Emmanuel Gil Peyrot 2025-01-25 16:21:22 +01:00
commit 01a0c51a2f
6 changed files with 114 additions and 5 deletions

View file

@ -253,6 +253,7 @@ fn new_field(
qname: QNameRef { namespace, name },
default_,
type_,
codec,
} => {
let xml_name = default_name(span, name, field_ident)?;
@ -270,6 +271,7 @@ fn new_field(
xml_name,
xml_namespace: namespace,
default_,
codec,
}))
}