Category: Academic

01/09/17

Permalink 02:15:39 pm, by mholmes, 349 words, 18 views   English (CA)
Categories: Academic; Mins. worked: 180

XHTML 5, vnu and validation

Today I worked through a stack of issues in building and validating the site, and I now have some recommendations and insights worth recording.

First, I determined that vnu was parsing our documents as HTML because they had the .html extension. The HTML parser does a bunch of pre-validation things (like lower-casing custom data attributes) which we would prefer to avoid. I also discovered that using the XHTML output method in Saxon was paradoxically adding a meta tag to the header specifying content type as text/html, which was also pushing vnu into treating the documents as HTML rather than XHTML. Solutions:

  1. Use this for the xsl:output element:
    <xsl:output method="xhtml" include-content-type="no" encoding="UTF-8" omit-xml-declaration="yes"
        exclude-result-prefixes="#all" normalization-form="NFC"/>
    
    The method attribute gives you correct results in terms of not producing things like self-closed empty div tags. The include-content-type="no" value suppresses the unwanted meta tag with the wrong content type.
  2. Do the HTML5 doctype like this:
    <xsl:text disable-output-escaping="yes"><!DOCTYPE html>
        </xsl:text>
    
    It's ugly but it works.
  3. Always include the charset meta tag:
    <meta charset="UTF-8"/>
    
  4. Before validating, copy only the HTML files to a fresh empty directory and validate them there. This is because of what is explained below.
  5. For validation using vnu.jar, use this command-line setting:
    -Dnu.validator.client.content-type=application/xhtml+xml
    
    In an ant task, it looks like this:
       <java jar="utilities/vnu/vnu.jar" failonerror="true" fork="true">
          <arg value="-Dnu.validator.client.content-type=application/xhtml+xml"/>
          <arg value="--format text"/>
          <arg value="--skip-non-html"/>
          <arg value="tmpValidation/"/>
        </java>
    
    The problem is that when you set the content type as in the first argument, the --skip-non-html flag no longer seems to work; it sets about validating every jpeg and javascript file in the tree. I think this must be a vnu bug, but I haven't tested thoroughly yet.

Following these steps should produce good XHTML5 (assuming your XSLT is right) and validate it as XHTML.

30/06/17

Permalink 02:26:00 pm, by mholmes, 45 words, 17 views   English (CA)
Categories: Academic; Mins. worked: 90

EC starts, bugfix for refs, discussion on release

Got EC set up and working on names/refs; next week we'll start in on XML with her. Discussed the possible release schedule (next week?) with CC; we need a visible "beta" label first. Fixed a bug in sorting of references (articles not being ignored).

01/06/17

Permalink 11:21:26 am, by mholmes, 41 words, 21 views   English (CA)
Categories: Academic; Mins. worked: 60

Ville Thierry TOC is now tabular

Processed the old list/item structure of the TOC into a series of linked tables for better compatibility with the new site layout. This was part XSLT, part manually work. There's still a lot to do on the Ville Thierry layout.

04/05/17

Permalink 01:46:04 pm, by mholmes, 18 words, 25 views   English (CA)
Categories: Academic; Mins. worked: 60

Fixed remaining bugs

Fixed bugs with id references in botanical and references, and bug with normalized document fw-links to page numbers.

26/04/17

Permalink 04:04:38 pm, by mholmes, 47 words, 24 views   English (CA)
Categories: Academic; Mins. worked: 120

Lots of re-encoding of Le Bon Mariage

There are TOCs both at the beginning and the end of Le Bon Mariage, and they're a display problem because they were done as special list elements rather than tables. I've re-encoded them all as table[@type='primarySourceToc'], which makes it far simpler to display them properly.

19/04/17

Permalink 04:32:49 pm, by mholmes, 62 words, 27 views   English (CA)
Categories: Academic; Mins. worked: 90

More bug fixes; updated the app

There were some fallout issues from the footnote stuff yesterday, so I've fixed some rogue notes which should have been other things, and tweaked the XSLT. When I went to update last night, the process failed because we were out of disk space; jetty-instances had only 30GB. RE has now doubled that, and I was able to update Mariage with no problem.

31/03/17

Permalink 02:33:14 pm, by mholmes, 114 words, 19 views   English (CA)
Categories: Academic; Mins. worked: 120

Work on normalized texts and title pages

CC pointed out a number of flaws in the way both primary source and normalized versions are being rendered. The previous site had an assumption that title page contents were centred; we want to make that explicit in texts, but then handle it, so I've added a handler for the titlePage element. Where possible, flow content in paras in normalized texts should be justified, so I've made that happen by adding a class on the root div which enables us to apply override styles for normalization display. I fixed some encoding errors in a couple of texts, and I've also tweaked a bunch of the CSS. We're getting closer to a publishable version now.

27/07/16

Permalink 04:38:12 pm, by mholmes, 69 words, 70 views   English (CA)
Categories: Academic; Mins. worked: 60

Fixed bugs in HTML generation and popup/ajax handling

The references pages were having problems due to two-level linking and AJAX; I've now simplified the AJAX fragment output (bibls and refs both in the same folder now) and tweaked the JS so that if it tries to get a local ref but doesn't find it, it just uses AJAX instead. Also fixed an annoying empty link that was being created from an old artifact of the Cocoon site.

18/05/16

Permalink 04:41:08 pm, by mholmes, 23 words, 96 views   English (CA)
Categories: Academic; Mins. worked: 60

Many tweaks to XHTML5 rendering...

...to help PS as he works on the site design, and to remove duplicate title rendering and use truncated modern titles where appropriate.

25/09/15

Permalink 01:49:37 pm, by mholmes, 170 words, 98 views   English (CA)
Categories: Academic; Mins. worked: 240

Work on the rendering of primary source texts

Started work on cleaning up and clarifying the layout of primary source texts in the static rendering output. There's quite a bit more to do, but I have something that looks cleaner and more distinct from the rest of the site already. I also found a number of encoding problems in some texts and fixed them; and one more issue prevalent in Le Bon Mariage and Le Forest Nuptiale, which is isolated by this XPath:

//label[@type='marginal'][following-sibling::*[self::div or self::p][matches(., '^\s*[\-a-z]')]]

These are instances where the encoder has erroneously closed an para and its div before inserting a marginal label, then re-opened div and para, in the middle of a sentence. These need to be collapsed; the label should appear inline. I've confirmed that making this change will not affect the rendering on the current live site, but it seems impossible to fix this with a regex, and the XSLT needed to do will be a mite thorny. Will need careful testing.

:: Next Page >>

Mariage

Faut-il se marier? La question de Panurge s’avère incontournable en Occident, surtout à partir de la contre-réforme. Des débuts de la Concile de Trente en 1545 jusqu’à la fin du règne de Louis XIV, la tentative de renouveler le mariage se heurte en France à l’intervention croissante de la monarchie dans cette institution dominée auparavent par l’Église. La rencontre entre ces deux autorités fut tumultueuse mais propice au foisonnement des documents qui font l’objet de ce site : « l’imaginaire nuptial » se compose de divers genres textuels, chacun ayant son caractère propre, mais tous traitant des peurs, des désirs et des fantasmes de plus en plus visibles dans la société d’Ancien Régime grâce aux débats soulevés par la nouvelle problématique de l’union conjugale. L’accent pour le moment est sur les textes et images misogames qui font partie d’un renouveau de la Querelle des femmes pendant les 25 premières années du XVIIe siècle.

Reports

XML Feeds