The latter is rendered in quotes, so interacts with level a titles and regular quotes; watch out for strange results if nested, especially when following punctuation needs to be pulled into the quotes.
Quick fix to a simple bug.
Added a range of dating elements and attributes to the schema, and wrote a section for the markup documentation explaining how to use them. Then wrote rendering code for handling them; this is already slightly complicated, but will get more so as we work out how we're going to handle Julian versus Gregorian dates.
Bi-weekly timesheet round-up.
Implemented the request for bibl items to provide a link which pops up a copy of themselves which includes a list of the articles which mention them.
Wrote some XSLT to do the following:
- Replace all instances of U+0027 in text() nodes with U+2019, following our editorial decision to that effect yesterday.
- Transform old oxygen processing instructions to xml-model PIs for the RNG schema.
- Add a PI pointing to the Schematron schema.
I've transformed all the documents with this, and validated them all. Flow has instructions for creating a Code Template in Oxygen to simplify typing of the U+2019 character. I've also added a constraint to the Schematron schema which enforces this.
The XSLT and Schematron were fiddly to get right because of the difficulties escaping the single-quote -- use-mention was hard to get around. For the record, these are the only approaches which seem to work (different for XSLT versus Schematron):
<xsl:template match="text()"> <xsl:value-of select="replace(., '''', '’')"/> </xsl:template> <rule context="text()"> <assert test='not(contains(., "'"))'> "Straight apostrophe" characters are not permitted. Please use the Right Single Quotation Mark (U+2019) character instead. </assert> </rule>
Changes and decisions are being tracked both in SVN and in Flow, so I'm not going to go into as much detail as I'd like to on the blog, but basically today we:
- Implemented many XSLT changes, some relating to the handling of punctuation following quotation marks. This now applies to the
<quote>
and<title level="a">
elements, but will in future also apply to<soCalled>
,<mentioned>
, and possibly others. - Made a decision to use the U+2019 exclusively for apostrophes. This means creating a way to type it, which I've done using Code Templates in Oxygen and documented on Flow; a transformation to add it into all the documents, which I'll do tomorrow; and a Schematron rule to enforce it, which I'll add tomorrow (along with adding Schematron to the head of every file).
- Fixed some TOC rendering issues and normalized some document structures for complex documents that need TOCs.
- Found a bug in (I think) eXist, or maybe Saxon, whereby the
@xml:id
of the finalchild::text
of a<group>
is apparently inaccessible to XSLT. I don't know how or why this is the case, but it's making TOC rendering problematic. One solution would be to update the version of Saxon in the web application to see if that fixes it; if not, try the same algorithm in XQuery to see if eXist is really having an issue.
Fixed a bunch of issues in XSLT, including adding handling for page breaks, and making TOC generation proceed one level further into the <div>
nesting.
I've made a number of schema-related changes:
- XInclude elements are now integrated into the schema.
- The content models of
<listBibl>
and<listPerson>
now allow a single<xi:include>
element instead of other content. This makes pages likesources.xml
valid, where they weren't before. The expectation is that we will extend the use of<xi:include>
into other areas, to allow the centralization of editorial and encoding declarations etc. - A Schematron schema has been created, which imposes a restriction which may or may not be permanent:
<milestone>
and<pb>
are not allowed inside<hi>
. This is to avoid HTML invalidity because of the inclusion of HTML<hr>
elements (generated for page breaks) inside<span>
elements (generated from<hi>
s). Some instances of this have been fixed in a few files, which have had the Schematron schema PI added to their headers. Eventually this will be done for all files, and we will use Schematron for the sake of convenience.
The new TEI release fixed the problem of <closer>
in <postscript>
, so only <list>
in <signed>
remained. I've now XSLTed that away, using simply linebreaks. There are still lots of tweaks to do to 1633 before it can go to proofing.
Following that, at JJ's request, I've used oddbyexample to generate a single master-schema for the project (london_all), to which all documents are linked. The ODD file is in SVN too, and there will be many upcoming fixes as we uncover new needs.