anansi-project / comicinfo

ComicInfo.xml's new home
https://anansi-project.github.io/docs/category/comicinfo
MIT License
136 stars 8 forks source link

Best practice in case of missing content #46

Closed racine-p-a closed 1 year ago

racine-p-a commented 1 year ago

Hello, I would like to know what is the best thing to do when a data is missing. Should we put the XML tag with empty content or just not putting it at all ?

In this example, there is no series or no series known.

  <?xml version="1.0" encoding="UTF-8"?>
<ComicInfo>
    <Title>My super book</Title>
    <Series></Series> <!-- Tag exists but is empty. -->
    <Year>2020</Year>
    <Month>2</Month>
    <Day>2</Day>
</ComicInfo>
  <?xml version="1.0" encoding="UTF-8"?>
<ComicInfo>
    <Title>My super book</Title>
    <!-- Tag is considered useless and is so removed. -->
    <Year>2020</Year>
    <Month>2</Month>
    <Day>2</Day>
</ComicInfo>

Which one is the best behavior for your RFC ?

Thanks for you job and your answers.

gotson commented 1 year ago

You probably already know the difference between the 2. An empty tag should mean that the value is blank, but is present. No tag should mean there is no information.

But that's irrelevant, because in the wild there's a bazillion files that are not following any standard.

Consuming applications should and will be very careful, and I don't think any would treat an empty but present tag as a blank value. I wouldn't.

racine-p-a commented 1 year ago

Indeed, that's what I thought/imagined/expected. But is there a norm or is the norm is do not care and let the applications handles it ?

gotson commented 1 year ago

There's no written norm, because it wouldn't help much as we are not any kind of authority about the format, and also because that specific use case is very rare. Metadata that is present but empty is not widespread.