-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
odd2lite drops <desc> child of <graphic>, leaving invalid PCDATA #444
Comments
[From @joeytakeda] odd2lite.xsl also seems to drop child
Becomes
|
Assignments copied from the parent ticket. |
We (@martindholmes, @npcole, and I) found a likely cuprit in the template that matches tei:desc in common/common_tagdocs.xsl. (It was just doing <apply-templates>, no more.) We changed it so it copied the |
Oy vey. The problem seems to be that there are several places in the build process (or, at least, 2 obvious places in the building of ePubs) where the new <desc> elements (“new” in the sense that yesterday the were just invalid PCDATA) are copied through rather than properly processed. I found what I think is the first of these: The program P5/Utilities/expand.xsl generates the “tab-content-models” table by looking for //macroSpec and (among other things) applying-templates to the first <desc> child. (This is problematic in itself — it should not be the 1st <desc> child, it should be processing the <desc> child of the currently-being-processed language.) There is no template for <desc> in this stylesheet, so I just added one. Seemed like a good idea at the time. But no. Instead of a dozen errors just in the ePub portion of the build, there were thousands all over the build, because the p5odds.rng file itself is invalid (due to the <desc> showing up as text there). I have no idea how that happened. Goes to remind us all this is a very fragile system. |
@sydb and I looked at this ahead of the Stylesheets meeting and determined that instead of modifying the template for tei:desc, we should add one for tei:graphic/tei:desc, that copies the desc. Then we will have to deal with any fallout downstream, where tei-to-other-things is not expecting a desc inside graphic. Those downstream things might choose to drop the desc, or turn it into an attribute, or similar. |
On ticket #328 @joeytakeda raised an issue that @peterstadler and I think deserves to be a separate ticket, so here it is. My next comment is just a copy of @joeytakeda’s comment on that ticket.
The text was updated successfully, but these errors were encountered: