Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty properties causing extra indents in XmlHandler #893

Merged
merged 3 commits into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -744,18 +744,18 @@ protected String valueToString(Object obj) {
}

protected void showProperty(Property property) {
String margin = getIndent(++_level);
String margn2 = margin + " ";
String margn3 = margn2 + " ";
String margn4 = margn3 + " ";

PropertyArity arity = property.getArity();
PropertyType type = property.getType();

// If the property would generate an empty element, don't output it,
// as this could result in a schema violation.
if (Utils.isPropertyEmpty(property, arity))
return;

String margin = getIndent(++_level);
String margn2 = margin + " ";
String margn3 = margn2 + " ";
String margn4 = margn3 + " ";

boolean valueIsProperty = PropertyType.PROPERTY.equals(type);
boolean valueIsNiso = PropertyType.NISOIMAGEMETADATA.equals(type);
Expand Down
Loading