Hey Keith –
I worked for a company that does an XML IDE (Altova, XMLSpy) and I /can/ read XSD. I sort of do this stuff for a living, except when I’m not made redundant at Christmas. grimace.
I need something to do on the plane when I move back to the States in a couple weeks. Let me know if you want my professional opinion on the amount of work a process would take.
I know you have callouts to java in your code (I remember reading someplace that you can use an external jar file to do some of your compile steps, thought ‘hey that’s cool, could leverage that’…other than that I don’t know what your architecture is or even what language Scrivener is written in…).
In fact, Altova has a tool called MapForce that allows algorithmic XSD <-> XSD conversions, and will generate (license-free/royalty-free) source code in Java or VisualStudio C++/C#.NET. I have a MapForce license and mad skillz. I might be able to produce the conversion libraries for you, gratis. Let me know if you are interested.
As an initial take, from the ^^ discussion, the target format is an XSD, but the internal format is something other-than-XSD. But you /can/ target HTML, so the process would be (based on what you’ve already got):
RTF -> HTML 5.0/XHTML1.1, (either is acceptable)
and then a custom
[X]HTML -> FS2 XSD
mediation library. I’ve looked at both the fb2 XSD, and the html produced by an html compile under MacOS, there’s nothing in either of those that jumps out at me as problematic wrt generating an algorithmic binding conversion library.
Back of the envelope, and aside from the finicky styled-text tags (mixed=“true” is a pita but in this case would just be copy-all constructs), this should be relatively straightforward.
Here, this is me: linkedin.com/in/aentity
rip