From e14fd5fa5b398e7416de3bee17d8a516c5006f65 Mon Sep 17 00:00:00 2001 From: hhaensel <31985040+hhaensel@users.noreply.github.com> Date: Fri, 8 Dec 2023 14:47:05 +0100 Subject: [PATCH] weaker assertion of relationship (#249) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Helmut Hänsel --- src/relationship.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/relationship.jl b/src/relationship.jl index 5a3d412..e22915b 100644 --- a/src/relationship.jl +++ b/src/relationship.jl @@ -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