xso-proc: Add the default flag to the element meta
This allows the payload to be absent, and requires the field type to be Option<minidom::Element>.
This commit is contained in:
parent
c72cf3ddd1
commit
1823afbc71
6 changed files with 107 additions and 6 deletions
|
|
@ -406,7 +406,12 @@ fn new_field(
|
|||
}
|
||||
|
||||
#[cfg(feature = "minidom")]
|
||||
XmlFieldMeta::Element { span, amount } => Ok(Box::new(ElementField {
|
||||
XmlFieldMeta::Element {
|
||||
span,
|
||||
default_,
|
||||
amount,
|
||||
} => Ok(Box::new(ElementField {
|
||||
default_,
|
||||
amount: amount.unwrap_or(AmountConstraint::FixedSingle(span)),
|
||||
})),
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue