這是用於純印刷出版。我們使用的出版程式 SILE 接受 XML 輸入。它實際上可以接受類似 TeX 的輸入(即 USFM),但我合作的程式設計師更傾向於使用 XML。
我假設 USX 的格式對程式設計師來說會完全沒問題,所以這些其他問題是為了讓我自己的理解更清楚。
我想這只是設計決策,但我想知道為什麼創建 USX 的人決定 <chapter> 意味著「章節開頭的數字」,而不是「章節」。我對 XML 的理解是,它通常使用如下的格式:
<tag attributes=“aaa”>content</tag>
目前的情況是
<chapter number=“1” style=“c” > 沒有內容
而我預期的是
<chapter number=“1” style=“c”>the actual content of the chapter<\chapter>
也許我漏掉了什麼,但我看不出這是由重疊標記問題引起的。
這裡還有另一個問題——遵循我們地區宗教書籍的風格,我們的專案計劃在節的末尾標記節號,而不是在開頭。按照 <verse> 標記目前的運作方式,我們將需要使用腳本將標籤移動到純文字 XML 文件中的不同位置,但如果 USX 使用我認為應該使用的格式:
<verse number=“1” style=“v”>verse text</verse>
那麼讓讀取 XML 的程式解釋該行並說「在 'verse text' 的末尾而不是開頭列印屬性 'number'」就會相當簡單。
This is for a print-only publication. The publishing program we’re using, SILE, takes xml inputs. It would actually take a TeX-like input (i.e. USFM), but the programmer I’m working with would prefer to use xml.
I’m assuming the format of USX will work perfectly fine for the programmer, so these other questions are for my own understanding.
I guess it’s just design decisions, but I’m wondering why whoever created USX decided that <chapter> meant “the number at the beginning of a chapter” and not “chapter”. My understand of xml is that it typically uses formatting like
<tag attributes=“aaa”>content</tag>
The way things currently are
<chapter number=“1” style=“c” > has no content
Where I would expect
<chapter number=“1” style=“c”>the actual content of the chapter<\chapter>
Maybe I’m missing something, but I don’t see how this is caused by overlapping markup issues.
Here’s another issue–following the style of religious books of our region our project plans to mark verse numbers at the end of verses, not the beginning. The way the <verse> marker currently works we’ll need to use scripting to move the tag to a different position in the plain text xml document, but if USX used the format I think it ought to:
<verse number=“1” style=“v”>verse text</verse>
then it would be quite simple to have the program reading the xml interpret that line and say “print out the attribute ‘number’ at the end of ‘verse text’ instead of the beginning”.
機器翻譯自 English