closed livingstoneonline/livingstoneonline#63

Manuscript Viewer: Restricted Items

awisnicki

On prod, the restricted item display (i.e. the text box) is not working. Take a look, for instance, at the first item in the catalogue on this page:

Catalogue:

http://livingstone.lib.umd.edu/islandora/search?f%5B%5D=dateRangeYear_mi%3A%221843%22&full_record=1

Actual item:

http://livingstone.lib.umd.edu/islandora/search?f%5B%5D=dateRangeYear_mi%3A%221843%22&full_record=1&view_pid=liv%3A000521&view_page=0

Also, can you tell me where I modify this text?

nigelgbanks

Took some digging but it turns out the generate TEI, is not valid HTML and it's missing tags causing the browser to remove the section of the viewer which is responsible for displaying the images / restricted item size.

Looks like it has to do with the title field.

nigelgbanks

Currently of the XSLT is 'xml' which outputs some tags as beings self closed (this case the empty title). This is invalid in HTML5. Changing the output to 'html' doesn't help things either as the Saxon webapp is not generating valid output for that either.

nigelgbanks

We won't be able to resolve this before I leave.

nigelgbanks

Also, can you tell me where I modify this text?

It can be modified here.

awisnicki

I don't quite follow the issue here as for this restricted item (liv_000521), there is no TEI (transcription) file.

That said, I suspect that the issue may be that the following bit of code in transcription.xsl needs to be commented out:

            <title>
                <xsl:value-of select="//teiHeader//title[2]"/>
            </title>

In other words, change it to this:

            <!--<title>
                <xsl:value-of select="//teiHeader//title[2]"/>
            </title>-->

Does that do the trick?

awisnicki

I'm not certain I follow the issue here as the given item, liv_000521, has no associated TEI file.

That said, I suspect the issue you're pointing to originates in the transcription.xsl file and might be fixed by commenting out the following bit of code:

            <title>
                <xsl:value-of select="//teiHeader//title[2]"/>
            </title>

In other words, modify it as follows:

            <!--<title>
                <xsl:value-of select="//teiHeader//title[2]"/>
            </title>-->

Can you try that and tell me if that does the trick?

awisnicki

Also, I've modified the restricted view text on the php file to which you directed me and have push up the modified file. Please put this up on the site.

nigelgbanks

liv:000521 does have a TEI file I've attached it.

liv_000521_TEI.xml.zip

That change you've recommended doesn't solve the issue (I've tested). It just appeared in the title tag of the browser (the error is likely somewhere else in the document and there may be multiple).

Likely there are many more problems in the same vein that will show up only under particular circumstances. The problem arises from invalid HTML5 being generated from the transcription and inserted into the browser.

This isn't a small issue to fix, will likely take some time (could be in the range of day or more), in both the transform and the service (saxon) that provides the transformation.

awisnicki

I see what the issue is. It appears that you've pulled in some transcriptions from the wrong subdirectory. All TEI files should only come from the following subdirectory:

https://github.com/livingstoneonline/TEI-Files/tree/master/Legacy4-TEI-publish

You should not be pulling TEI files from any other subdirectories.

The file, in question, appears in the following directory, which contains files that we are still working on and that should not be put up on the site as they will still have various errors, issues, as in the present case:

https://github.com/livingstoneonline/TEI-Files/tree/master/South-African-Letters

awisnicki

Looks like this is now sorted out. Thank you.