「法鼓全集 XML 標記手冊」:修訂間差異

出自DILA Wiki
imported>Ray
imported>Ray
→‎head
行 277: 行 277:


==head==
==head==
===@style===
如果希望標題出現在目次,但不希望出現在內文,例 11-01.xml:
<syntaxhighlight lang="XML">
<head style="display:none">
</syntaxhighlight>
===@type===
===@type===
 主標題、副標題, ex: 03-05.xml
 主標題、副標題, ex: 03-05.xml

於 2016年7月7日 (四) 10:13 的修訂

GitHub

法鼓全集 XML 檔放在 GitHub 上做版本管理,請依照 GitHub 頁面說明做安裝、設定。

XML Global Attributes

@rend

rend="bold"

例如 10-09.xml, p. 74

<emph rend="bold">萬靈蠢蠢</emph>

rend="inline"

例 01-04.xml, p. 179

八卦中的「<figure rend="inline"><graphic url="01-04p161b.gif"/></figure>

@rendition

指定樣式名稱。

該樣式可以是整個法鼓全集都適用的樣式,樣式內容於系統預設值定義。

該樣式也可以是只適用於這本書,則於檔頭 tagsDecl 中以 rendition 元素定義,請參考 #rendition 元素。

例 11-01.xml, p. 21

<p rendition="#h1">壹、名號</p>

@style

屬性值直接放 CSS 語法。

例 01-01.xml, p. 23

<cell cols="5" style="font-weight:bold;text-align:center;">

XML Elements

anchor

用於標示事件的起迄,例如 06-13.xml

<anchor xml:id="a07.14.1"/><date when-iso="2002-12-29" key="j24526382452638">二○○二年十二月二十九日</date><persName key="A023335">聖嚴</persName>自序於美國紐約上州<placeName key="PL000000059890">象岡道場</placeName>正在主持話頭禪十期間<anchor xml:id="a07.14.2"/>

在 back 裡有對應的事件標記:

<span from="#a07.14.1" to="#a07.14.2">
    <link target="A023335 PL000000059890 j24526382452638"/>
</span>

bibl

以 行首資訊格式 連結 CBETA

4-16.xml

<bibl d:target="T51n2076_p0458c26"/>

連結定位到「行」

連到大正藏的某經、某頁、某行, 01-01.xml

<bibl d:target="T51n2076p0196b10">《大正藏》五一冊</bibl>

連到《法鼓全集》01-01.xml

<bibl d:target="MDDC0901p0078lb01">《明末中國佛教の研究》七八頁</bibl>

連結定位到「欄」

01-02.xml

<bibl d:target="T70p0280b">

連結定位到「經」

連到卍續藏的某一經, 01-01.xml

<bibl d:target="X65n1279">《卍續藏》一一四.二一三頁</bibl>

連結定位到「冊」

連到卍續藏的某一冊, 01-01.xml

<bibl d:target="X65">《卍續藏》一一四冊</bibl>

連結到某個範圍

連到大正藏的某個範圍, 01-01.xml

<bibl d:target="T35n1733p0405a21-T35n1733p0405c21">《大正藏》三五.四○五頁上─下</bibl>

04-01.xml

<bibl d:target="X146p0489-p0490">

連到《法鼓全集》某個範圍, 03-01.xml

<bibl d:target="MDDC0101p0056lb01-p0057lb01">《明末中國佛教の研究》五六─五七頁</bibl>


連結多個目標

連結多冊, 01-01.xml

<bibl d:target="X81n1570;X81n1571p;X81n1570">《卍續藏》140,141,142冊</bibl>

連到多個 bibl 的 ID, 01-02.xml

<item n="(B)"><p>《楞伽阿跋多羅寶經》卷四。<bibl xml:id="bibl002009" d:target="T16n0670p0510b04">《大正》一六.五一○頁中</bibl></p></item>
<item n="(C)"><p>原典為:<cit><bibl d:target="bibl002009 bibl002011"/><quote>「如來之藏,是善不善因。」</quote></cit></p></item>
<item n="(D)"><p>《入楞伽經》(<bibl xml:id="bibl002011" d:target="T16n0671p0556b22">《大正》一六.五五六頁中)</bibl>...</p></item>

choice

修訂, 例如 06-02.xml

<choice change="2013-07-31">
  <sic>化成</sic>
  <corr resp="張晴">成化</corr>
</choice><!-- 相關文獻歷史記載,請參閱(http://www.chinalangshan.gov.cn/display.aspx?id=114) -->十六年

cit

citation

包含引文及出處, ex: 10-11.xml, p. 241

<cit>
  <quote><p>佛告颰陀和︰有三昧名十方諸佛悉在前立。……有三昧名定意,菩薩常當守習持,不得復隨餘法,功德中最第一。</p></quote>
  <bibl rend="display:block;text-align:right">〈問事品〉(一卷本第一品)</bibl>
</cit>

date

參考 聖嚴法師專案人事時地標記作業#時間標記

@when-iso

03-05.xml

<date when-iso="1965-09-05" key="j24390092439009">一九六五年九月五日</date>
<date when-iso="1965-01-01" key="j24387622438762">佛滅紀元二五○九年元旦</date>

@from-iso + @to-iso

明確的時間起迄

03-05.xml

<date from-iso="1991-05-17" to-iso="1991-06-25" key="j24483942448433">本(一九九一)年五月十七日起,到六月二十五日</date>
<date from-iso="1989-11-21" to-iso="1989-11-30" key="j24478522447861">去年十一月下旬</date>
<date from-iso="1991-10-11" to-iso="1991-10-31" key="j24485412448561">一九九一年十月中下旬</date>
<date from-iso="1951-03-01" to-iso="1951-03-31" key="j24337072433737">一九五一年三月</date>
<date from-iso="1924-01-01" to-iso="1924-12-31" key="j24237862424151">一九二四年</date>
<date from-iso="1964-01-01" to-iso="1964-12-31" key="j24383962438761">昭和三十九年</date>
<date from-iso="1955-01-01" to-iso="1955-12-31" key="j24351092435473">二十五歲</date>
<date from-iso="1950-01-01" to-iso="1960-12-31" key="j24332832437300">一九五○至一九六○年間</date>

<date from-iso="0601-01-01" to-iso="0700-12-31" key="j19405711977094">西元第七世紀</date>
<date from-iso="0502-05-02" to-iso="0557-11-14" key="j19045331924818">梁代</date>
<date from-iso="1868-01-01" to-iso="1912-07-30" key="j24033332419614">明治時代</date>

某皇帝時代

標該皇帝在位起迄時間

<date from-iso="0712-09-16" to-iso="0756-08-15" key="j19813711997410"><persName key="A000291">唐玄宗</persName>時代</date>
<date from-iso="0593-02-09" to-iso="0628-04-18" key="j19376891950540"><persName key="A023809">推古天皇</persName>時代</date>

@notBefore-iso + @notAfter-iso

大約的時間起迄, 不早於某個時間, 不晚於某個時間

03-05.xml

<date notBefore-iso="1989-01-01" notAfter-iso="1992-04-02" key="j24475282448715">近三年</date>
<date notBefore-iso="1989-06-10" notAfter-iso="1992-06-10" key="j24476882448784">近兩年多</date>
<date notBefore-iso="0835-03-10" notAfter-iso="0907-06-06" key="j20261062052491">唐末</date>
<date notBefore-iso="1575-04-05" notAfter-iso="1644-04-25" key="j22964112321634">明朝末葉</date>
<date notBefore-iso="1644-10-30" notAfter-iso="1711-08-16" key="j23218222346217">清初</date>

某年某月, 不確定哪一天

到了<date notBefore-iso="1985-02-01" notAfter-iso="1985-02-28" key="j24460982446125">一九八五年二月</date>,我又收到俗家大姪兒張裕生的來信

「幾年前」, 根據文意判斷, 該用 from-to, 或 notBefore-notAfter

<date from-iso="1989-01-01" to-iso="1989-12-31" key="j24475282447892">兩年前</date>

例「宋元以降」, notBefore 標宋朝開始時間, notAfter 標文本當時寫作時間(或作者亡年).

例「明末」, 標明朝後四分之一時間. 例「清初」, 標清朝後四分之一時間.

div

@type="ms-ref"

記錄跟本書相關的手稿圖檔, ms-ref 的意思是 Manuscript References

<front>
  <div1 type="ms-ref">
    <p>
      <ref type="syms" target="SYA001812_001"/>
      <ref type="syms" target="SYA002835_001"/>
    </p>
  </div1>
</front>

emph

粗體

例如 10-09.xml, p. 74

<emph rend="bold">萬靈蠢蠢</emph>

figure

插圖

行中插圖

例 01-04.xml, p. 179

八卦中的「<figure rend="inline"><graphic url="01-04p161b.gif"/></figure>

g

缺字

例 02-02.xml

<g ref="#char1"/>

缺字定義在 git 資料夾根目錄 chars.txt

head

@style

如果希望標題出現在目次,但不希望出現在內文,例 11-01.xml:

<head style="display:none">

@type

主標題、副標題, ex: 03-05.xml

<head type="main">序劉國香居士</head><head type="sub">《​​語體文譯大佛頂首楞嚴經》</head>

item

@n

03-05.xml

<list type="ordered">
  <item n="(一)"><p>知識較高者...</p></item>
  <item n="(二)"><p>有一輩好求奇蹟的人...</p></item>
</list>

lb

強迫換行, ex: 01-02.xml

<lb break="yes"/>


note

章節後的註

place="end"

一個註裏面有多個 p 的情況,例如:01-02.xml 《大乘止觀法門之研究》

<lb n="014410"/>
<note n="註四" place="end" id="note014404">
<p>《如來藏經》,《大正》一六.四六一─四六四頁。</p>
<p rend="text-indent:2em">《法華經》,《大正》九.一二─一九、二九頁。</p>
<p rend="text-indent:2em">勝又俊教博士著《佛教における心識說の研究》六○四頁。</p>
<p>《望月佛教大辭典》四一四三頁中─下。</p>
</note>

quote

多段落引文

quote 包多個 p, 例如 10-11.xml

<quote>
  <p>佛告阿難及韋提希:見此事已,次當想佛。....是故應當一心繫念,諦觀彼佛多陀阿伽度阿羅訶三藐三佛陀。</p>
  <p>想彼佛者,先當想像....見如此事,極令明了,如觀掌中。</p>
  <p>見此事已,復當更作一大蓮花在佛左邊....諸蓮花上各有一佛二菩薩像,遍滿彼國。</p>
  <p>此想成時....於現身中,得念佛三昧。</p>
</quote>

p

@rendition

例如 《佛陀的勇士們》緬甸禪師會用一些詩偈,來幫助聽眾記住禪修實踐的一些原則。

<p rendition="motto">自然地呼吸,心固定在腹部上下。</p>

轉成 HTML:

<p class="motto">自然地呼吸,心固定在腹部上下。</p>

實際的樣式另外在樣式檔 tzungkuen.css 裡指定.

ref

target

連結到章節未註解,ex: 05-04.xml:

...作一番綜合的介紹而已<ref target="note013401">(註一)。</ref>...
<note n="註一" xml:id="note013401" place="end">...</note>

type="person"

<ref type="person" target="A023335"></ref>這次回大陸訪問

type="place"

<ref type="place" target="PL​​000000023647 PL000000023643">

type="syms"

連結到聖嚴師父手稿,Ex: 06-02.xml:

<ref type="syms" target="SYA001803_001"/>

rendition

定義本 XML 文件中適用的樣式。參考 Global Attributes 中的 #@rendition 屬性。

例 11-01.xml

<tagsDecl>
  <rendition xml:id="h1" scheme="css">text-indent:0;font-weight:bold;font-size:2em;</rendition>
  <rendition xml:id="h2" scheme="css">text-indent:4em;font-weight:bold;font-size:1.5em;</rendition>
  <rendition xml:id="h3" scheme="css">text-indent:0em;font-weight:bold;font-size:1.4em;</rendition>
  <rendition xml:id="h4" scheme="css">text-indent:0em;font-weight:bold;font-size:1.2em;</rendition>
  <rendition xml:id="bb" scheme="css">text-indent:0;font-weight:bold;</rendition>
</tagsDecl>

title

@xml:lang

03-05.xml

<title xml:lang="eng">Series of the chung-Hwa Institute of Buddhist Studies</title>

10-15.xml

<title xml:lang="en">Song of Mind</title> 是我交由美國佛教界知名的香巴拉﹙Shambhala﹚出版社的第一本英文書