<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Lora<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Lora Woodford <Lora.Woodford@lyrasis.org><br>
<b>Reply-To: </b>Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Date: </b>Tuesday, August 18, 2020 at 4:39 PM<br>
<b>To: </b>Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject: </b>Re: [Archivesspace_Users_Group] Changes to PDF export in 2.8?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Hi Chris,<br>
<br>
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.<br>
<br>
My XSL is pretty rusty these days, but the following lines (ln 364-371) in your as-ead-pdf.xsl are the culprits:<br>
<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal"><xsl:choose><o:p></o:p></p>
<p class="MsoNormal">    <xsl:when test="substring($repo,1,2)='IM'"><o:p></o:p></p>
<p class="MsoNormal">        <fo:block>Irish Music Archives</fo:block><o:p></o:p></p>
<p class="MsoNormal">    </xsl:when><o:p></o:p></p>
<p class="MsoNormal">    <xsl:otherwise><o:p></o:p></p>
<p class="MsoNormal">        <xsl:apply-templates select="ead:publisher"/><o:p></o:p></p>
<p class="MsoNormal">    </xsl:otherwise><o:p></o:p></p>
<p class="MsoNormal"></xsl:choose><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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.<br>
<br>
I’ll keep poking, but wanted to give you this partial update sooner rather than later.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Lora<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Chris Mayo <mayoc@bc.edu><br>
<b>Reply-To: </b>Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Date: </b>Monday, August 17, 2020 at 3:04 PM<br>
<b>To: </b>Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject: </b>Re: [Archivesspace_Users_Group] Changes to PDF export in 2.8?</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">Hi Mark,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Best,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Chris<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">On Mon, Aug 17, 2020 at 1:49 PM Custer, Mark <<a href="mailto:mark.custer@yale.edu">mark.custer@yale.edu</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Chris,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">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?  </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">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 :) </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Mark</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"> </span><o:p></o:p></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="0" width="100%" align="center">
</div>
<div id="gmail-m_-8814062422876571833divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black">
<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" target="_blank">
archivesspace_users_group-bounces@lyralists.lyrasis.org</a> <<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" target="_blank">archivesspace_users_group-bounces@lyralists.lyrasis.org</a>> on behalf of Chris Mayo <<a href="mailto:mayoc@bc.edu" target="_blank">mayoc@bc.edu</a>><br>
<b>Sent:</b> Monday, August 17, 2020 1:31 PM<br>
<b>To:</b> Archivesspace Users Group <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" target="_blank">archivesspace_users_group@lyralists.lyrasis.org</a>><br>
<b>Subject:</b> [Archivesspace_Users_Group] Changes to PDF export in 2.8?</span> <o:p>
</o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">Hi all,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">"The context item for axis step ./ead is absent. Found while atomizing the first argument of fn:subst"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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.
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Has anyone else encountered problems with modified finding aid stylesheets in 2.8, or have any thoughts on what could be causing this error?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Chris<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="color:#888888">Chris Mayo</span><o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="color:#888888">Digital Production Librarian</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><span style="color:#888888">Boston College</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><span style="color:#888888"><a href="mailto:chris.mayo@bc.edu" target="_blank">chris.mayo@bc.edu</a></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888">pronouns: they/them/theirs</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
Archivesspace_Users_Group mailing list<br>
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" target="_blank">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br>
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="color:#888888">Chris Mayo</span><o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="color:#888888">Digital Production Librarian</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><span style="color:#888888">Boston College</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><span style="color:#888888"><a href="mailto:chris.mayo@bc.edu" target="_blank">chris.mayo@bc.edu</a></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888">pronouns: they/them/theirs</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>