if key.endswith('schemaLocation'):
# schemaLocation should be at the end of the list.
# Use list comprehension to filter out empty strings
if key.endswith('schemaLocation'):
# schemaLocation should be at the end of the list.
# Use list comprehension to filter out empty strings