0

我有一个这样的第一个 XML TEI 文件:

<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
  <teiHeader xml:lang="en" />
  <text>
    <body>
      <div type="chapter" n="1">
        <p>
          <s xml:id="e_1">In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since.</s>
        </p>
        <p>
          <s xml:id="e_2">"Whenever you feel like criticizing any one," he told me, "just remember that all the people in this world haven't had the advantages that you've had."</s>
        </p>
      </div>
      <div type="chapter" n="2">
        <p>
          <s xml:id="e_3">In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since.</s>
        </p>
        <p>
          <s xml:id="e_4">"Whenever you feel like criticizing any one," he told me, "just remember that all the people in this world haven't had the advantages that you've had."</s>
        </p>
      </div>
    </body>
  </text>
</TEI>

然后,我有第二个这样的 XML TEI 文件:

 <?xml version="1.0" encoding="UTF-8"?>
    <TEI xmlns="http://www.tei-c.org/ns/1.0">
      <teiHeader xml:lang="en" />
      <text>
        <body>
          <div type="chapter" n="1">
            <p>
              <s xml:id="f_1">explanation of the sentence e_1.</s>
            </p>
            <p>
              <s xml:id="f_2">explanation of the sentence e_2</s>
            </p>
           </div>
           <div type="chapter" n="2">
            <p>
              <s xml:id="f_3">explanation of the sentence e_1.</s>
            </p>
            <p>
              <s xml:id="f_4">explanation of the sentence e_2</s>
            </p>
           </div>
        </body>
      </text>
    </TEI>

第二个文件包含对第一个文件的一些解释。我想知道是否可以在这两个文件之间进行交叉引用?在 XML 中执行此操作的常用/最佳方法是什么?TEI 有什么特别的吗?

4

1 回答 1

1

第二个文件包含对第一个文件的一些解释。我想知道是否可以在这两个文件之间进行交叉引用?在 XML 中执行此操作的常用/最佳方法是什么?TEI 有什么特别的吗?

是的,在 TEI 中有一种特定的方法——只需使用 tei:link-element。见:https ://tei-c.org/release/doc/tei-p5-doc/en/html/ref-link.html

在我自己的项目中,我使用了一个单独的文件,它就像一种索引并链接多个文档。在处理过程中(例如通过 XSLT 或 XQuery),链接用于所需的行为(例如 HTML 锚标记)。

于 2021-01-21T13:54:05.920 回答