1

根据 TEI P5 指南,我用 xml 编码了一本书,我试图在 html 页面中将其可视化。真正的目的是使用 TEI P5 指南的所有格式标记(文本格式、内部引用等)可视化编码文本。所以,最大的问题是我们如何正确地做到这一点?

{作为记录:我已经尝试(并且仍在尝试)将整个 xml 文本“扔”到 html 正文中,并在我链接到 html 的并行 css 样式表中编辑可视化<style>。但是,有些事情似乎不太对劲...}

任何想法??有什么例子吗??

这是一个 xml 示例:

    <?xml version="1.0" ?>
<TEI version="5.0" xmlns="http://www.tei-c.org/ns/1.0">
    <!--here exists the teiHeader-->
   <text>
       <front>
            <div type="preface">
                <head rend="align(center)">
                    <hi rend="bold">title</hi></head>
                <p>Here is the prologue.Here is the prologue.</p>
                <p>And second para of prologue.</p>
                <p><ref target="#memories">Here is first reference to an xml:id, which have created to the teiHeader.</ref> Some more prologue. <ref target="#modernNovel">Here is the second reference to an xml:id, which have created to the teiHeader.</ref> and more prologue.</p>
                <closer>
                    <salute rend="align(right)">Dear readers</salute>
                    <signed rend="align(right)">signature</signed>
                </closer>
            </div>
       </front>
       <body>
            <ab type="title">
                <title rend="align(center)" type="main">
                    TITLE
                </title>
                <lb/>
                <title rend="align(center)" type="desc">
                    Secondary title
                </title>
            </ab>
            <div n="1" type="chapter">
                <head rend="align(center)">
                    <hi rend="bold">Chapter 1 <lb/>name of the chapter.</hi>
                </head>
                <p>Here is the real text, and text, and more text. Again the text, and text, and more text.Again the text, and text, and more text.An finally the name <placeName xml:id="London"> <hi rend="bold">London</hi></placeName>, appears here.</p>
                <p>Here is the real text, and text, and more text. Again the text, and text, and more text.Again the text, and text, and more text.An the name <ref target="London"> <hi rend="bold">London</hi></ref>, repeat itself.</p>
            </div>
       </body>
4

2 回答 2

1

您对 @rend 属性的使用表明您正在尝试使用它来提供 CSS 样式属性。如果是这样,您可能会发现使用 @style 或 @rendition 属性更容易,因为它们是为此目的而设计的。但是请记住,所有这三个属性都旨在描述源的再现。TEI 没有(目前)提供指定如何处理文档的特定组件的方法:这被认为超出了原始项目的范围。但是,在为 TEI 元素定义“处理模型”方面正在进行工作,该模型很快就会出现在指南中。例如,参见 TEI Simple 项目。

于 2015-12-01T11:54:53.410 回答
0

是的!我强烈建议您编写 XSLT 来将您的 XML 转换为 HTML,因为这将使您能够最大程度地控制您的 TEI 元素在 Web 浏览器中的呈现方式。它还使您可以为页面的结构和样式生成多个不同的选项。

例如,如果您想提取在 TEI 中标记的所有字符名称的列表,并计算它们在每章中出现的次数,以及进行其他类型的分析处理,那么 XSLT 就是您想要的工具。您可以使用它来生成文本的完整阅读视图

于 2015-12-05T14:13:55.740 回答