[Archivesspace_Users_Group] Changes to PDF export in 2.8?

Lora Woodford Lora.Woodford at lyrasis.org
Tue Aug 18 17:07:57 EDT 2020


And, as soon as I sent this, I found where that repo variable is being set up at line 126 of your xsl.  If you move that down into the publicationstmt template starting on ln 358 you should be golden.

Lora

From: <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Lora Woodford <Lora.Woodford at lyrasis.org>
Reply-To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Date: Tuesday, August 18, 2020 at 4:39 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Changes to PDF export in 2.8?

Hi Chris,

I took a quick look at this, and I do think Mark’s instinct is correct.  It seems an existing (custom to you folks) function in your xsl isn’t working with the recent updates/transition to saxon-rb.

My XSL is pretty rusty these days, but the following lines (ln 364-371) in your as-ead-pdf.xsl are the culprits:


<xsl:choose>
    <xsl:when test="substring($repo,1,2)='IM'">
        <fo:block>Irish Music Archives</fo:block>
    </xsl:when>
    <xsl:otherwise>
        <xsl:apply-templates select="ead:publisher"/>
    </xsl:otherwise>
</xsl:choose>

The error “The context item for axis step ./ead is absent. Found while atomizing the first argument of fn:substring()” points to the fact that the transformation no longer knows how to handle the $repo provided as the first argument in that substring function.  For what it’s worth, removing this customization from your stylesheet (only this customization) results in being able to successfully export/print pdfs over here.

I’ll keep poking, but wanted to give you this partial update sooner rather than later.

Lora

From: <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Chris Mayo <mayoc at bc.edu>
Reply-To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Date: Monday, August 17, 2020 at 3:04 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Changes to PDF export in 2.8?

Hi Mark,

Thanks for the suggestion - I hadn't tried yet, but I can successfully run the transform outside of Aspace using Oxygen (I don't know how to run XSL from the command line). I'm not sure whether that obviates the question about the files, but I've attached a sample EAD and the stylesheet (plus a couple of sidecar files) here. It sounds like what's going on is that the version of saxon bundled into Aspace has gotten stricter, and I'm not sure what to do about that. It's fairly important for us to be able to output PDFs directly from the application.

Best,
Chris

On Mon, Aug 17, 2020 at 1:49 PM Custer, Mark <mark.custer at yale.edu<mailto:mark.custer at yale.edu>> wrote:
Chris,

No clue if it's related or not, but it looks like a gem that's utilized for XSLT transformations in ASpace was switched out recently (saxon-xslt -> saxon-rb).  I wonder if the new gem (and/or new version of saxon) is more strict, and only now throwing an error because of that?

In any event, have you tried running the transformations outside of ASpace?  Either way, if you can share a sample EAD file that throws the error and a copy of the in-house ead-to-pdf stylesheet, I'd be curious to take a look. Not that I'm sure I can help, of course :)

Mark


________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> <archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> on behalf of Chris Mayo <mayoc at bc.edu<mailto:mayoc at bc.edu>>
Sent: Monday, August 17, 2020 1:31 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Subject: [Archivesspace_Users_Group] Changes to PDF export in 2.8?

Hi all,

We keep a modified in-house version of the ead-to-pdf stylesheet so that we can put out Finding Aids with our own branding and a few other changes. When we recently installed 2.8 on our test server, we discovered that the export to PDF job was failing with the following error info:

"The context item for axis step ./ead is absent. Found while atomizing the first argument of fn:subst"

Our production server is currently running on 2.6, and we had previously updated the test server to 2.7 without that upgrade breaking our stylesheet, so the issue appears to have been introduced between 2.7 and 2.8. As far as I can tell, the base code for the stylesheet didn't change between those versions, and while the error message looks like an Xpath problem, the EAD structure doesn't appear to have changed either.

Has anyone else encountered problems with modified finding aid stylesheets in 2.8, or have any thoughts on what could be causing this error?

Chris

Chris Mayo
Digital Production Librarian
Boston College
chris.mayo at bc.edu<mailto:chris.mayo at bc.edu>
pronouns: they/them/theirs
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group


--
Chris Mayo
Digital Production Librarian
Boston College
chris.mayo at bc.edu<mailto:chris.mayo at bc.edu>
pronouns: they/them/theirs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20200818/4ee69abf/attachment.html>


More information about the Archivesspace_Users_Group mailing list