Closed AndrewBennet closed 4 years ago
To follow up the "Future" section - we will implement functionality that will allow ordering of data in a harvest xwalk by using a data-part list:sort-integer
. So the added field-source
s in this pull request will need to change from, for example:
<xwalk:field-source data-part="person:id" from="/*/mods:role[mods:roleTerm/text() = 'Author']/mods:extension/ora:role_order" select-using="xpath" />
to
<xwalk:field-source data-part="list:sort-integer" from="/*/mods:role[mods:roleTerm/text() = 'Author']/mods:extension/ora:role_order" select-using="xpath" />
This should be done after upgrade to v5.20. No need to try to undo the change to the XSL file - it will be deleted upon upgrade to 5.20.
Workaround to issue https://github.com/tomwrobel/ora_data_model/issues/181
The solution I've come up has two parts.
1.
Add a mapping of the
ora:role_order
value to a data-part which normally does not get used in person-list output (person:id
- normally only used in deposit maps). E.g., addto each person-list field-source. (The field-source above is a simplification). These mappings have been added as part of this pull request.
2.
Add the following fragment to the file found in the Elements installation directory, at
AdvancedConfiguration\XwalkXsl\Custom\hyrax-XwalkIn.xsl
. Note that this file is designed to allow changes be made to it outside of regular Elements patches and upgrades, which is why we can take this approach rather than scheduling a full patch release.This fragment should be added near the end of the file, just prior to the final line of the file which should read
</xsl:stylesheet>
(and so just after the line which starts<xsl:param name ="gpMapFile"
).Future
Upon upgrade of Elements to v5.20, this workaround will cease to work. I'll investigate solutions for the upcoming release of Elements, but bear in mind that a change will be required to the map file -- likely it will be small, perhaps along the lines of changing
person:id
tolist:sort-index
(but still TBC).