ocrd_page: schemaLocation cleaner
@@ -66,5 +66,10 @@ def to_xml(el):
Serialize ``pc:PcGts`` document
"""
sio = StringIO()
- el.export(sio, 0, name_='PcGts', namespacedef_='xmlns:pc="%s" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15 http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15/pagecontent.xsd"' % NAMESPACES['page'])
+ el.export(sio, 0, name_='PcGts',
+ namespacedef_='xmlns:pc="%s" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="%s %s/pagecontent.xsd"' % (
+ NAMESPACES['page'],
+ NAMESPACES['page'],
+ NAMESPACES['page']
+ ))
return '<?xml version="1.0" encoding="UTF-8"?>\n' + sio.getvalue()
