美好的一天!XSLT2不區分大小寫的正則表達式
這是我第一次在這裏發佈一個問題,所以請耐心等待。
我有在如何使匹配不敏感的情況下,一個問題,我想補充的標誌,但不知道這是正確的地方插旗子,因爲我仍然代碼似乎不區分大小寫。
預先感謝您分享您的想法,我可以如何解決這個問題。
--elmer
我做編輯這個帖子添加更多的代碼我做了和任何一個源XML文件的樣品要進行測試。索引條目列表上
基地我需要搜索從源XML每一個項目進行搜索,並且必須是不區分大小寫。例如,如果搜索單詞「縮寫」,所有單詞「縮寫詞或縮寫詞」必須在縮寫或縮寫詞旁邊有錨元素。
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" xmlns:saxon="http://saxon.sf.net/"
xmlns:ati="http://www.asiatype.com/Functions" exclude-result-prefixes="#all">
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!-- create variable for EALL_Index-->
<xsl:variable name="index" as="element() +">
<xsl:for-each select="for $doc in document('EALL_Index_test.xml') return $doc/descendant::item">
<xsl:sort select="string-length(normalize-space(text()[1]))" order="descending"/>
<list>
<entry>
<xsl:variable name="itemString">
<xsl:analyze-string select="text()[1]" regex="(\[)|(\])|(\()|(\))">
<xsl:matching-substring>
<xsl:value-of select="replace(regex-group(1),'\[','\\[')"/>
<xsl:value-of select="replace(regex-group(2),'\]','\\]')"/>
<xsl:value-of select="replace(regex-group(3),'\(','\\(')"/>
<xsl:value-of select="replace(regex-group(4),'\)','\\)')"/>
</xsl:matching-substring>
<xsl:non-matching-substring>
<xsl:value-of select="."/>
</xsl:non-matching-substring>
</xsl:analyze-string>
</xsl:variable>
<xsl:value-of select="normalize-space($itemString)"/>
</entry>
<xsl:for-each select="link">
<link target="{@targets}" id="{@n}">
</link>
</xsl:for-each>
</list>
</xsl:for-each>
</xsl:variable>
<xsl:template match="text()[ancestor::*[self::simplearticle or self::complexarticle]]">
<xsl:variable name="id" as="xs:string" select="current()/ancestor::*[self::simplearticle or self::complexarticle]/@id"/>
<xsl:variable name="srchString" as="xs:string" select="."/>
<xsl:choose>
<xsl:when test="some $term in $index[link/@target=$id]/entry satisfies matches($srchString, concat('(^|\W)(',$term, '[s]?)($|\W)'))">
<xsl:message select="concat('(^|\W)(',string-join($index[link/@target=$id]/entry, '[s]?|'), ')($|\W)')"/>
<xsl:analyze-string select="$srchString" regex="{concat('(^|\W)(',string-join($index[link/@target=$id]/entry, '[s]?|'), ')($|\W)')}">
<xsl:matching-substring>
<xsl:value-of select="regex-group(1)"/>
<xsl:for-each select="$index[matches(regex-group(2), concat('(^|\W)(',entry, '[s]?)($|\W)'))]/link[@target=$id]">
<xsl:if test="matches($srchString, concat('(^|\W)(',entry, '[s]?)($|\W)'))">
<anchor target="{@target}" id="{@id}"/>
</xsl:if>
</xsl:for-each>
<xsl:value-of select="regex-group(2)"/>
<xsl:value-of select="regex-group(3)"/>
</xsl:matching-substring>
<xsl:non-matching-substring>
<xsl:value-of select="."/>
</xsl:non-matching-substring>
</xsl:analyze-string>
</xsl:when>
<xsl:otherwise>
<xsl:sequence select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
索引條目源XML:搜索
<div2 id="EALL-index">
<head>EALL3 Index</head>
<art><simplearticle id="SIM-INDEX" entry="" volume="" page="">
<pseudoarticle>
<articleentry><mainentry>Index of Terms</mainentry></articleentry></pseudoarticle><list>
<item>Abbreviation <link type="eall" targets="SIM-0002" n="idx-abbreviation-01">Abbreviations</link>, <link type="eall" targets="SIM-0021" n="idx-abbreviation-02">Compounds</link>, <link type="eall" targets="COM-vol3-0192" n="idx-abbreviation-03">Lexicography: Monolingual Dictionaries</link>, <link type="eall" targets="COM-vol3-0276" n="idx-abbreviation-04">Punctuation</link></item>
</list></simplearticle></art></div2>
源XML:
<?xml version="1.0" encoding="UTF-8"?>
<art>
<simplearticle id="SIM-0002" entry="Abbreviations" volume="1" page="1:1a" sortcode="abbreviations">
<pseudoarticle>
<articleentry>
<mainentry>Abbreviations</mainentry>
</articleentry>
<p>Generally speaking, there are four main categories of abbreviations encountered in Arabic texts:</p>
<p>
<list>
<label>i.</label>
<item>i. Suspensions: abbreviation by truncation of the letters at the end of the word, e.g. المصـ = <hi rend="italic">al-muṣannif</hi>. Perhaps the most interesting here is the case of suspensions that look like, or were considered by some to be, numerals. To this category belong the signs that resemble the numerals ۲ and ٣, but which may represent the unpointed <hi rend="italic">tāʾ</hi> and <hi rend="italic">šīn</hi> (for <hi rend="italic">tamām</hi> and <hi rend="italic">šarḥ</hi>) when used in conjunction with marginal glosses.</item>
<label>ii.</label>
<item>ii. Contractions: abbreviating by means of omitting some letters in the middle of the word, but not the beginning or the ending, e.g. قه (<hi rend="italic">qawlu-hu</hi>).</item>
<label>iii.</label>
<item>iii. Sigla: using one letter to represent the whole word, e.g. م (<hi rend="italic">matn</hi>).</item>
<label>iv.</label>
<item>iv. Abbreviation symbols: symbols in the form of logographs used for whole words. A typical abbreviation symbol is the horizontal stroke (sometimes hooked at the end) which represents the word <hi rend="italic">sana</hi> ‘year’. Another example is the ‘two teeth stroke’ (which looks like two unpointed <hi rend="italic">bā</hi>'s), which represents the word قف ‘stop’, or the suspension فتـ (for <hi rend="italic">fa-taʾammal-hu/hā</hi> ‘reflect on it’), used in manuscripts for notabilia or side-heads.</item>
</list>
</p>
<p>Closely connected with these abbreviations is a contraction of a group of words into one ‘portmanteau’ word (<hi rend="italic">naḥt</hi>; <xref target="SIM-0021">compounds</xref>), for instance <hi rend="italic">basmala</hi> (<hi rend="italic">bi-sm Allāh</hi>) <hi rend="italic">ḥamdala</hi> (<hi rend="italic">al-ḥamdu li-llāh</hi>) and <hi rend="italic">ṣalwala</hi> (<hi rend="italic">ṣallā llāh ʿalayhi</hi>). To all intents and purposes, the word <hi rend="italic">naḥt</hi> corresponds to an acronym, i.e. a word formed from the abbreviation of, in most cases, the initial letters of each word in the construct. Most of these constructs are textual and pious formulae. Apart from <hi rend="italic">basmala, ḥamdala</hi>, and <hi rend="italic">ṣalwala</hi>, we encounter <hi rend="italic">ṭalbaqa</hi> (<hi rend="italic">ṭāla llāh baqāʾa-hu</hi>), <hi rend="italic">ḥawqala</hi> or <hi rend="italic">ḥawlaqa</hi> (<hi rend="italic">lā ḥawla wa-lā quwwata ʾillā bi-llāh</hi>), <hi rend="italic">ṣalʿama</hi> (a synonym of <hi rend="italic">ṣalwala</hi>), <hi rend="italic">ḥasbala</hi> (<hi rend="italic">ḥasbunā allāh</hi>), <hi rend="italic">mašʾala</hi> (<hi rend="italic">mā šāʾa llāh</hi>), <hi rend="italic">sabḥala</hi> (<hi rend="italic">subḥāna llāh</hi>), and <hi rend="italic">ḥayʿala</hi> (<hi rend="italic">ḥayya ʿalā ṣ-ṣalāt</hi>) (as-Samarrā'ī 1987; Gacek 2001).</p>
<p>Abbreviations, especially contractions and sigla, may be (and often are) accompanied by a horizontal stroke (<hi rend="italic">tilde</hi>) placed above them. This mark may resemble the <hi rend="italic">madda</hi> but has nothing to do with the latter's function in Arabic script. Suspensions, on the other hand, were indicated by a long downward stroke, a mark that is very likely to have been borrowed from Greek and Latin paleographic practice.</p>
<p>The use of abbreviations was quite popular among Muslim scholars, although originally some of the abbreviations, such as those relating to the prayer for the Prophet (<hi rend="italic">taṣliya, ṣalwala</hi>), were disapproved of. In the manuscript age, abbreviations were extensively used, not only in the body of the text but also in marginalia, ownership statements, and in the primitive critical apparatus (Ben Cheneb 1920; Maḥfūẓ 1964).</p>
<p>Medieval scholars could not always agree on the meaning of some of the abbreviations used in manuscripts. The letter ح, for instance, which is used to separate one <hi rend="italic">ʾisnād</hi> from another, was thought by some to stand for <hi rend="italic">ḥāʾil</hi> or <hi rend="italic">ḥaylūla</hi> ‘separation’ and by others for <hi rend="italic">ḥadīṯ</hi> and even <hi rend="italic">ṣaḥḥa</hi>. Some scholars even thought that the letter <hi rend="italic">ḥāʾ</hi> should be pointed (خ – <hi rend="italic">xāʾ muʿjama</hi>) to stand for <hi rend="italic">ʾisnād ʾāxar</hi> ‘another <hi rend="italic">ʾisnād</hi>’. The contemporary scholar may face a similar dilemma (see e.g. Alič 1976).</p>
<p>Abbreviations in manuscripts are often unpointed and appear sometimes in the form of word-symbols (logographs). Here, the context, whether textual or geographical, is of great importance. Thus, for instance, what appears to be the letter ط may in fact be a ظ, and what appears to be an <hi rend="italic">ʿayn</hi> or <hi rend="italic">ayn</hi>, in its initial (عـ) or isolated form (ع), may actually be an unpointed <hi rend="italic">nūn</hi> or <hi rend="italic">xāʾ</hi> (for <hi rend="italic">nusxa ʾuxrā</hi> ‘another copy’). Similarly, the same word or abbreviation can have two different functions and/or meanings. For example, the words <hi rend="italic">ḥāšiya</hi> and <hi rend="italic">fāʾida</hi> can stand for a gloss or a side-head (‘nota bene’), while the ص or صـ can be an abbreviation of <hi rend="italic">ṣaḥḥa</hi> (when used for an omission/ insertion or evident correction) or <hi rend="italic">ʾaṣl</hi> (the body of the text), or it can stand for <hi rend="italic">ḍabba</hi> ‘door-bolt’, a mark indicating an uncertain reading and having, for all intents and purposes, the function of a question mark or ‘sic’. Also, the abbreviation ن may stand for <hi rend="italic">bayān</hi> ‘explanation’ or <hi rend="italic">nusxa ʾuxrā</hi>; the latter is often found in manuscripts of Persian/ Indian provenance.</p>
<p>The earliest use of abbreviations in the Arabic language is probably connected with its orthography and possibly the ‘mysterious letters’ (<hi rend="italic">al-ḥurūf al-muqaṭṭaʿa</hi>) at the beginning of some chapters of the <hi rend="italic">Qurʾān</hi> (Bellamy 1973). In terms of orthography, for instance, the initial form of <hi rend="italic">jīm</hi> (جـ) or <hi rend="italic">mīm</hi> (مـ) was regarded by some scholars as an abbreviation of <hi rend="italic">jazma</hi>. Furthermore, the unpointed initial form of <hi rend="italic">šīn</hi> (سـ) was used for <hi rend="italic">tašdīd</hi> (or <hi rend="italic">šadda</hi>), and the initial form of <hi rend="italic">ṣād</hi> (صـ) was thought to represent <hi rend="italic">waṣla</hi> (or <hi rend="italic">ṣila</hi>) (Wright 1967:13–14, 19; Gacek 2001:23).</p>
<p>Most of the abbreviations are found in the body of the text. They were introduced in order to speed up the process of transcription and their usage varied according to the subject or type of a given work. Abbreviations can be found in almost all types of works, but especially in compositions on the recitation of the <hi rend="italic">Qurʾān</hi>, compilation and criticism of <hi rend="italic">Ḥadīṯ</hi>, philosophy, lexicography, poetry, genealogy, biography, and astronomy. The lists of these are often included in prefaces and frequently concern either the names of authors or titles of compositions. In addition, we find didactic poems that were composed specifically in order to help memorize given sets of abbreviations (see, e.g., ʿAlawān 1972). They are especially common in works on <hi rend="italic">Ḥadīṯ</hi> and jurisprudence (both Sunni and Shiʿi) (al-Māmaqānī 1992; aẓ-Zufayrī 2002), and although some abbreviations were standardized, most were specific to a given work. Among the commonly used abbreviations for major <hi rend="italic">Ḥadīṭ</hi> compilations are: خ (al-Buxārī), م (Muslim or Mālik), د (ʾAbū Dāʾūd), ت (at-Tirmiḏī), ك (Mālik), ه (ʾAbū Ḏarr or Ibn Māja), ن or س (an-Nasāʾī), and the like (Gacek 1989:56).</p>
</pseudoarticle>
</simplearticle>
</art>
輸出示例:
<art>
<simplearticle id="SIM-0002" entry="Abbreviations" volume="1" sortcode="abbreviations" page="1:1a">
<pseudoarticle>
<articleentry>
<mainentry><anchor target="SIM-0002" id="idx-abbreviation-01"/>Abbreviations</mainentry>
</articleentry>
<p>Generally speaking, there are four main categories of <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviations encountered in Arabic texts:</p>
<p>
<list type="simple" TEIform="list">
<label TEIform="label">i.</label>
<item TEIform="item">i. Suspensions: <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviation by truncation of the letters at the end of the word, e.g. المصـ = <hi rend="italic">al-muṣannif</hi>. Perhaps the most interesting here is the case of suspensions that look like, or were considered by some to be, numerals. To this category belong the signs that resemble the numerals ۲ and ٣, but which may represent the unpointed <hi rend="italic">tāʾ</hi> and <hi rend="italic">šīn</hi> (for <hi rend="italic">tamām</hi> and <hi rend="italic">šarḥ</hi>) when used in conjunction with marginal glosses.</item>
<label TEIform="label">ii.</label>
<item TEIform="item">ii. Contractions: abbreviating by means of omitting some letters in the middle of the word, but not the beginning or the ending, e.g. قه (<hi rend="italic">qawlu-hu</hi>).</item>
<label TEIform="label">iii.</label>
<item TEIform="item">iii. Sigla: using one letter to represent the whole word, e.g. م (<hi rend="italic">matn</hi>).</item>
<label TEIform="label">iv.</label>
<item TEIform="item">iv. Abbreviation symbols: symbols in the form of logographs used for whole words. A typical <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviation symbol is the horizontal stroke (sometimes hooked at the end) which represents the word <hi rend="italic">sana</hi> ‘year’. Another example is the ‘two teeth stroke’ (which looks like two unpointed <hi rend="italic">bā</hi>'s), which represents the word قف ‘stop’, or the suspension فتـ (for <hi rend="italic">fa-taʾammal-hu/hā</hi> ‘reflect on it’), used in manuscripts for notabilia or side-heads.</item>
</list>
</p>
<p>Closely connected with these <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviations is a contraction of a group of words into one ‘portmanteau’ word (<hi rend="italic">naḥt</hi>; <xref target="SIM-0021">compounds</xref>), for instance <hi rend="italic">basmala</hi> (<hi rend="italic">bi-sm Allāh</hi>) <hi rend="italic">ḥamdala</hi> (<hi rend="italic">al-ḥamdu li-llāh</hi>) and <hi rend="italic">ṣalwala</hi> (<hi rend="italic">ṣallā llāh ʿalayhi</hi>). To all intents and purposes, the word <hi rend="italic">naḥt</hi> corresponds to an <anchor target="SIM-0002" id="idx-acronym-01"/>acronym, i.e. a word formed from the <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviation of, in most cases, the initial letters of each word in the construct. Most of these constructs are textual and pious formulae. Apart from <hi rend="italic">basmala, ḥamdala</hi>, and <hi rend="italic">ṣalwala</hi>, we encounter <hi rend="italic">ṭalbaqa</hi> (<hi rend="italic">ṭāla llāh baqāʾa-hu</hi>), <hi rend="italic">ḥawqala</hi> or <hi rend="italic">ḥawlaqa</hi> (<hi rend="italic">lā ḥawla wa-lā quwwata ʾillā bi-llāh</hi>), <hi rend="italic">ṣalʿama</hi> (a synonym of <hi rend="italic">ṣalwala</hi>), <hi rend="italic">ḥasbala</hi> (<hi rend="italic">ḥasbunā allāh</hi>), <hi rend="italic">mašʾala</hi> (<hi rend="italic">mā šāʾa llāh</hi>), <hi rend="italic">sabḥala</hi> (<hi rend="italic">subḥāna llāh</hi>), and <hi rend="italic">ḥayʿala</hi> (<hi rend="italic">ḥayya ʿalā ṣ-ṣalāt</hi>) (as-Samarrā'ī 1987; Gacek 2001).</p>
<p><anchor target="SIM-0002" id="idx-abbreviation-01"/>Abbreviations, especially contractions and sigla, may be (and often are) accompanied by a horizontal stroke (<hi rend="italic">tilde</hi>) placed above them. This mark may resemble the <hi rend="italic">madda</hi> but has nothing to do with the latter's function in Arabic script. Suspensions, on the other hand, were indicated by a long downward stroke, a mark that is very likely to have been borrowed from Greek and Latin paleographic practice.</p>
<p>The use of <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviations was quite popular among Muslim scholars, although originally some of the <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviations, such as those relating to the prayer for the Prophet (<hi rend="italic">taṣliya, ṣalwala</hi>), were disapproved of. In the manuscript age, <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviations were extensively used, not only in the body of the text but also in marginalia, ownership statements, and in the primitive critical apparatus (Ben Cheneb 1920; Maḥfūẓ 1964).</p>
<p>Medieval scholars could not always agree on the meaning of some of the <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviations used in manuscripts. The letter ح, for instance, which is used to separate one <hi rend="italic">ʾisnād</hi> from another, was thought by some to stand for <hi rend="italic">ḥāʾil</hi> or <hi rend="italic">ḥaylūla</hi> ‘separation’ and by others for <hi rend="italic">ḥadīṯ</hi> and even <hi rend="italic">ṣaḥḥa</hi>. Some scholars even thought that the letter <hi rend="italic">ḥāʾ</hi> should be pointed (خ – <hi rend="italic">xāʾ muʿjama</hi>) to stand for <hi rend="italic">ʾisnād ʾāxar</hi> ‘another <hi rend="italic">ʾisnād</hi>’. The contemporary scholar may face a similar dilemma (see e.g. Alič 1976).</p>
<p><anchor target="SIM-0002" id="idx-abbreviation-01"/>Abbreviations in manuscripts are often unpointed and appear sometimes in the form of word-symbols (logographs). Here, the context, whether textual or geographical, is of great importance. Thus, for instance, what appears to be the letter ط may in fact be a ظ, and what appears to be an <hi rend="italic">ʿayn</hi> or <hi rend="italic">ayn</hi>, in its initial (عـ) or isolated form (ع), may actually be an unpointed <hi rend="italic">nūn</hi> or <hi rend="italic">xāʾ</hi> (for <hi rend="italic">nusxa ʾuxrā</hi> ‘another copy’). Similarly, the same word or <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviation can have two different functions and/or meanings. For example, the words <hi rend="italic">ḥāšiya</hi> and <hi rend="italic">fāʾida</hi> can stand for a gloss or a side-head (‘nota bene’), while the ص or صـ can be an <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviation of <hi rend="italic">ṣaḥḥa</hi> (when used for an omission/ insertion or evident correction) or <hi rend="italic">ʾaṣl</hi> (the body of the text), or it can stand for <hi rend="italic">ḍabba</hi> ‘door-bolt’, a mark indicating an uncertain reading and having, for all intents and purposes, the function of a question mark or ‘sic’. Also, the <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviation ن may stand for <hi rend="italic">bayān</hi> ‘explanation’ or <hi rend="italic">nusxa ʾuxrā</hi>; the latter is often found in manuscripts of Persian/ Indian provenance.</p>
<p>The earliest use of <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviations in the Arabic language is probably connected with its orthography and possibly the ‘mysterious letters’ (<hi rend="italic">al-ḥurūf al-muqaṭṭaʿa</hi>) at the beginning of some chapters of the <hi rend="italic">Qurʾān</hi> (Bellamy 1973). In terms of orthography, for instance, the initial form of <hi rend="italic">jīm</hi> (جـ) or <hi rend="italic">mīm</hi> (مـ) was regarded by some scholars as an <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviation of <hi rend="italic">jazma</hi>. Furthermore, the unpointed initial form of <hi rend="italic">šīn</hi> (سـ) was used for <hi rend="italic">tašdīd</hi> (or <hi rend="italic">šadda</hi>), and the initial form of <hi rend="italic">ṣād</hi> (صـ) was thought to represent <hi rend="italic">waṣla</hi> (or <hi rend="italic">ṣila</hi>) (Wright 1967:13–14, 19; Gacek 2001:23).</p>
<p>Most of the <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviations are found in the body of the text. They were introduced in order to speed up the process of transcription and their usage varied according to the subject or type of a given work. Abbreviations can be found in almost all types of works, but especially in compositions on the recitation of the <hi rend="italic">Qurʾān</hi>, compilation and criticism of <hi rend="italic">Ḥadīṯ</hi>, philosophy, lexicography, poetry, genealogy, biography, and astronomy. The lists of these are often included in prefaces and frequently concern either the names of authors or titles of compositions. In addition, we find didactic poems that were composed specifically in order to help memorize given sets of <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviations (see, e.g., ʿAlawān 1972). They are especially common in works on <hi rend="italic">Ḥadīṯ</hi> and jurisprudence (both Sunni and Shiʿi) (al-Māmaqānī 1992; aẓ-Zufayrī 2002), and although some <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviations were standardized, most were specific to a given work. Among the commonly used <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviations for major <hi rend="italic">Ḥadīṭ</hi> compilations are: خ (al-Buxārī), م (Muslim or Mālik), د (ʾAbū Dāʾūd), ت (at-Tirmiḏī), ك (Mālik), ه (ʾAbū Ḏarr or Ibn Māja), ن or س (an-Nasāʾī), and the like (Gacek 1989:56).</p>
<p>Specific to <hi rend="italic">Ḥadīṯ</hi> literature are other <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviations connected with the frequent repetitions of such expressions as <hi rend="italic">ḥaddaṯ anā, ʾaxbaranā</hi>, and <hi rend="italic">ʾanbaʾanā</hi>, which were commonly abbreviated as: دثنا ,ثنا ,نا (<hi rend="italic">ḥaddaṯ anā</hi>); ابنا ,ارنا ,انا (<hi rend="italic">ʾaxbaranā</hi>); ق ثنا ,قثنا (<hi rend="italic">qāla ḥaddaṯ anā</hi>). The transition from one <hi rend="italic">ʾisnād</hi> to another, as mentioned above, was marked with ح (<hi rend="italic">ḥāʾil, taḥwīl, ḥaylula, ḥadīṯ</hi> or <hi rend="italic">ṣaḥḥa</hi>) (Gacek 1989:56), and for the evaluation of <hi rend="italic">ḥadīṯ</hi>s the following <anchor target="SIM-0002" id="idx-abbreviation-01"/>abbreviations were used:ض (<hi rend="italic">ḍaʿīf</hi>), صح (<hi rend="italic">ṣaḥīḥ</hi>), ح (<hi rend="italic">ḥasan</hi>); م (<hi rend="italic">majhūl</hi>), مو (<hi rend="italic">muwāfiq</hi> or <hi rend="italic">mawqūf</hi>), قف (<hi rend="italic">mawqūf</hi>); ق (<hi rend="italic">muwaṭṭaq</hi> or <hi rend="italic">muttafaq ʿalayhi</hi>), ل (<hi rend="italic">mursal</hi>) (e.g. Gacek 1985:xiv, 96).</p>
</pseudoarticle>
</simplearticle>
它不能傷害,以顯示你試圖實現(供應輸入和預期產出)。我有這樣的感覺,它可以用更簡單直觀的方式完成。 – Maestro13 2012-03-09 07:08:24
根據您的要求,我用樣本XML和樣本輸出對我的帖子進行了編輯。希望它現在讓我清楚。再次感謝。 – rhemb 2012-03-09 08:08:51
這裏有更多的代碼來說明問題,難道你不能更簡潔地解釋它嗎?在諸如replace()和matches()之類的XPath函數中,有一個「flags」參數,您可以將其設置爲「i」以進行與個案無關的匹配。你不能在正則表達式本身中包含標誌。 – 2012-03-09 08:29:03