Define <expect> with html output

24 views
Skip to first unread message

ol sp

unread,
Aug 10, 2022, 7:35:33 AM8/10/22
to XSpec
For instance, for the following scenario:

<x:variable name="input">
    <root xmlns="http://www.tei-c.org/ns/1.0">  
      <ref target="Eden" type="place"><w xml:id="region_1641644381889_386l25_4" orig="paradyſes"
        norm="paradyses">parady<lb facs="#region_1641644381889_386l26"/>ſes</w></ref>
    </root>
  </x:variable>

<x:scenario focus="working on" label="tei:w. Contains line beginning.">
    <x:context select="$input/id('region_1641644381889_386l25_4')" mode="reading_edition"/>
    <x:expect label="Inserts &lt;br> in the middle of the word.">parady<br/>ſes</x:expect>
  </x:scenario>

The result is correct:
parady<br />ſes

but expect is not:

Therefore, the test fails.

Of cource, <br/> inherits namespace from <x:expect> and I tried to put xmlns to <br/>
  <x:expect label="Inserts &lt;br> in the middle of the word.">parady<br xmlns="http://www.w3.org/1999/xhtml"/>ſes</x:expect>

which results in

I think, specifying HTML in the output should be something common, but I cannot figure it out on my own and appreciate your help.
 

ol sp

unread,
Aug 12, 2022, 2:30:48 AM8/12/22
to XSpec
I solved it by adding xmlns="" to the <br/>.
Reply all
Reply to author
Forward
0 new messages