LanguageMachines / libfolia

FoLiA library for C++
https://proycon.github.io/folia
GNU General Public License v3.0
15 stars 7 forks source link

metadatatype is not always preserved #54

Closed kosloot closed 11 months ago

kosloot commented 12 months ago

Given this simple FoLiA document:

<?xml version="1.0" encoding="UTF-8"?>
<FoLiA xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://ilk.uvt.nl/folia" xml:id="id.1" generator="libfolia-v2.16" version="2.5.1">
  <metadata type="internal">
    <annotations/>
  </metadata>
  <speech xml:id="speech.1"/>
</FoLiA>

folialint accepts this, but produces:

<?xml version="1.0" encoding="UTF-8"?>
<FoLiA xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://ilk.uvt.nl/folia" xml:id="id.1" generator="libfolia-v2.16" version="2.5.1">
  <metadata type="native">
    <annotations/>
...

NOTE the change in metadata type!

foliavalidator produces:

<?xml version='1.0' encoding='utf-8'?>
<FoLiA xmlns="http://ilk.uvt.nl/folia" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="id.1" version="2.5.1" generator="foliapy-v2.5.8">
  <metadata type="internal">
    <annotations>
...

so it preserves the metadata type attribute. @proycon I assume that is the correct behavior?

kosloot commented 11 months ago

fix seems OK