[Archivesspace_Users_Group] help requested with an error message - missing attribute

Custer, Mark mark.custer at yale.edu
Sat Aug 19 11:31:20 EDT 2017


Kari,


This error happens when the EAD to PDF process is trying to create a link, but there's no link to include in the PDF output.


The line number that's mentioned in the error is in the XSL-FO XML file, not the EAD file (nor the as-eas-pdf.xsl file, which luckily isn't that big of a file :)).  In ASpace's EAD to PDF process in the staff interface, as Seth notes, the EAD file is converted into an XSL-FO file, which is what Apache FOP then uses to transform into a PDF document.  If you have oXygen, you can run the transformation directly on the exported EAD file.  It will fail here, as well, but you can then open up the temporary XSL-FO file that's been created to see the error on line 3255.  My hunch, though, is that the error might be occurring because you have an EAD linking element without an @href attribute or a @target attribute.  The current as-ead-pdf.xsl file assumes that those attributes will be present when creating a link.  If not, an error will result.  Ideally, the as-ead-pdf.xsl file should be updated so that you'll still get a valid PDF file in this particular case, minus the link (since there's nothing to link to).  Here's the start of the as-ead-pdf.xsl file where the linking elements are handled, for example:  https://github.com/archivesspace/archivesspace/blob/master/stylesheets/as-ead-pdf.xsl#L1097


There are a lot of places in where fo:basic-links are created, though, so the error could also be due to a daoloc, dao, etc.  If you include the offending EAD file, someone on the list can say for sure what's causing this particular issue from the source EAD file, but it's definitely due to the fact that XSL-FO has to have a destination if it's including a link.  Otherwise, it's an invalid XSL-FO file, and Apache FOP won't convert it to a PDF file.


Mark


________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Seth Shaw <seth.shaw at unlv.edu>
Sent: Thursday, August 17, 2017 11:33:00 AM
To: Archivesspace Users Group
Subject: Re: [Archivesspace_Users_Group] help requested with an error message - missing attribute

Note that the print to PDF process runs the EAD through an XSLT to
create an XSL Formatting Objects (XSL-FO) document which is then
converted into a PDF. This error may refer to line 3255 your
as-ead-pdf.xsl (which lives in the stylesheets subdirectory of the
archivesspace home directory), but that seems unlikely if the print to
PDF works for other documents, OR the error could be the result of a
bad transformation. I would first check the as-ead-pdf.xsl and, if
that doesn't seem to be the source, run the EAD through the stylesheet
using oXygen and check the output.

If none of that turns anything up send along the original EAD and your
as-ead-pdf.xsl to see if we can help debug.

Good luck!

On Thu, Aug 17, 2017 at 6:58 AM, Kari R Smith <smithkr at mit.edu> wrote:
> Hello,
>
> We are unable to print to PDF a finding aid and I’m having trouble locating
> where this error is so I can correct it:
>
>
>
> org.apache.fop.fo.ValidationException: null:3255:124: Missing attribute on
> fo:basic-link: Either external-destination or internal-destination must be
> specified. (See position 3255:124)
>
>
>
> I’ve exported the EAD and at line 3255 there is a name entry.
>
> I’m looking at the XML in Oxygen and have searched on “fo:basic-link” to no
> success.
>
>
>
> Thanks in advance!
>
>
>
>
>
> Kari R. Smith
>
> Digital Archivist and Program Head for Born-digital Archives
>
> Institute Archives and Special Collections
>
> Massachusetts Institute of Technology Libraries, Cambridge, Massachusetts
>
> 617.253.5690   smithkr at mit.edu   https://urldefense.proofpoint.com/v2/url?u=http-3A__libraries.mit.edu_archives_&d=DwIGaQ&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=qgRvcM2nlVMklD4cIsFKn-KF6Nd7pPK5gCn3TGk0AQE&s=IrL3VA9kyi7P5dxPsDKkiDZXgjlfUsI46VTUg0_C0kk&e=
> @karirene69
>
>
>
>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lyralists.lyrasis.org_mailman_listinfo_archivesspace-5Fusers-5Fgroup&d=DwIGaQ&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=qgRvcM2nlVMklD4cIsFKn-KF6Nd7pPK5gCn3TGk0AQE&s=odwx0WSNR2ptDbrgE9x0bHcScEUb9LmHko7ZfPLG_ZY&e=
>
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lyralists.lyrasis.org_mailman_listinfo_archivesspace-5Fusers-5Fgroup&d=DwIGaQ&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=qgRvcM2nlVMklD4cIsFKn-KF6Nd7pPK5gCn3TGk0AQE&s=odwx0WSNR2ptDbrgE9x0bHcScEUb9LmHko7ZfPLG_ZY&e=
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20170819/00bc34d3/attachment.html>


More information about the Archivesspace_Users_Group mailing list