[OAI-implementers] same xml namespace declaration in header and
payload
Timo Proescholdt
timo at proescholdt.de
Fri Sep 23 08:28:59 EDT 2011
Dear all,
the XML payload of an OAI response (GetRecord,ListRecords) can in certain
circumstances contain the same namespace declaration as the OAI header. If
the whole document (skeleton and payload) is treated as one DOM by the
provider, the additional namespace declaration in the payload is removed
(by any smart DOM library). A naive harvester, that only textwise cuts out
the payload out of the OAI response, will then encounter an invalid XML
document (with missing namespace declarations).
For instance, the OAI-PMH root element declares
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance". This is likely to
be also present in a XML document that is embedded as payload.
Considering that it is impossible to rid the world of naive harvesters,
the question is how an OAI provider should deal with this. Should it leave
two namespace declarations in the response? It is surprisingly difficult
to do this, because most DOM libraries automatically remove redundant
declarations.
how is this problem addressed out there?
thanks and best regards
Timo
More information about the OAI-implementers
mailing list