Skip to content

Commit

Permalink
weaker assertion of relationship (#249)
Browse files Browse the repository at this point in the history
Co-authored-by: Helmut Hänsel <[email protected]>
  • Loading branch information
hhaensel and Helmut Hänsel committed Dec 8, 2023
1 parent 0b62ad6 commit e14fd5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/relationship.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ end
function get_package_relationship_root(xf::XLSXFile) :: EzXML.Node
xroot = xmlroot(xf, "_rels/.rels")
@assert EzXML.nodename(xroot) == "Relationships" "Malformed XLSX file $(xf.source). _rels/.rels root node name should be `Relationships`. Found $(EzXML.nodename(xroot))."
@assert EzXML.namespaces(xroot) == Pair{String,String}[""=>"http://schemas.openxmlformats.org/package/2006/relationships"] "Unexpected namespace at relationship file: `$(EzXML.namespaces(xroot))`."
@assert (""=>"http://schemas.openxmlformats.org/package/2006/relationships") EzXML.namespaces(xroot) "Unexpected namespace at workbook relationship file: `$(EzXML.namespaces(xroot))`."
return xroot
end

function get_workbook_relationship_root(xf::XLSXFile) :: EzXML.Node
xroot = xmlroot(xf, "xl/_rels/workbook.xml.rels")
@assert EzXML.nodename(xroot) == "Relationships" "Malformed XLSX file $(xf.source). xl/_rels/workbook.xml.rels root node name should be `Relationships`. Found $(EzXML.nodename(xroot))."
@assert EzXML.namespaces(xroot) == Pair{String,String}[""=>"http://schemas.openxmlformats.org/package/2006/relationships"] "Unexpected namespace at workbook relationship file: `$(EzXML.namespaces(xroot))`."
@assert (""=>"http://schemas.openxmlformats.org/package/2006/relationships") EzXML.namespaces(xroot) "Unexpected namespace at workbook relationship file: `$(EzXML.namespaces(xroot))`."
return xroot
end

Expand Down

2 comments on commit e14fd5f

@hhaensel
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for merging!
Any idea when we can expect a new version?
Anything else pending before a next release?

@felipenoris
Copy link
Owner

@felipenoris felipenoris commented on e14fd5f Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hhaensel I´ll tag a new version, hopefully tonight.

Please sign in to comment.