XML - dual URIs in a single xmlns definition, is it valid?

embaskexcibia

New Member
I have some XML that has an xmlns declaration as follows: \[code\]<dc:record xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mods="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-0.xsd">\[/code\]This line seems to be tripping the eTree XML parser in Python: \[code\]lxml.etree.XMLSyntaxError: xmlns:mods: 'http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-0.xsd' is not a valid URI, line 6, column 63\[/code\]If I remove one of the two URIs found in the xmlns:mods declaration, it parses fine. So, knowing that the xmlns element is there to aid human parsing, and is not meant to specifically be deferenced, is this a genuine constraint on XML (to have a single URI in a xmlns namespace declaration), or is it an overzealous enforcement by the lxml etree parser?
 
Top