Skip to content

Commit 7b42ea6

Browse files
committed
Support using attr and text from the same element
1 parent 28d5342 commit 7b42ea6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ fn process_event(event: &Event, mut state: &mut State) -> Step {
707707
if key == request {
708708
if let Ok(value) = state.reader.decode(&attr.value) {
709709
if !table.columns[i].value.borrow().is_empty() {
710-
if !allow_iteration(&table.columns[i], &state.settings) { return Step::Next; }
710+
if !allow_iteration(&table.columns[i], &state.settings) { break; }
711711
if let Some("last") = table.columns[i].aggr { table.columns[i].value.borrow_mut().clear(); }
712712
}
713713
if i == 0 { table.lastid.borrow_mut().push_str(value); }
@@ -726,7 +726,7 @@ fn process_event(event: &Event, mut state: &mut State) -> Step {
726726
if table.columns[i].value.borrow().is_empty() && !state.settings.hush_warning {
727727
eprintln!("Warning: column {} requested attribute {} not found", table.columns[i].name, request);
728728
}
729-
return Step::Next;
729+
continue;
730730
}
731731
// Set the appropriate convert flag for the following data in case the 'conv' option is present
732732
match table.columns[i].convert {
@@ -735,7 +735,6 @@ fn process_event(event: &Event, mut state: &mut State) -> Step {
735735
Some("gml-to-ewkb") => state.gmltoewkb = true,
736736
Some(_) => (),
737737
}
738-
return Step::Next;
739738
}
740739
}
741740
}
@@ -760,7 +759,7 @@ fn process_event(event: &Event, mut state: &mut State) -> Step {
760759
}
761760
for i in 0..table.columns.len() {
762761
if state.path == table.columns[i].path {
763-
if table.columns[i].attr.is_some() || table.columns[i].serial.is_some() { return Step::Next; }
762+
if table.columns[i].attr.is_some() || table.columns[i].serial.is_some() { continue; }
764763
if !table.columns[i].value.borrow().is_empty() {
765764
if !allow_iteration(&table.columns[i], &state.settings) { return Step::Next; }
766765
if let Some("last") = table.columns[i].aggr { table.columns[i].value.borrow_mut().clear(); }

0 commit comments

Comments
 (0)