Previous logic assumes that sn.type exists before testing
if sn is a TerminalNode. This PR wraps the existing logic
with an if isinstance(sn, TerminalNode) condition.
Also note that the and sn.ns != self.value[1] condition has
been removed. Otherwise converted identityrefs produce
an invalid XML document and, in any case, it doesn't hurt
to redundantly specify an xmlns. FWIW, I was using the
Jukebox example. from RFC 8040. This is the identityref
that wouldn't convert otherwise:
Previous logic assumes that
sn.type
exists before testing ifsn
is a TerminalNode. This PR wraps the existing logic with anif isinstance(sn, TerminalNode)
condition.Also note that the
and sn.ns != self.value[1]
condition has been removed. Otherwise converted identityrefs produce an invalid XML document and, in any case, it doesn't hurt to redundantly specify anxmlns
. FWIW, I was using the Jukebox example. from RFC 8040. This is the identityref that wouldn't convert otherwise:K.