HI, Linda, yes we will fix this. Nate
Nate Trail
Network Development & MARC Standards Office
LA308, Mail Stop 4402
Library of Congress
Washington DC 20540

-----Original Message-----
From: Metadata Object Description Schema List <[log in to unmask]> On Behalf Of Linda Jansova
Sent: Monday, November 05, 2018 3:45 PM
To: [log in to unmask]
Subject: [MODS] MADS XSLT error - Cannot add attributes to an element

Dear all,

I have recently been working with MARCXML to MADS stylesheet
( as this stylesheet has become an integral part of the latest versions of Evergreen ILS and is now used during authority records processing.

I have encountered an error while trying to transform MARCXML genre/form authority records from the National Library of the Czech Republic. An example of such a record is attached. (The 755 field uses zero as the first indicator which is not compliant with MARC specs but even if the indicator is changed to nothing/space, the error remains the same. A non-XML MARC21 version of the record is available from

To process the file I have used xsltproc (

When trying to process the file (xsltproc MARC21slim2MADS.xsl americke_romany.xml > output.xml), the following error message pops up:

"xsl:attribute: Cannot add attributes to an element if children have been already added to the element."

Josh Stompro from the Evergreen ILS community has come up with a simple solution to the issue:

"If I swap lines 1084 and 1085 then the error goes away and both the
genre(155) and related genre(755) show up in the transformed xml."

For more details and suggestions please see Evergreen ILS main mailing list archives:

Do you think this might be a bug in the stylesheet which could be fixed in the official release of the stylesheet (

Thank you in advance for considering the issue!

Best regards,

Linda Jansova
on behalf of the Czech Evergreen community [log in to unmask]