Skip to content

Commit

Permalink
mn2xml.xsl updated for updated name and title processing, #418
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 committed Nov 24, 2024
1 parent 5170fdd commit 69ce40a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/main/resources/mn2xml.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,10 @@
*[*[local-name() = 'title' or local-name() = 'name']] |
*[local-name() = 'title'] |
*[local-name() = 'title']//* |
*[local-name() = 'fmt-title']//* |
*[local-name() = 'name'] |
*[local-name() = 'name']//* |
*[local-name() = 'fmt-name']//* |
*[local-name() = 'xref'] |
*[local-name() = 'xref']//* |
*[local-name() = 'eref'] |
Expand Down Expand Up @@ -349,6 +351,27 @@
<xsl:apply-templates select="xalan:nodeset($element)" mode="add_attributes"/>
</xsl:template>

<xsl:template match="*[local-name() = 'title'][following-sibling::*[1][local-name() = 'fmt-title']] |
*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="xml_presentation_catalog"/>

<xsl:template match="*[local-name() = 'fmt-title']//*[local-name() = 'span'] |
*[local-name() = 'semx'] |
*[local-name() = 'fmt-name']//*[local-name() = 'span']" mode="xml_presentation_catalog">
<xsl:apply-templates mode="xml_presentation_catalog"/>
</xsl:template>

<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="xml_presentation_catalog"/>

<xsl:template match="*[local-name() = 'fmt-title'] |
*[local-name() = 'fmt-name']" mode="xml_presentation_catalog">
<xsl:variable name="element">
<xsl:element name="{substring-after(local-name(), 'fmt-')}">
<xsl:apply-templates select="@*|node()" mode="xml_presentation_catalog"/>
</xsl:element>
</xsl:variable>
<xsl:apply-templates select="xalan:nodeset($element)" mode="add_attributes"/>
</xsl:template>

<xsl:template match="*[local-name() = 'bibdata'] | *[local-name() = 'bibdata']//*" mode="xml_presentation_catalog">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="@*|node()" mode="xml_presentation_catalog"/>
Expand Down

0 comments on commit 69ce40a

Please sign in to comment.