<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Chris,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I think you were spot on to focus on that '/.ead' part of the message. I *think* that indeed points to the root cause of the issue, but I've no clue how to untangle it. Anyhow, I put in a question for the developer who maintains that code (external to ASpace).
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
You should be able to assign a global variable, just like you had done previously, so hopefully the workaround that you've employed will only be temporary. Very glad that Lora got you set up with the workaround, since 2.8 has a lot of amazing features (we're
about to upgrade to 2.7.1, but already looking forward to the new features in 2.8 and beyond
<span>๐</span> )<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks for reporting the issue! <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Mark</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Chris Mayo
<mayoc@bc.edu><br>
<b>Sent:</b> Wednesday, August 19, 2020 9:26 AM<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?</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Lora, Mark,</div>
<div><br>
</div>
<div>Thank you both! Moving the variable did fix the issue, and now I feel a bit sheepish for focusing on the './ead' segment of the error report, not the 'fn:substring' part. I may make more of the refinements Mark suggested later on, but it's working for
now, which is the important part. Thanks for the help tracking that down.</div>
<div><br>
</div>
<div>Best,</div>
<div>Chris<br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, Aug 18, 2020 at 6:12 PM Custer, Mark <<a href="mailto:mark.custer@yale.edu">mark.custer@yale.edu</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Chris, Lora:<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Okay, so I just did a bit more digging (but not enough yet), and I'd say that there must either be a bug in the gem or in the way that it's invoked (I'm leaning toward the latter, but I haven't looked at the ASpace code yet). Whatever the issue is, it's not
what I speculated the first time around.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Chris, like you, I have no problems when running this stylesheet with any version of saxon outside of ArchiveSpace, and most everything looks fine with how you have things set up. I say "most everything looks fine" only because that $repo variable could select
multiple values if you had, say, a "num" element hand-encoded in the primary finding aid title, and if you did, you'd get an error when trying to run the substring function anyway, since that function will always require a single string and never multiple
items in a sequence. I'd probably change that same Xpath expression to look for the call number in the archdesc/did/unitid[1] area instead, just to play it safe. Also because I think it's strange that ASpace serializes the unitid to the finding aid title,
but that might just be me <span id="x_gmail-m_-1459776415339331295๐">๐. </span>
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
The issue here, I think, is that you cannot set a global variable in the XSLT stylesheets in ASpace 2.8. Luckily the default ones don't do that (although I'm surprised, since I do that all the time
<span id="x_gmail-m_-1459776415339331295๐">๐</span>), but you should definitely have the option to do that, as you did before. Actually, it looks like the EAC-to-HTML one does declare at least one global variable, but that transformation is not used anywhere
in ASpace I don't think, so no worries.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
But in the meantime, you can get things working again as Lora just mentioned, by moving your repo variable inside of the "publicationstmt" template instead. That's the important part right now; good find, Lora!
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Mark</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_gmail-m_-1459776415339331295appendonsend"></div>
<hr style="display:inline-block; width:98%">
<div id="x_gmail-m_-1459776415339331295divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b>
<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 Lora Woodford <<a href="mailto:Lora.Woodford@lyrasis.org" target="_blank">Lora.Woodford@lyrasis.org</a>><br>
<b>Sent:</b> Tuesday, August 18, 2020 5:07 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> Re: [Archivesspace_Users_Group] Changes to PDF export in 2.8?</font>
<div> </div>
</div>
<div lang="EN-US">
<div>
<p>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.</p>
<p> </p>
<p>Lora</p>
<p> </p>
<div style="border-color:rgb(181,196,223) currentcolor currentcolor; border-style:solid none none; border-width:1pt medium medium; padding:3pt 0in 0in">
<p><b><span style="font-size:12pt; color:black">From: </span></b><span style="font-size:12pt; color:black"><<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" target="_blank">archivesspace_users_group-bounces@lyralists.lyrasis.org</a>>
on behalf of Lora Woodford <<a href="mailto:Lora.Woodford@lyrasis.org" target="_blank">Lora.Woodford@lyrasis.org</a>><br>
<b>Reply-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>Date: </b>Tuesday, August 18, 2020 at 4:39 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>Re: [Archivesspace_Users_Group] Changes to PDF export in 2.8?</span></p>
</div>
<div>
<p> </p>
</div>
<p>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>
</p>
<p><xsl:choose></p>
<p> <xsl:when test="substring($repo,1,2)='IM'"></p>
<p> <fo:block>Irish Music Archives</fo:block></p>
<p> </xsl:when></p>
<p> <xsl:otherwise></p>
<p> <xsl:apply-templates select="ead:publisher"/></p>
<p> </xsl:otherwise></p>
<p></xsl:choose></p>
<p> </p>
<p>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.</p>
<p> </p>
<p>Lora</p>
<p> </p>
<div style="border-color:rgb(181,196,223) currentcolor currentcolor; border-style:solid none none; border-width:1pt medium medium; padding:3pt 0in 0in">
<p><b><span style="font-size:12pt; color:black">From: </span></b><span style="font-size:12pt; color:black"><<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>Reply-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>Date: </b>Monday, August 17, 2020 at 3:04 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>Re: [Archivesspace_Users_Group] Changes to PDF export in 2.8?</span></p>
</div>
<div>
<p> </p>
</div>
<div>
<div>
<p>Hi Mark,</p>
</div>
<div>
<p> </p>
</div>
<div>
<p>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.</p>
</div>
<div>
<p> </p>
</div>
<div>
<p>Best,</p>
</div>
<div>
<p>Chris</p>
</div>
</div>
<p> </p>
<div>
<div>
<p>On Mon, Aug 17, 2020 at 1:49 PM Custer, Mark <<a href="mailto:mark.custer@yale.edu" target="_blank">mark.custer@yale.edu</a>> wrote:</p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204); border-style:none none none solid; border-width:medium medium medium 1pt; padding:0in 0in 0in 6pt; margin:5pt 0in 5pt 4.8pt">
<div>
<div>
<p><span style="font-size:12pt; color:black">Chris,</span></p>
</div>
<div>
<p><span style="font-size:12pt; color:black"> </span></p>
</div>
<div>
<p><span style="font-size:12pt; 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></p>
</div>
<div>
<p><span style="font-size:12pt; color:black"> </span></p>
</div>
<div>
<p><span style="font-size:12pt; 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></p>
</div>
<div>
<p><span style="font-size:12pt; color:black"> </span></p>
</div>
<div>
<p><span style="font-size:12pt; color:black">Mark</span></p>
</div>
<div>
<p><span style="font-size:12pt; color:black"> </span></p>
</div>
<div>
<p><span style="font-size:12pt; color:black"> </span></p>
</div>
<div align="center" style="text-align:center">
<hr width="100%" size="0" align="center">
</div>
<div id="x_gmail-m_-1459776415339331295x_gmail-m_-8814062422876571833divRplyFwdMsg">
<p><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> </p>
<div>
<p> </p>
</div>
</div>
<div>
<div>
<div>
<p>Hi all,</p>
</div>
<div>
<p> </p>
</div>
<div>
<p>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:</p>
</div>
<div>
<p> </p>
</div>
<div>
<p>"The context item for axis step ./ead is absent. Found while atomizing the first argument of fn:subst"</p>
</div>
<div>
<p> </p>
</div>
<div>
<p>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.
</p>
</div>
<div>
<p> </p>
</div>
<div>
<p>Has anyone else encountered problems with modified finding aid stylesheets in 2.8, or have any thoughts on what could be causing this error?</p>
</div>
<div>
<p> </p>
</div>
<div>
<p>Chris</p>
</div>
<div>
<p> </p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p><span style="color:rgb(136,136,136)">Chris Mayo</span></p>
</div>
<p><span style="color:rgb(136,136,136)">Digital Production Librarian</span></p>
</div>
</div>
<p><span style="color:rgb(136,136,136)">Boston College</span></p>
</div>
</div>
<p><span style="color:rgb(136,136,136)"><a href="mailto:chris.mayo@bc.edu" target="_blank">chris.mayo@bc.edu</a></span></p>
</div>
<div>
<p><span style="color:rgb(136,136,136)">pronouns: they/them/theirs</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p>_______________________________________________<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="https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fmailman%2Flistinfo%2Farchivesspace_users_group&data=02%7C01%7Cmark.custer%40yale.edu%7C771ad055489b47fc123208d84443892d%7Cdd8cbebb21394df8b4114e3e87abeb5c%7C0%7C0%7C637334404145073358&sdata=Rk414cWu7q09APca70dL%2F42a8pHQtRv8rlHrbE4QykM%3D&reserved=0" originalsrc="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" shash="pBuWzLkBiCrrSELjd4Lr3Vfb8yD9Bin7+e3jpMB5zKbffsbRFBEhL16Nl1X7zOCq9LjYZVcHZL4TyXSdsUp+fFSpbjgUu7WP5fTNyRRiELiTBMt1GW9VOA115pk87Bo00QEIjJ2ig7ECrmwlGEXrYSXa+FyYPmEZhcxZ7HtTyVk=" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a></p>
</blockquote>
</div>
<p><br clear="all">
<br>
-- </p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p><span style="color:rgb(136,136,136)">Chris Mayo</span></p>
</div>
<p><span style="color:rgb(136,136,136)">Digital Production Librarian</span></p>
</div>
</div>
<p><span style="color:rgb(136,136,136)">Boston College</span></p>
</div>
</div>
<p><span style="color:rgb(136,136,136)"><a href="mailto:chris.mayo@bc.edu" target="_blank">chris.mayo@bc.edu</a></span></p>
</div>
<div>
<p><span style="color:rgb(136,136,136)">pronouns: they/them/theirs</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<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="https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fmailman%2Flistinfo%2Farchivesspace_users_group&data=02%7C01%7Cmark.custer%40yale.edu%7C771ad055489b47fc123208d84443892d%7Cdd8cbebb21394df8b4114e3e87abeb5c%7C0%7C0%7C637334404145073358&sdata=Rk414cWu7q09APca70dL%2F42a8pHQtRv8rlHrbE4QykM%3D&reserved=0" originalsrc="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" shash="pBuWzLkBiCrrSELjd4Lr3Vfb8yD9Bin7+e3jpMB5zKbffsbRFBEhL16Nl1X7zOCq9LjYZVcHZL4TyXSdsUp+fFSpbjgUu7WP5fTNyRRiELiTBMt1GW9VOA115pk87Bo00QEIjJ2ig7ECrmwlGEXrYSXa+FyYPmEZhcxZ7HtTyVk=" rel="noreferrer" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><br>
</blockquote>
</div>
<br clear="all">
<br>
-- <br>
<div dir="ltr" class="x_gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div><span><font color="#888888">Chris Mayo<br>
</font></span></div>
<span><font color="#888888">Digital Production Librarian<br>
</font></span></div>
<span><font color="#888888"></font></span></div>
<span><font color="#888888">Boston College<br>
</font></span></div>
<span></span></div>
<span><font color="#888888"><a href="mailto:chris.mayo@bc.edu" target="_blank">chris.mayo@bc.edu</a><br>
</font></span></div>
<div><span><font color="#888888">pronouns: they/them/theirs<br>
</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>