探したけど無いからDTDから作った。
@classは正確には、最後に半角スペースが入るから気を付けること。
使用したDTDは
http://docs.oasis-open.org/dita/v1.2/os/dtd1.2/
要素 | @class |
---|---|
alt | - topic/alt |
boolean | - topic/boolean |
cite | - topic/cite |
dd | - topic/dd |
data | - topic/data |
data-about | - topic/data-about |
ddhd | - topic/ddhd |
desc | - topic/desc |
dl | - topic/dl |
dlentry | - topic/dlentry |
dlhead | - topic/dlhead |
draft-comment | - topic/draft-comment |
dt | - topic/dt |
dthd | - topic/dthd |
fig | - topic/fig |
figgroup | - topic/figgroup |
fn | - topic/fn |
foreign | - topic/foreign |
image | - topic/image |
indexterm | - topic/indexterm |
index-base | - topic/index-base |
indextermref | - topic/indextermref |
itemgroup | - topic/itemgroup |
keyword | - topic/keyword |
li | - topic/li |
lines | - topic/lines |
longdescref | - topic/longdescref |
longquoteref | - topic/longquoteref |
lq | - topic/lq |
navtitle | - topic/navtitle |
note | - topic/note |
object | - topic/object |
ol | - topic/ol |
p | - topic/p |
param | - topic/param |
ph | - topic/ph |
pre | - topic/pre |
q | - topic/q |
required-cleanup | - topic/required-cleanup |
simpletable | - topic/simpletable |
sl | - topic/sl |
sli | - topic/sli |
state | - topic/state |
stentry | - topic/stentry |
sthead | - topic/sthead |
strow | - topic/strow |
term | - topic/term |
text | - topic/text |
title | - topic/title |
tm | - topic/tm |
ul | - topic/ul |
unknown | - topic/unknown |
xref | - topic/xref |
hazardstatement | + topic/note hazard-d/hazardstatement |
messagepanel | + topic/ul hazard-d/messagepanel |
hazardsymbol | + topic/image hazard-d/hazardsymbol |
typeofhazard | + topic/li hazard-d/typeofhazard |
consequence | + topic/li hazard-d/consequence |
howtoavoid | + topic/li hazard-d/howtoavoid |
b | + topic/ph hi-d/b |
i | + topic/ph hi-d/i |
sub | + topic/ph hi-d/sub |
sup | + topic/ph hi-d/sup |
tt | + topic/ph hi-d/tt |
u | + topic/ph hi-d/u |
index-see | + topic/index-base indexing-d/index-see |
index-see-also | + topic/index-base indexing-d/index-see-also |
index-sort-as | + topic/index-base indexing-d/index-sort-as |
author | - topic/author |
source | - topic/source |
publisher | - topic/publisher |
copyright | - topic/copyright |
copyryear | - topic/copyryear |
copyrholder | - topic/copyrholder |
critdates | - topic/critdates |
created | - topic/created |
revised | - topic/revised |
permissions | - topic/permissions |
category | - topic/category |
metadata | - topic/metadata |
audience | - topic/audience |
keywords | - topic/keywords |
prodinfo | - topic/prodinfo |
prodname | - topic/prodname |
vrmlist | - topic/vrmlist |
vrm | - topic/vrm |
brand | - topic/brand |
series | - topic/series |
platform | - topic/platform |
prognum | - topic/prognum |
featnum | - topic/featnum |
component | - topic/component |
othermeta | - topic/othermeta |
resourceid | - topic/resourceid |
table | - topic/table |
tgroup | - topic/tgroup |
colspec | - topic/colspec |
thead | - topic/thead |
tbody | - topic/tbody |
row | - topic/row |
entry | - topic/entry |
abstract | - topic/abstract |
body | - topic/body |
bodydiv | - topic/bodydiv |
example | - topic/example |
link | - topic/link |
linkinfo | - topic/linkinfo |
linklist | - topic/linklist |
linkpool | - topic/linkpool |
linktext | - topic/linktext |
no-topic-nesting | - topic/no-topic-nesting |
prolog | - topic/prolog |
related-links | - topic/related-links |
searchtitle | - topic/searchtitle |
section | - topic/section |
sectiondiv | - topic/sectiondiv |
titlealts | - topic/titlealts |
topic | - topic/topic |
shortdesc | - topic/shortdesc |
imagemap | + topic/fig ut-d/imagemap |
area | + topic/figgroup ut-d/area |
shape | + topic/keyword ut-d/shape |
coords | + topic/ph ut-d/coords |
abbreviated-form | + topic/term abbrev-d/abbreviated-form |
concept | - topic/topic concept/concept |
conbody | - topic/body concept/conbody |
conbodydiv | - topic/bodydiv concept/conbodydiv |
apiname | + topic/keyword pr-d/apiname |
codeblock | + topic/pre pr-d/codeblock |
codeph | + topic/ph pr-d/codeph |
coderef | + topic/xref pr-d/coderef |
delim | + topic/ph pr-d/delim |
fragment | + topic/figgroup pr-d/fragment |
fragref | + topic/xref pr-d/fragref |
groupchoice | + topic/figgroup pr-d/groupchoice |
groupcomp | + topic/figgroup pr-d/groupcomp |
groupseq | + topic/figgroup pr-d/groupseq |
kwd | + topic/keyword pr-d/kwd |
oper | + topic/ph pr-d/oper |
option | + topic/keyword pr-d/option |
parml | + topic/dl pr-d/parml |
parmname | + topic/keyword pr-d/parmname |
pd | + topic/dd pr-d/pd |
plentry | + topic/dlentry pr-d/plentry |
pt | + topic/dt pr-d/pt |
repsep | + topic/ph pr-d/repsep |
sep | + topic/ph pr-d/sep |
synblk | + topic/figgroup pr-d/synblk |
synnote | + topic/fn pr-d/synnote |
synnoteref | + topic/xref pr-d/synnoteref |
synph | + topic/ph pr-d/synph |
syntaxdiagram | + topic/fig pr-d/syntaxdiagram |
var | + topic/ph pr-d/var |
reference | - topic/topic reference/reference |
refbody | - topic/body reference/refbody |
refbodydiv | - topic/bodydiv reference/refbodydiv |
refsyn | - topic/section reference/refsyn |
properties | - topic/simpletable reference/properties |
property | - topic/strow reference/property |
proptype | - topic/stentry reference/proptype |
propvalue | - topic/stentry reference/propvalue |
propdesc | - topic/stentry reference/propdesc |
prophead | - topic/sthead reference/prophead |
proptypehd | - topic/stentry reference/proptypehd |
propvaluehd | - topic/stentry reference/propvaluehd |
propdeschd | - topic/stentry reference/propdeschd |
cmdname | + topic/keyword sw-d/cmdname |
filepath | + topic/ph sw-d/filepath |
msgblock | + topic/pre sw-d/msgblock |
msgnum | + topic/keyword sw-d/msgnum |
msgph | + topic/ph sw-d/msgph |
systemoutput | + topic/ph sw-d/systemoutput |
userinput | + topic/ph sw-d/userinput |
varname | + topic/keyword sw-d/varname |
task | - topic/topic task/task |
taskbody | - topic/body task/taskbody |
steps | - topic/ol task/steps |
steps-unordered | - topic/ul task/steps-unordered |
stepsection | - topic/li task/stepsection |
step | - topic/li task/step |
cmd | - topic/ph task/cmd |
substeps | - topic/ol task/substeps |
substep | - topic/li task/substep |
tutorialinfo | - topic/itemgroup task/tutorialinfo |
info | - topic/itemgroup task/info |
stepxmp | - topic/itemgroup task/stepxmp |
stepresult | - topic/itemgroup task/stepresult |
choices | - topic/ul task/choices |
choice | - topic/li task/choice |
result | - topic/section task/result |
prereq | - topic/section task/prereq |
postreq | - topic/section task/postreq |
context | - topic/section task/context |
steps-informal | - topic/section task/steps-informal |
choicetable | - topic/simpletable task/choicetable |
chhead | - topic/sthead task/chhead |
chrow | - topic/strow task/chrow |
choptionhd | - topic/stentry task/choptionhd |
chdeschd | - topic/stentry task/chdeschd |
choption | - topic/stentry task/choption |
chdesc | - topic/stentry task/chdesc |
menucascade | + topic/ph ui-d/menucascade |
screen | + topic/pre ui-d/screen |
shortcut | + topic/keyword ui-d/shortcut |
uicontrol | + topic/ph ui-d/uicontrol |
wintitle | + topic/keyword ui-d/wintitle |
抜き出しに使ったスクリプト
<?php $find_cmd = "find dita_dtd/docs.oasis-open.org/dita/v1.2/os/dtd1.2/ -type f"; ob_start(); system($find_cmd); $list = ob_get_clean(); $ents = array(); foreach (explode("\n", $list) as $f){ $f = trim($f); if (!$f) continue; $c = file_get_contents($f); if (preg_match_all('@<(.*?)>@sm', $c, $m)){ foreach ($m[1] as $ent){ $ent = str_replace("\n", " ", $ent); if (preg_match('@\s+class\s+cdata@i', $ent)){ if (preg_match('@!ATTLIST\s+([\w-]+)\s+%global-atts;\s+class\s+CDATA\s+"(.*?)"@i', $ent, $m)){ $ents[] = array($m[1], $m[2]); printf("| %s | %s |\n", $m[1] , $m[2]); } } } } }
と思ったら、DITAファイルで提供されてた。
http://docs.oasis-open.org/dita/v1.2/os/spec/DITA1.2-spec/langref/
にある536個のditaファイル。
ということで、続編を書いた。