<cRefPattern>

<cRefPattern> (定義如何將權威參照轉換成URI。) 標明將權威參照轉換成URI的表示方法與取代模式。 2.3.5.3 Milestone Method 2.3.5 The Reference System Declaration 2.3.5.2 Search-and-Replace Method
組件header — 2 The TEI Header
屬性
matchPattern標明一個表示屬性cRef的屬性值的固定方法。
狀態 必備的
資料類型
data.pattern
must be a regular expression according to the W3C XML Schema Language
Parenthesised groups are used not only for establishing order of precedence and atoms for quantification, but also for creating subpatterns to be referenced by the replacementPattern attribute.
replacementPattern標明一個‘取代模式’,一但實行替代模式進行代換,會自動提供URI 。
狀態 必備的
資料類型
text
Should be the skeleton of a relative or absolute URI, with references to groups in the matchPattern.
The strings ‘$1’ through ‘$9’ are references to the corresponding group in the regular expression specified by matchPattern (counting open parenthesis, left to right). Processors are expected to replace them with whatever matched the corresponding group in the regular expression.
If a digit preceded by a dollar sign is needed in the actual replacement pattern (as opposed to being used as a back reference), the dollar sign must be written as %24.
屬於refsDecl
可包含
core: p
linking: ab
宣告
element cRefPattern
{
   att.global.attributes,
   attribute matchPattern { data.pattern },
   attribute replacementPattern { text },
   model.pLike*
}
例子
<cRefPattern
  matchPattern="([1-9A-Za-z]+)\s+([0-9]+):([0-9]+)"
  replacementPattern=" "/>
The result of the substitution may be either an absolute or a relative URI reference. In the latter case it is combined with the value of xml:base in force at the place where the cRef attribute occurs to form an absolute URI in the usual manner as prescribed by XML Base.