0

Disclaimer: First post on StackOverflow, so please bear with me.. I'm also 'new' to XML/markup languages, so if this is a "dumb" question, forgive me.

Question: I'm working on a project that involves marking up a series of books. What we would like to do is have divisions within our text when chapters change, when subheadings change, etc.

Now, in playing with a basic file, I've learned that div statements need other div statements to exist. (this is part of my confusion) -The entire book is in a div statement, appending it 'book' . -When I try to nest div statements within it, I get ugly red lines everywhere saying that my code is broken and wrong.

Are nested divs bad? if no, can someone please provide an example of how I might use them in TEI? Also: if anyone knows the relevant tagging for chapters (if it's simply 'chapter' or 'subheading' , or maybe something else...?)

Thank you very much for your time. -RB.

Edit: Here is a basic outline of what I am working with... (I have deleted or altered content specific to my project). - Assume my TEI header is correct. This is the text portion I am struggling with:

<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>

What I would like help with, is putting divs inside of pages in my text. At present, when I try to insert smaller divs (breaking up, say, chapters) the code underlines the entire document in red since one of my divs, within the 'book' div has been closed off...

  • 1
    Please post a [mcve]. You should post the XML that is giving you trouble and at the very least a link to the schema you are using to validate it. – Louis May 25 '16 at 22:26
  • You have tagged this question with "xml", "html", and "tei". Well, it's not an XML question, because XML doesn't care. HTML and TEI are different markup vocabularies, and what works well in one might not work well in the other. It sounds like you are authoring in TEI, so it's a TEI question, and HTML is irrelevant. And as for the keyword "nested", how on earth will that help anyone? – Michael Kay May 26 '16 at 07:33
  • Thank you for your feedback, Michael, I have since removed the other tags :) however, I am keeping the XML tag, since I am working in an XML file and am using an XML editor for working with TEI. – Rebecca May 26 '16 at 20:03
  • Hi Louis: I will do so briefly, however, I do not feel comfortable (or that it is in my contract) posting the file that I am working with, I will work on making a condensed version of the error I am having. – Rebecca May 26 '16 at 20:04

1 Answers1

0

Ok, my old answer isn't an answer on your question. Here is another, maybe more helpful. I was inserting section divs under chapters.

<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>
glabadi
  • 21
  • 6