Skip to content

Commit

Permalink
work
Browse files Browse the repository at this point in the history
  • Loading branch information
mcantelon committed May 17, 2024
1 parent b89f980 commit e41ab6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hack/sampledata/xsd/empty_premis.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<premis version="3.0"
<premis:premis version="3.0"
xmlns="http://www.loc.gov/premis/v3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/premis/v3 http://www.loc.gov/standards/premis/premis.xsd">
</premis>
</premis:premis>
4 changes: 4 additions & 0 deletions internal/activities/combine_premis.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ func CombinePREMISCopy(source_filepath string, destination_filepath string) erro

func CombinePREMISAddChildElements(parent_element *etree.Element, new_child_elements []*etree.Element) {
for _, child_element := range new_child_elements {
child_element.Space = "premis"
for _, element := range child_element.FindElements("//*") {
element.Space = "premis"

Check warning on line 148 in internal/activities/combine_premis.go

View check run for this annotation

Codecov / codecov/patch

internal/activities/combine_premis.go#L144-L148

Added lines #L144 - L148 were not covered by tests
}
parent_element.AddChild(child_element)

Check warning on line 150 in internal/activities/combine_premis.go

View check run for this annotation

Codecov / codecov/patch

internal/activities/combine_premis.go#L150

Added line #L150 was not covered by tests
}
}

0 comments on commit e41ab6d

Please sign in to comment.