Open Screenplay Format is an XML,file created specifically to be a concise, clear, and robust
way to store the content of a screenplay. Of course it's free and open source (GPL licence). Perhaps interesting in the cotext of Trelby development (I don't know?)
Ken Tessman is the developer of a commercial screenwriting program: FadeIn
It's been considered and rejected. There's lots of trelby-specific info we need to store.