Skip to content

Commit 5eb0d87

Browse files
committed
Remove redundant Markdown to TEI conversion of tei:bibl elements that may occur in a tei:note element
1 parent c7e33b5 commit 5eb0d87

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
@@ -865,91 +865,6 @@
865865
</x:scenario>
866866
</x:scenario>
867867

868-
<x:scenario label="Outside of a Note Element">
869-
<x:context>
870-
<tei:bibl class="some-class">
871-
<tei:idno>bibl-abc</tei:idno>
872-
<tei:idno>bibl-xyz</tei:idno>
873-
</tei:bibl>
874-
</x:context>
875-
<x:expect label="Then copy as is">
876-
<tei:bibl class="some-class">
877-
<tei:idno>bibl-abc</tei:idno>
878-
<tei:idno>bibl-xyz</tei:idno>
879-
</tei:bibl>
880-
</x:expect>
881-
</x:scenario>
882-
883-
<x:scenario label="Within a Note parent Element">
884-
885-
<x:scenario label="Outside of a Bibliographic Citation Element">
886-
<x:context>
887-
<tei:note>
888-
<tei:bibl class="some-class">
889-
<tei:idno>bibl-abc</tei:idno>
890-
<tei:idno>bibl-xyz</tei:idno>
891-
</tei:bibl>
892-
</tei:note>
893-
</x:context>
894-
<x:expect label="Then copy as is">
895-
<tei:note>
896-
<tei:bibl class="some-class">
897-
<tei:idno>bibl-abc</tei:idno>
898-
<tei:idno>bibl-xyz</tei:idno>
899-
</tei:bibl>
900-
</tei:note>
901-
</x:expect>
902-
</x:scenario>
903-
904-
<x:scenario label="Within a Bibliographic Citation parent Element">
905-
906-
<x:scenario label="Outside of a Body Element">
907-
<x:context>
908-
<tei:bibl>
909-
<tei:note>
910-
<tei:bibl class="some-class">
911-
<tei:idno>bibl-abc</tei:idno>
912-
<tei:idno>bibl-xyz</tei:idno>
913-
</tei:bibl>
914-
</tei:note>
915-
</tei:bibl>
916-
</x:context>
917-
<x:expect label="Then copy as is">
918-
<tei:bibl>
919-
<tei:note>
920-
<tei:bibl class="some-class">
921-
<tei:idno>bibl-abc</tei:idno>
922-
<tei:idno>bibl-xyz</tei:idno>
923-
</tei:bibl>
924-
</tei:note>
925-
</tei:bibl>
926-
</x:expect>
927-
</x:scenario>
928-
929-
<x:scenario label="Within a Body parent Element">
930-
<x:context>
931-
<tei:body>
932-
<tei:bibl>
933-
<tei:note>
934-
<tei:bibl class="some-class" source="http://some-where/#some-source">
935-
<tei:idno>bibl-abc</tei:idno>
936-
<tei:idno>bibl-xyz</tei:idno>
937-
</tei:bibl>
938-
</tei:note>
939-
</tei:bibl>
940-
</tei:body>
941-
</x:context>
942-
943-
<x:expect label="Then copy all of the attributes" test="exists($x:result/tei:bibl/tei:note/tei:bibl[@class eq 'some-class'])"/>
944-
<x:expect label="Remove the source attribute" test="empty($x:result/tei:bibl/tei:note/tei:bibl/@source)"/>
945-
<x:expect label="Then copy all children as is" test="$x:result/tei:bibl/tei:note/tei:bibl/node()">
946-
<tei:idno>bibl-abc</tei:idno>
947-
<tei:idno>bibl-xyz</tei:idno>
948-
</x:expect>
949-
</x:scenario>
950-
</x:scenario>
951-
</x:scenario>
952-
953868
<x:scenario label="Outside of a Bibliographic Citation Element">
954869
<x:context>
955870
<tei:bibl class="some-class">

0 commit comments

Comments
 (0)