Skip to content

Commit 7e2e8cf

Browse files
committed
Remove redundant Markdown to TEI conversion of tei:bibl elements that may occur in a tei:note element
1 parent 176984d commit 7e2e8cf

File tree

2 files changed

+1
-86
lines changed

2 files changed

+1
-86
lines changed

src/main/xar-resources/services/manuforma-form-to-tei.xslt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
</xsl:call-template>
9595
</xsl:template>
9696

97-
<xsl:template match="tei:bibl[parent::tei:place/parent::tei:listPlace or parent::tei:person/parent::tei:listPerson or parent::tei:note/parent::tei:bibl/parent::tei:body or parent::tei:bibl/parent::tei:bibl/parent::tei:body]">
97+
<xsl:template match="tei:bibl[parent::tei:place/parent::tei:listPlace or parent::tei:person/parent::tei:listPerson or parent::tei:bibl/parent::tei:bibl/parent::tei:body]">
9898
<xsl:copy>
9999
<xsl:apply-templates select="@*[name(.) ne 'source']"/>
100100
<!-- xsl:attribute name="xml:id" select="concat('bibl-', count(preceding-sibling::tei:bibl) + 1)"/ -->

src/test/xar-resources/services/manuforma-form-to-tei.xspec

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -883,91 +883,6 @@
883883
</x:scenario>
884884
</x:scenario>
885885

886-
<x:scenario label="Outside of a Note Element">
887-
<x:context>
888-
<tei:bibl class="some-class">
889-
<tei:idno>bibl-abc</tei:idno>
890-
<tei:idno>bibl-xyz</tei:idno>
891-
</tei:bibl>
892-
</x:context>
893-
<x:expect label="Then copy as is">
894-
<tei:bibl class="some-class">
895-
<tei:idno>bibl-abc</tei:idno>
896-
<tei:idno>bibl-xyz</tei:idno>
897-
</tei:bibl>
898-
</x:expect>
899-
</x:scenario>
900-
901-
<x:scenario label="Within a Note parent Element">
902-
903-
<x:scenario label="Outside of a Bibliographic Citation Element">
904-
<x:context>
905-
<tei:note>
906-
<tei:bibl class="some-class">
907-
<tei:idno>bibl-abc</tei:idno>
908-
<tei:idno>bibl-xyz</tei:idno>
909-
</tei:bibl>
910-
</tei:note>
911-
</x:context>
912-
<x:expect label="Then copy as is">
913-
<tei:note>
914-
<tei:bibl class="some-class">
915-
<tei:idno>bibl-abc</tei:idno>
916-
<tei:idno>bibl-xyz</tei:idno>
917-
</tei:bibl>
918-
</tei:note>
919-
</x:expect>
920-
</x:scenario>
921-
922-
<x:scenario label="Within a Bibliographic Citation parent Element">
923-
924-
<x:scenario label="Outside of a Body Element">
925-
<x:context>
926-
<tei:bibl>
927-
<tei:note>
928-
<tei:bibl class="some-class">
929-
<tei:idno>bibl-abc</tei:idno>
930-
<tei:idno>bibl-xyz</tei:idno>
931-
</tei:bibl>
932-
</tei:note>
933-
</tei:bibl>
934-
</x:context>
935-
<x:expect label="Then copy as is">
936-
<tei:bibl>
937-
<tei:note>
938-
<tei:bibl class="some-class">
939-
<tei:idno>bibl-abc</tei:idno>
940-
<tei:idno>bibl-xyz</tei:idno>
941-
</tei:bibl>
942-
</tei:note>
943-
</tei:bibl>
944-
</x:expect>
945-
</x:scenario>
946-
947-
<x:scenario label="Within a Body parent Element">
948-
<x:context>
949-
<tei:body>
950-
<tei:bibl>
951-
<tei:note>
952-
<tei:bibl class="some-class" source="http://some-where/#some-source">
953-
<tei:idno>bibl-abc</tei:idno>
954-
<tei:idno>bibl-xyz</tei:idno>
955-
</tei:bibl>
956-
</tei:note>
957-
</tei:bibl>
958-
</tei:body>
959-
</x:context>
960-
961-
<x:expect label="Then copy all of the attributes" test="exists($x:result/tei:bibl/tei:note/tei:bibl[@class eq 'some-class'])"/>
962-
<x:expect label="Remove the source attribute" test="empty($x:result/tei:bibl/tei:note/tei:bibl/@source)"/>
963-
<x:expect label="Then copy all children as is" test="$x:result/tei:bibl/tei:note/tei:bibl/node()">
964-
<tei:idno>bibl-abc</tei:idno>
965-
<tei:idno>bibl-xyz</tei:idno>
966-
</x:expect>
967-
</x:scenario>
968-
</x:scenario>
969-
</x:scenario>
970-
971886
<x:scenario label="Outside of a Bibliographic Citation Element">
972887
<x:context>
973888
<tei:bibl class="some-class">

0 commit comments

Comments
 (0)