-
Notifications
You must be signed in to change notification settings - Fork 4
/
636.txt
75 lines (66 loc) · 6 KB
/
636.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
[3] [[XML宣言]]の [CODE(XML)[[[version]]]] のように、[[要素]]の[[属性]]
[WEAK[([[開始タグ]]に記述されるもの。)]]
以外で[[属性指定]]のような構文で記述されるものを、
[DFN[[RUBYB[擬似属性][pseudo attribute]]]]と呼んでいます。
[1]
そろそろ擬似属性型[[処理指令]]の共通規格を作ってもらえませんかね?
ものによって構文ばらばらで面倒臭い。 (文字参照が使えるかどうかとか。)
[2] 擬似属性型 XML 処理指令:
,[[対象名]] ,説明 ,擬似属性以外の内容,参照,属性の順序,備考
,[CODE(XML)[[[access-control]]]],[[DOM]] access 制御,なし,使用不可,あり,XML より構文的制限が厳しい
,[CODE(XML)[[[AdobeSVGViewer]]]],[[Adobe SVG Viewer]] 制御,なし,不明,不明
,[CODE(XML)[[[bml]]]],[[BML]] 宣言,不明,不明,不明
,[CODE(XML)[[[cocoon-process]]]],,なし,不明,不明
,[CODE(XML)@en[[[diffmk]]]],[[diffmk]]
,[CODE(XML)[[[doc]]]],,あり,不明,不明
,[CODE(XML)@en[[[http]]]],[CODE(HTMLe)@en[[[meta]]]] [CODE(HTMLa)@en[[[http-equiv]]]] のようなもの,なし,不明,1つだけ?,[[mod_xml_meta]]
,[CODE(XML)[[[IS10744]]]],[[ISO/IEC 10744]] [[体系]]など,あり,あり (詳細不明),なし
,[CODE(XML)[[[job]]]],[[Windows Script]] job,なし,不明,不明
,[CODE(XML)[[[mde-toc]]]],[[目次]],なし,不明,不明,
,[CODE(XML)@en[[[microsummary]]]],[[マイクロ要約]],なし,不明,不明
,[CODE(XML)[[[MSSQLError]]]],MS SQL 鯖誤り報告,なし,不明,不明,
,[CODE(XML)[[[mso-application]]]],[[Microsoft Office]] の情報,なし,不明,不明
,[CODE(XML)[[[mso-infoPathSolution]]]],[[InfoPath]] の情報,なし,不明,不明
,[CODE(XML)[[[oasis-xml-catalog]]]],[[型録]]参照,なし,不明,1擬似属性のみ,正確な規定なし
,[CODE(XML)@en[[[oxygen ]]]],,なし,不明,不明,
,[CODE(XML)[[[rfc]]]],[[RFC 2629]] 文書処理情報,なし,使用不可,1処理指令あたり1擬似属性,正式な規定なし
,[CODE(XML)[[[rfc-translation]]]],[[RFC 2629]] 文書処理情報,なし,使用不可,1処理指令あたり1擬似属性,正式な規定なし
,[CODE(XML)@en[[[wsx]]]]
,[CODE(XML)[[[XA_DOC_PREFS]]]],,,不明,不明
,[CODE(XML)@en[[[adobe-xap-filters]]]]
,[CODE(XML)@en[[[xbl]]]],[[XBL 2.0]][[束縛]],なし,あり,なし,[[W3C]] [[CR]],[[XBL 2.0]]
,[CODE(XML)@en[[[xfa]]]],,なし,不明,不明,[[Adobe]] 仕様,[[XFA]]
,[CODE(XML)[[[xml]]]],[[XML宣言]]・[[文宣言]],なし,使用不可,あり,XML 的には処理指令ではない
,[CODE(XML)[[[xml-logicsheet]]]],XML 論理シート参照,なし,不明,不明,正式な規定が不明
,[CODE(XML)[[[xml-stylesheet]]]],[[スタイル・シート]]参照,なし,[[文字参照]]・[[定義済実体参照]],なし
,[CODE(XML)[[[xml2-stylesheet]]]],[[スタイル・シート]]参照?,なし?,[[文字参照]]・[[定義済実体参照]]?,なし?
,[CODE(XML)@en[[[xpacket]]]]
,[CODE(XML)@en[[[xslt-param]]]]
,[CODE(XML)@en[[[xslt-param-namespace]]]]
,[CODE(XML)[[[xul-overlay]]]],[[XUL]] 重合せ,なし,不明,1擬似属性のみ?,
,[CODE(XML)@en[[[xv]]]],[[XHTML+Voice]],なし,不明,1[[擬似属性]]のみ
* 構文解析
[4] [[擬似属性]]の解釈の方法は [CODE(XML)@en[[[xml-stylesheet]]]] [[処理指令]]の仕様書で規定されています。
仕様上これは[DFN[[RUBYB[文字列から擬似属性を構文解析する規則]@en[rules for parsing pseudo-attributes from a string]]]]と呼ばれています。
その[DFN[[RUBYB[構文解析結果]@en[parsing result]]]]は、「[[擬似属性]]の[[集合]]」または「[RUBYB[[[誤り]]]@en[error]]」です。
** 仕様書
- [5] [CITE@en[Associating Style Sheets with XML documents 1.0 (Second Edition)]] ([TIME[2010-10-28 23:13:17 +09:00]] 版) <http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#pseudo-attributes>
** 定義
- [6] 与えられた[[文字列]]が [CODE(ABNF)@en[[[PseudoAtts]]]] [[生成規則]]に[[一致]]しなければ、[[構文解析結果]]は[[誤り]]です。
- [7] [CODE(ABNF)@en[[[PseudoAtts]]]] に[[一致]]した[[文字列]]の中で [CODE(ABNF)@en[[[PseudoAtt]]]] [[生成規則]]に[[一致]]する部分が[DFN[[RUBYB[擬似属性]@en[pseudo-attribute]]]]を表します。[[擬似属性]]には[[名前]]と[[値]]があります。
- [8] [CODE(ABNF)@en[[[PseudoAtt]]]] に[[一致]]した[[文字列]]の中で [CODE(ABNF)@en[[[Name]]]] [[生成規則]] ([[XML 1.0]]) に[[一致]]した[[文字列]]は[[擬似属性]]の[[名前]]を表します。
- [9] [CODE(ABNF)@en[[[PseudoAtt]]]] に[[一致]]した[[文字列]]の中で [CODE(ABNF)@en[[[PseudoAttValue]]]] に[[一致]]した[[文字列]]は[[擬似属性]]の[[値]]を表します。
-- [10] [CODE(ABNF)@en[[[CharRef]]]] [[生成規則]] ([[XML 1.0]]) に[[一致]]した[[文字列]]は、[[XML]] においてそれが表す[[文字]]によって置換します。
--- [13] ただし、[CODE(ABNF)@en[[[CharRef]]]] が[[整形式制約]]「[RUBYB[[[合法文字]]]@en[Legal Character]]」に違反する場合は[[構文解析結果]]は[[誤り]]です。
-- [11] [CODW(ABNF)@en[[[PredefEntityRef]]]] [[生成規則]]に[[一致]]した[[文字列]]は、それが表す[[文字列]]によって置換します。 (これは[[XML]]の[[定義済実体]]と同じです。)
-- [12] 最初と最後の[[引用符]]を除去します。
- [14] [[名前]]が同じ[[擬似属性]]があれば、[[構文解析結果]]は[[誤り]]です。
- [15] [[構文解析結果]]が[[誤り]]でない場合、 [CODE(ABNF)@en[[[PseudoAtts]]]] [[生成規則]]に[[一致]]する[[文字列]]によって表される[[擬似属性]]の[[集合]]が[[構文解析結果]]です。
[16]
>
[PRE(ABNF code)[
[1a] PseudoAtts ::= PseudoAtt? (S PseudoAtt)* S?
[2] PseudoAtt ::= Name S? "=" S? PseudoAttValue
[3] PseudoAttValue ::= ('"' ([^"<&] | CharRef | PredefEntityRef)* '"' | "'" ([^'<&] | CharRef | PredefEntityRef)* "'")
[4] PredefEntityRef ::= "&" | "<" | ">" | """ | "'"
]PRE]