在TEI中使用div语句来区分章节,子标题等(XML)

时间:2016-05-25 21:46:39

标签: xml tei

声明: 关于StackOverflow的第一篇文章,所以请耐心等待..我也是' new'到XML /标记语言,所以如果这是一个" dumb"问题,原谅我。

问题: 我正在开展一个涉及标记一系列书籍的项目。我们想要做的是在章节改变时,副标题改变时,在我们的文本中划分等等。

现在,在使用基本文件时,我已经了解到div语句需要存在其他div语句。 (这是我困惑的一部分) - 整本书都在div声明中,附上书“书”。 。 - 当我尝试在其中嵌套div语句时,我到处都会看到丑陋的红线,说我的代码坏了。

嵌套div是不是很糟糕?如果没有,有人可以提供一个如何在TEI中使用它们的例子吗?另外:如果有人知道章节的相关标记(如果它只是简单的章节'或者'副标题'或者其他什么......?)

非常感谢你的时间。 -RB。

编辑:以下是我正在使用的基本概要...(我删除或更改了特定于我的项目的内容)。 - 假设我的TEI标题是正确的。这是我正在努力解决的文字部分:

<text>
<body>
<div type='book'>
<pb n="1" facs="1.jp2"/>

<p>GEMSTONES AND<lb/>
MINING<lb/>
IN THE<lb/>
DISTRICT.
</p>
<!--rb several pages follow, until the first chapter I want to mark-->
<pb n='23' facs='23.jp2'/>
<div type='chapter'>
<p>Gemstones and mining<lb/>
in the<lb/>
District<lb/>
<!--rb content in this chapter continues over a few pages-->
<pb n='33' facs='33.jp2'/>
</div>
<!--rb and now the rest of my code is red and angry-->
</div>
</body>
</text>

我想要帮助的是在我的文本中将div放在页面内。目前,当我尝试插入较小的div(分解,比如章节)时,代码会将整个文档用红色表示为红色,因为我的一个div,在#book;#39; div已被关闭......

1 个答案:

答案 0 :(得分:0)

好的,我的回答不是你问题的答案。 这是另一个,也许更有帮助。我在章节下面插入了部分div。

<text>
<body>
<div type='book'>
<pb n="1" facs="1.jp2"/>
<head>GEMSTONES AND<lb/>MINING<lb/>IN THE<lb/>DISTRICT.</head>
<p>some text></p>
<!--rb several pages follow, until the first chapter I want to mark-->
<pb n='23' facs='23.jp2'/>
<div type='chapter'>
<head>Gemstones and mining<lb/>in the<lb/>District</head>
<p>some text</p>
<pb n='24' facs='24.jp2'/>
<div type="section">
<head>Section Title</head>
<p>some text</p>
<pb n='25' facs='25.jp2'/>
<p>some text</p>
<!--rb content in this chapter continues over a few pages-->
</div>
<pb n='33' facs='33.jp2'/>
</div>
<div type="chapter">
<head>another Title</head>
<p>some text</p>
<div type="section">
<head>A new Section title</head>
<p>Texts, everywhere</p>
</div>
<div type="section">
<head>Title, again</head>
<p>So on</p>
</div>
<!--rb and now the rest of my code is red and angry-->
<!--rb and now the rest of my code is red and angry-->
</div>
</div>
</body>
</text>