OSDN Git Service

XML外部リソースのリダイレクト
authorOlyutorskii <olyutorskii@users.osdn.me>
Wed, 29 Jun 2016 15:42:19 +0000 (00:42 +0900)
committerOlyutorskii <olyutorskii@users.osdn.me>
Wed, 29 Jun 2016 15:42:19 +0000 (00:42 +0900)
CHANGELOG.txt
src/main/java/jp/sourceforge/jindolf/archiver/JinArchiver.java
src/main/java/jp/sourceforge/jindolf/archiver/XmlResolver.java [new file with mode: 0644]
src/main/resources/jp/sourceforge/jindolf/archiver/resources/bbsArchive-110421.dtd [new file with mode: 0644]
src/main/resources/jp/sourceforge/jindolf/archiver/resources/bbsArchive-110421.xsd [new file with mode: 0644]
src/main/resources/jp/sourceforge/jindolf/archiver/resources/coreType-090929.xsd [new file with mode: 0644]
src/main/resources/jp/sourceforge/jindolf/archiver/resources/xmldummy.xsd [new file with mode: 0644]

index 052f86f..e19c0a7 100644 (file)
@@ -8,6 +8,8 @@ X.XXX.X (20XX-XX-XX)
     ・必須環境をJRE7に引き上げ。
     ・Mavenプラグイン更新。
     ・OSDN.JP対応。
+    ・<rawdata>タグ出力の修正。(バグ#36356)
+    ・XML検証タスクが外部リソースにアクセスしないようになった。
 
 1.502.2 (2011-04-21)
     ・110421版スキーマに対応。
index ddeaced..8e0f6c6 100644 (file)
@@ -26,6 +26,7 @@ import javax.xml.validation.Validator;
 import jp.sourceforge.jindolf.corelib.LandDef;
 import jp.sourceforge.jindolf.parser.DecodeException;
 import jp.sourceforge.jindolf.parser.HtmlParseException;
+import org.w3c.dom.ls.LSResourceResolver;
 import org.xml.sax.SAXException;
 
 /**
@@ -171,6 +172,9 @@ public final class JinArchiver{
             return;
         }
 
+        LSResourceResolver resolver = new XmlResolver();
+        validator.setResourceResolver(resolver);
+
         Writer writer;
         if(outdir != null){
             writer = getFileWriter(outdir, landDef, vid);
diff --git a/src/main/java/jp/sourceforge/jindolf/archiver/XmlResolver.java b/src/main/java/jp/sourceforge/jindolf/archiver/XmlResolver.java
new file mode 100644 (file)
index 0000000..bd9b37a
--- /dev/null
@@ -0,0 +1,249 @@
+/*
+ * XML resource resolver
+ *
+ * License : The MIT License
+ * Copyright(c) 2016 olyutorskii
+ */
+
+package jp.sourceforge.jindolf.archiver;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.ls.DOMImplementationLS;
+import org.w3c.dom.ls.LSInput;
+import org.w3c.dom.ls.LSResourceResolver;
+
+/**
+ * XML各種外部リソースの解決。
+ */
+public class XmlResolver implements LSResourceResolver{
+
+    private static final String RES_XMLXSD =
+            "resources/xmldummy.xsd";
+    private static final String RES_COREXSD =
+            "resources/coreType-090929.xsd";
+    private static final String RES_BBSXSD =
+            "resources/bbsArchive-110421.xsd";
+    private static final String RES_BBSDTD =
+            "resources/bbsArchive-110421.dtd";
+
+    private static final String URI_XMLXSD =
+            "http://www.w3.org/2001/xml.xsd";
+    private static final String URI_COREXSD =
+            "http://jindolf.sourceforge.jp/xml/xsd/coreType-090929.xsd";
+    private static final String URI_BBSXSD =
+            "http://jindolf.sourceforge.jp/xml/xsd/bbsArchive-110421.xsd";
+    private static final String URI_BBSDTD =
+            "http://jindolf.sourceforge.jp/xml/dtd/bbsArchive-110421.dtd";
+
+    private static final DOMImplementationLS DOM_LS;
+
+    static{
+        try{
+            DOM_LS = buildDomImplLS();
+        }catch(ParserConfigurationException e){
+            throw new ExceptionInInitializerError(e);
+        }
+    }
+
+
+    private final Map<URI, URI> uriMap;
+
+
+    /**
+     * コンストラクタ。
+     */
+    public XmlResolver(){
+        super();
+
+        this.uriMap = new HashMap<>();
+
+        setUriMap();
+
+        return;
+    }
+
+
+    /**
+     * DOMImplementationLS実装を生成する。
+     * @return DOMImplementationLS実装
+     * @throws ParserConfigurationException XML実装が満たされない
+     */
+    private static DOMImplementationLS buildDomImplLS()
+            throws ParserConfigurationException{
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        DocumentBuilder builder = factory.newDocumentBuilder();
+        DOMImplementation domImp = builder.getDOMImplementation();
+
+        Object feature = domImp.getFeature("LS", "3.0");
+        assert feature instanceof DOMImplementationLS;
+
+        DOMImplementationLS result;
+        result = (DOMImplementationLS) feature;
+
+        return result;
+    }
+
+    /**
+     * 絶対URIと相対URIを合成したURIを返す。
+     * 正規化も行われる。
+     * @param base 絶対URIでなければならない。nullでもよい。
+     * @param relative 絶対URIでもよいがその場合baseは無視される。null可。
+     * @return 合成結果のURLオブジェクト。必ず絶対URIになる。
+     * @throws java.net.URISyntaxException URIとして変。
+     * @throws java.lang.IllegalArgumentException 絶対URIが生成できない。
+     */
+    public static URI buildBaseRelativeURI(String base, String relative)
+            throws URISyntaxException,
+                   IllegalArgumentException {
+        URI baseURI;
+        if(base != null){
+            baseURI = new URI(base);
+            if( ! baseURI.isAbsolute() ){
+                throw new IllegalArgumentException();
+            }
+        }else{
+            baseURI = null;
+        }
+
+        URI relativeURI;
+        if(relative != null){
+            relativeURI = new URI(relative);
+        }else{
+            relativeURI = URI.create("");
+        }
+
+        URI resultURI;
+        if(baseURI == null || relativeURI.isAbsolute()){
+            resultURI = relativeURI;
+        }else{
+            resultURI = baseURI.resolve(relativeURI);
+        }
+
+        if( ! resultURI.isAbsolute() ){
+            throw new IllegalArgumentException();
+        }
+
+        resultURI = resultURI.normalize();
+
+        return resultURI;
+    }
+
+
+    /**
+     * 置換マップを設定する。
+     */
+    private void setUriMap(){
+
+        try{
+            putMap(URI_BBSDTD,  RES_BBSDTD);
+            putMap(URI_BBSXSD,  RES_BBSXSD);
+            putMap(URI_COREXSD, RES_COREXSD);
+            putMap(URI_XMLXSD,  RES_XMLXSD);
+        }catch(URISyntaxException e){
+            assert false;
+            return;
+        }
+
+        return;
+    }
+
+    /**
+     * 置換マップを設定する。
+     * @param uri オリジナルURI
+     * @param resource リソース名
+     * @throws URISyntaxException URIが変
+     */
+    private void putMap(String uri, String resource)
+            throws URISyntaxException{
+        URI orig = new URI(uri);
+
+        Class<?> klass = getClass();
+        URL resUrl = klass.getResource(resource);
+        URI resUri = resUrl.toURI();
+
+        orig = orig.normalize();
+        resUri = resUri.normalize();
+
+        this.uriMap.put(orig, resUri);
+
+        return;
+    }
+
+    /**
+     * URIを解決する。
+     * @param origUri オリジナルURI
+     * @return 解決リソースへのURI
+     */
+    private URI resolveMap(URI origUri){
+        URI key = origUri.normalize();
+        URI result = this.uriMap.get(key);
+
+        if(result == null) result = origUri;
+
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     * @param type {@inheritDoc}
+     * @param namespaceURI {@inheritDoc}
+     * @param publicId {@inheritDoc}
+     * @param systemId {@inheritDoc}
+     * @param baseURI {@inheritDoc}
+     * @return {@inheritDoc}
+     */
+    @Override
+    public LSInput resolveResource(String type,
+                                     String namespaceURI,
+                                     String publicId,
+                                     String systemId,
+                                     String baseURI ){
+        URI origUri;
+        try{
+            origUri = buildBaseRelativeURI(baseURI, systemId);
+        }catch(URISyntaxException e){
+            assert false;
+            return null;
+        }
+
+        URI resourceUri = resolveMap(origUri);
+
+        URL resourceUrl;
+        try{
+            resourceUrl = resourceUri.toURL();
+        }catch(MalformedURLException e){
+            assert false;
+            return null;
+        }
+
+        InputStream resourceStream;
+        try{
+            resourceStream = resourceUrl.openStream();
+        }catch(IOException e){
+            assert false;
+            return null;
+        }
+
+        LSInput result = DOM_LS.createLSInput();
+
+        result.setBaseURI(baseURI);
+        result.setPublicId(publicId);
+        result.setSystemId(systemId);
+
+        result.setByteStream(resourceStream);
+
+        return result;
+    }
+
+}
diff --git a/src/main/resources/jp/sourceforge/jindolf/archiver/resources/bbsArchive-110421.dtd b/src/main/resources/jp/sourceforge/jindolf/archiver/resources/bbsArchive-110421.dtd
new file mode 100644 (file)
index 0000000..8c81e8f
--- /dev/null
@@ -0,0 +1,337 @@
+<!--
+
+人狼BBS 共通アーカイブ基盤用 DTD定義
+
+by olyutorskii [ http://sourceforge.jp/users/olyutorskii/ ]
+License : The MIT License
+※ カタログ化はご自由に
+
+Copyright(c) 2009 olyutorskii
+
+-->
+
+<!ENTITY % announceElems "
+  startEntry
+| onStage
+| startMirror
+| openRole
+| murdered
+| startAssault
+| survivor
+| counting
+| suddenDeath
+| noMurder
+| winVillage
+| winWolf
+| winHamster
+| playerList
+| panic
+| execution
+| vanish
+| checkout
+| shortMember
+" >
+
+<!ENTITY % orderElems "
+  askEntry
+| askCommit
+| noComment
+| stayEpilogue
+| gameOver
+" >
+
+<!ENTITY % extraElems "
+  judge
+| guard
+| counting2
+| assault
+" >
+
+<!ENTITY % systemEvent " %announceElems; | %orderElems; | %extraElems; " >
+
+<!ENTITY % EventFamily " announce | order | extra " >
+<!ENTITY % announceAttrs "eventFamily (%EventFamily;) #FIXED 'announce'" >
+<!ENTITY % orderAttrs    "eventFamily (%EventFamily;) #FIXED 'order'" >
+<!ENTITY % extraAttrs    "eventFamily (%EventFamily;) #FIXED 'extra'" >
+
+<!ENTITY % VillageState " prologue | progress | epilogue | gameover " >
+<!ENTITY % DisclosureType " hot | uncomplete | complete " >
+<!ENTITY % PeriodType " prologue | progress | epilogue " >
+<!ENTITY % Team " village | wolf | hamster " >
+<!ENTITY % TalkType " public | wolf | private| grave " >
+<!ENTITY % Role "
+  innocent
+| wolf
+| seer
+| shaman
+| madman
+| hunter
+| frater
+| hamster
+" >
+
+
+<!-- #################################################################### -->
+
+
+<!ELEMENT village (avatarList, period*) >
+<!ATTLIST village
+    xmlns CDATA #REQUIRED
+    xmlns:xsi CDATA #REQUIRED
+    xsi:schemaLocation CDATA #REQUIRED
+    xml:lang CDATA "ja-JP"
+    xml:base CDATA #REQUIRED
+    xml:space (default|preserve) "preserve"
+    fullName CDATA #REQUIRED
+    vid CDATA #REQUIRED
+    commitTime CDATA #IMPLIED
+    state (%VillageState;) #REQUIRED
+    disclosure (%DisclosureType;) "complete"
+    isValid ( true | false | 1 | 0 ) "true"
+    landName CDATA #REQUIRED
+    formalName CDATA #REQUIRED
+    landId CDATA #REQUIRED
+    landPrefix CDATA #REQUIRED
+    locale CDATA "ja-JP"
+    origencoding CDATA "Shift_JIS"
+    timezone CDATA "GMT+09:00"
+    graveIconURI CDATA #REQUIRED
+    generator CDATA #IMPLIED
+>
+
+<!ELEMENT avatarList (avatar*) >
+
+<!ELEMENT avatar EMPTY >
+<!ATTLIST avatar
+    avatarId CDATA #REQUIRED
+    fullName CDATA #REQUIRED
+    shortName CDATA #REQUIRED
+    faceIconURI CDATA #IMPLIED
+>
+
+<!ELEMENT period ( talk | %systemEvent; )* >
+<!ATTLIST period
+    type (%PeriodType;) #REQUIRED
+    day CDATA #REQUIRED
+    disclosure (%DisclosureType;) "complete"
+    nextCommitDay CDATA #REQUIRED
+    commitTime CDATA #REQUIRED
+    sourceURI CDATA #REQUIRED
+    loadedTime CDATA #IMPLIED
+    loadedBy CDATA #IMPLIED
+>
+
+<!ELEMENT talk (li)* >
+<!ATTLIST talk
+    type (%TalkType;) #REQUIRED
+    avatarId CDATA #REQUIRED
+    xname CDATA #REQUIRED
+    time CDATA #REQUIRED
+    faceIconURI CDATA #IMPLIED
+>
+
+<!ELEMENT li (#PCDATA|rawdata)* >
+<!ATTLIST li xml:space (default|preserve) "preserve" >
+
+<!ELEMENT rawdata (#PCDATA) >
+<!ATTLIST rawdata
+    encoding CDATA #REQUIRED
+    hexBin   CDATA #REQUIRED
+>
+
+<!ELEMENT avatarRef EMPTY >
+<!ATTLIST avatarRef
+    avatarId CDATA #REQUIRED
+>
+
+<!ELEMENT startEntry (li)* >
+<!ATTLIST startEntry
+    %announceAttrs;
+>
+
+<!ELEMENT onStage (li)* >
+<!ATTLIST onStage
+    %announceAttrs;
+    entryNo CDATA #REQUIRED
+    avatarId CDATA #REQUIRED
+>
+
+<!ELEMENT startMirror (li)* >
+<!ATTLIST startMirror
+    %announceAttrs;
+>
+
+<!ELEMENT roleHeads EMPTY >
+<!ATTLIST roleHeads
+    role (%Role;) #REQUIRED
+    heads CDATA #REQUIRED
+>
+
+<!ELEMENT openRole (li*, roleHeads+) >
+<!ATTLIST openRole
+    %announceAttrs;
+>
+
+<!ELEMENT murdered (li*, avatarRef+) >
+<!ATTLIST murdered
+    %announceAttrs;
+>
+
+<!ELEMENT startAssault (li)* >
+<!ATTLIST startAssault
+    %announceAttrs;
+>
+
+<!ELEMENT survivor (li*, avatarRef+) >
+<!ATTLIST survivor
+    %announceAttrs;
+>
+
+<!ELEMENT vote EMPTY >
+<!ATTLIST vote
+    byWhom CDATA #REQUIRED
+    target CDATA #REQUIRED
+>
+
+<!ELEMENT counting (li*, vote+) >
+<!ATTLIST counting
+    %announceAttrs;
+    victim CDATA #IMPLIED
+>
+
+<!ELEMENT suddenDeath (li)* >
+<!ATTLIST suddenDeath
+    %announceAttrs;
+    avatarId CDATA #REQUIRED
+>
+
+<!ELEMENT noMurder (li)* >
+<!ATTLIST noMurder
+    %announceAttrs;
+>
+
+<!ELEMENT winVillage (li)* >
+<!ATTLIST winVillage
+    %announceAttrs;
+>
+
+<!ELEMENT winWolf (li)* >
+<!ATTLIST winWolf
+    %announceAttrs;
+>
+
+<!ELEMENT winHamster (li)* >
+<!ATTLIST winHamster
+    %announceAttrs;
+>
+
+<!ELEMENT playerInfo EMPTY >
+<!ATTLIST playerInfo
+    playerId CDATA #REQUIRED
+    avatarId CDATA #REQUIRED
+    survive ( true | false | 1 | 0 ) #REQUIRED
+    role (%Role;) #REQUIRED
+    uri CDATA #IMPLIED
+>
+
+<!ELEMENT playerList (li*, playerInfo+) >
+<!ATTLIST playerList
+    %announceAttrs;
+>
+
+<!ELEMENT panic (li)* >
+<!ATTLIST panic
+    %announceAttrs;
+>
+
+<!ELEMENT nominated EMPTY >
+<!ATTLIST nominated
+    avatarId CDATA #REQUIRED
+    count CDATA #REQUIRED
+>
+
+<!ELEMENT execution (li*, nominated+) >
+<!ATTLIST execution
+    %announceAttrs;
+    victim CDATA #IMPLIED
+>
+
+<!ELEMENT vanish (li)* >
+<!ATTLIST vanish
+    %announceAttrs;
+    avatarId CDATA #REQUIRED
+>
+
+<!ELEMENT checkout (li)* >
+<!ATTLIST checkout
+    %announceAttrs;
+    avatarId CDATA #REQUIRED
+>
+
+<!ELEMENT shortMember (li)* >
+<!ATTLIST shortMember
+    %announceAttrs;
+>
+
+<!ELEMENT askEntry (li)* >
+<!ATTLIST askEntry
+    %orderAttrs;
+    commitTime CDATA #REQUIRED
+    minMembers CDATA #REQUIRED
+    maxMembers CDATA #REQUIRED
+>
+
+<!ELEMENT askCommit (li)* >
+<!ATTLIST askCommit
+    %orderAttrs;
+    limitVote CDATA #REQUIRED
+    limitSpecial CDATA #REQUIRED
+>
+
+<!ELEMENT noComment (li*, avatarRef+) >
+<!ATTLIST noComment
+    %orderAttrs;
+>
+
+<!ELEMENT stayEpilogue (li)* >
+<!ATTLIST stayEpilogue
+    %orderAttrs;
+    winner (%Team;) #REQUIRED
+    limitTime CDATA #REQUIRED
+>
+
+<!ELEMENT gameOver (li)* >
+<!ATTLIST gameOver
+    %orderAttrs;
+>
+
+<!ELEMENT judge (li)* >
+<!ATTLIST judge
+    %extraAttrs;
+    byWhom CDATA #REQUIRED
+    target CDATA #REQUIRED
+>
+
+<!ELEMENT guard (li)* >
+<!ATTLIST guard
+    %extraAttrs;
+    byWhom CDATA #REQUIRED
+    target CDATA #REQUIRED
+>
+
+<!ELEMENT counting2 (li*, vote+) >
+<!ATTLIST counting2
+    %extraAttrs;
+>
+
+<!ELEMENT assault (li)* >
+<!ATTLIST assault
+    %extraAttrs;
+    byWhom CDATA #REQUIRED
+    target CDATA #REQUIRED
+    xname CDATA #REQUIRED
+    time CDATA #REQUIRED
+    faceIconURI CDATA #IMPLIED
+>
+
+<!-- EOF -->
diff --git a/src/main/resources/jp/sourceforge/jindolf/archiver/resources/bbsArchive-110421.xsd b/src/main/resources/jp/sourceforge/jindolf/archiver/resources/bbsArchive-110421.xsd
new file mode 100644 (file)
index 0000000..5a92eb0
--- /dev/null
@@ -0,0 +1,1529 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xsd:schema
+    xmlns:xsd      ="http://www.w3.org/2001/XMLSchema"
+    xmlns:core     ="http://jindolf.sourceforge.jp/xml/ns/401"
+    xmlns:tns      ="http://jindolf.sourceforge.jp/xml/ns/501"
+    targetNamespace="http://jindolf.sourceforge.jp/xml/ns/501"
+    elementFormDefault="qualified"
+    xml:lang="ja-JP"
+    version="225"
+>
+
+    <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+
+人狼BBS 共通アーカイブ基盤用 スキーム定義
+
+by olyutorskii [ http://sourceforge.jp/users/olyutorskii/ ]
+License : The MIT License
+※ カタログ化はご自由に
+
+Copyright(c) 2009 olyutorskii
+
+############################################################################
+]]></xsd:documentation>
+    </xsd:annotation>
+
+
+    <xsd:import
+        namespace="http://www.w3.org/XML/1998/namespace"
+        schemaLocation="http://www.w3.org/2001/xml.xsd"
+    />
+
+    <xsd:import
+        namespace="http://jindolf.sourceforge.jp/xml/ns/401"
+        schemaLocation="http://jindolf.sourceforge.jp/xml/xsd/coreType-090929.xsd"
+    />
+
+
+<!-- 各種複合型定義 ################################ -->
+
+    <!-- ================================================================ -->
+
+    <xsd:complexType name="TextLines">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+li要素を子に持つ複数行コンテンツ。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:element ref="tns:li" minOccurs="0" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="li">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+会話文字列やシステムメッセージの各行を記述する混合モデル。
+元XHTMLデータ内会話<div>要素内のスペースとタブは
+すべて保存されなければならない。
+それ以外の余分な改行とスペースとタブを入れてはならない。
+生データ記述<rawdata>を途中に挿入可能。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType mixed="true">
+            <xsd:choice>
+                <xsd:element
+                    ref="tns:rawdata"
+                    minOccurs="0" maxOccurs="unbounded"
+                />
+            </xsd:choice>
+            <xsd:attribute
+                ref="xml:space"
+                use="optional"
+                default="preserve"
+            />
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:simpleType name="Onechar">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+1文字限定の文字列
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="xsd:string">
+            <xsd:length value="1" />
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="rawdata">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+・人狼BBS元データのエンコーディングが変だった。
+・もしくは文字集合制約を満たさなかった。(機種依存文字)
+などの事実を記述するための1byteもしくは2byteの生データの情報。
+類似するエンコーディングから代替文字1文字を推測して埋めておく事が可能。
+
+内容 : 代替文字列1文字。推測不可能な場合はU+FFFDなどが望ましい。
+encoding : 元データのエンコーディングおよび文字集合指定。
+           F国以前の人狼BBSでは事実上「Shift_JIS」固定。
+hexBin : 元データの16進データ文字列。2文字か4文字。例)「874a」「FF」
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:simpleContent>
+                <xsd:extension base="tns:Onechar">
+                    <xsd:attribute
+                        name="encoding"
+                        type="core:EncodingDecl"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="hexBin"
+                        type="xsd:hexBinary"
+                        use="required"
+                    />
+                </xsd:extension>
+            </xsd:simpleContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:complexType name="EventAnnounce">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+Announceイベント共通型。
+eventFamily属性値は"announce"固定。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:extension base="tns:TextLines">
+                <xsd:attribute
+                    name="eventFamily"
+                    type="core:EventFamily"
+                    fixed="announce"
+                />
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!-- ================================================================ -->
+
+    <xsd:complexType name="EventOrder">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+Orderイベント共通型。
+eventFamily属性値は"order"固定。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:extension base="tns:TextLines">
+                <xsd:attribute
+                    name="eventFamily"
+                    type="core:EventFamily"
+                    fixed="order"
+                />
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!-- ================================================================ -->
+
+    <xsd:complexType name="EventExtra">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+Extraイベント共通型。
+eventFamily属性値は"extra"固定。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:extension base="tns:TextLines">
+                <xsd:attribute
+                    name="eventFamily"
+                    type="core:EventFamily"
+                    fixed="extra"
+                />
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+
+<!-- 各種グループ定義 ################################ -->
+
+    <!-- ================================================================ -->
+
+    <xsd:group name="EventAnnounceGroup">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+Announce型システムメッセージ要素のグループ
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:choice>
+            <xsd:element ref="tns:startEntry" />
+            <xsd:element ref="tns:onStage" />
+            <xsd:element ref="tns:startMirror" />
+            <xsd:element ref="tns:openRole" />
+            <xsd:element ref="tns:murdered" />
+            <xsd:element ref="tns:startAssault" />
+            <xsd:element ref="tns:survivor" />
+            <xsd:element ref="tns:counting" />
+            <xsd:element ref="tns:suddenDeath" />
+            <xsd:element ref="tns:noMurder" />
+            <xsd:element ref="tns:winVillage" />
+            <xsd:element ref="tns:winWolf" />
+            <xsd:element ref="tns:winHamster" />
+            <xsd:element ref="tns:playerList" />
+            <xsd:element ref="tns:panic" />
+            <xsd:element ref="tns:execution" />
+            <xsd:element ref="tns:vanish" />
+            <xsd:element ref="tns:checkout" />
+            <xsd:element ref="tns:shortMember" />
+        </xsd:choice>
+    </xsd:group>
+
+    <!-- ================================================================ -->
+
+    <xsd:group name="EventOrderGroup">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+Order型システムメッセージ要素のグループ
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:choice>
+            <xsd:element ref="tns:askEntry" />
+            <xsd:element ref="tns:askCommit" />
+            <xsd:element ref="tns:noComment" />
+            <xsd:element ref="tns:stayEpilogue" />
+            <xsd:element ref="tns:gameOver" />
+        </xsd:choice>
+    </xsd:group>
+
+    <!-- ================================================================ -->
+
+    <xsd:group name="EventExtraGroup">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+Extra型システムメッセージ要素のグループ
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:choice>
+            <xsd:element ref="tns:judge" />
+            <xsd:element ref="tns:guard" />
+            <xsd:element ref="tns:counting2" />
+            <xsd:element ref="tns:assault" />
+        </xsd:choice>
+    </xsd:group>
+
+
+<!-- 各種要素定義 ################################ -->
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="village">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+このスキーマ中の最高位ルート要素。
+1つの「村」に対応する。
+period並びは日順で並んでいなければならない。
+
+xml:lang => この要素内部で使われる言語。デフォルトは「ja-JP」
+xml:base => この要素内で現れる相対URIのベース。
+            人狼BBSの運営方針によっては将来無効になる可能性もある。
+xml:space => li要素より上位要素内のホワイトスペースのパース方針。
+fullName => 村のフルネーム(ex.「F1784 日の沈まぬ村」)
+vid => 村の識別ID(ex.「1784」)
+commitTime => 更新時刻。24時間村なら出力するのが望ましい。
+              GMTとの時差も出力するのが望ましい。
+              午後1時30分更新の例)「13:30:00+09:00」
+              時差表記がないならtimezone属性を使って
+              読み込み時に補正すべき。
+state => 村の状態
+disclosure => 発言の開示状況。
+              「hot」ならプレイ真っ最中の最新日が含まれている。
+              「uncomplete」なら未開示発言を含む日が含まれている。
+              「complete」なら全発言は完全に開示されている。
+isValid => システムのトラブルでゲーム勝敗が成り立っていないと
+           判断できるならfalse
+landName => 国の名前。「人狼BBS:F国」など。
+formalName => 正式名称。http://homepage2.nifty.com/ninjinia/ に準ずる。
+landId => JinCoreライブラリで管理している国の識別子。F国なら「wolff」
+landPrefix => 村名の前置詞。F国なら「F」。
+              無い国も複数ある。
+locale => この国で使われている言葉・文化。
+origencoding => この国で使われているエンコーディング
+timezone => この国の時刻表記で使われているタイムゾーン。
+graveIconURI => 墓アイコン画像のURI
+generator => XMLを吐き出したアプリ、サブシステム、ライブラリの名前。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element ref="tns:avatarList" />
+                <xsd:element
+                    ref="tns:period"
+                    minOccurs="0" maxOccurs="unbounded"
+                />
+            </xsd:sequence>
+            <xsd:attribute
+                ref="xml:lang"
+                use="optional"
+                default="ja-JP"
+            />
+            <xsd:attribute
+                ref="xml:base"
+                use="required"
+            />
+            <xsd:attribute
+                ref="xml:space"
+                use="optional"
+                default="default"
+            />
+            <xsd:attribute
+                name="fullName"
+                type="xsd:normalizedString"
+                use="required"
+            />
+            <xsd:attribute
+                name="vid"
+                type="xsd:nonNegativeInteger"
+                use="required"
+            />
+            <xsd:attribute
+                name="commitTime"
+                type="xsd:time"
+                use="optional"
+            />
+            <xsd:attribute
+                name="state"
+                type="core:VillageState"
+                use="required"
+            />
+            <xsd:attribute
+                name="disclosure"
+                type="core:DisclosureType"
+                use="optional"
+                default="complete"
+            />
+            <xsd:attribute
+                name="isValid"
+                type="xsd:boolean"
+                use="optional"
+                default="true"
+            />
+            <xsd:attribute
+                name="landName"
+                type="xsd:normalizedString"
+                use="required"
+            />
+            <xsd:attribute
+                name="formalName"
+                type="xsd:normalizedString"
+                use="required"
+            />
+            <xsd:attribute
+                name="landId"
+                type="core:LandIdentifier"
+                use="required"
+            />
+            <xsd:attribute
+                name="landPrefix"
+                type="xsd:token"
+                use="required"
+            />
+            <xsd:attribute
+                name="locale"
+                type="xsd:language"
+                use="optional"
+                default="ja-JP"
+            />
+            <xsd:attribute
+                name="origencoding"
+                type="core:EncodingDecl"
+                use="optional"
+                default="Shift_JIS"
+            />
+            <xsd:attribute
+                name="timezone"
+                type="core:Timezone"
+                use="optional"
+                default="GMT+09:00"
+            />
+            <xsd:attribute
+                name="graveIconURI"
+                type="xsd:anyURI"
+                use="required"
+            />
+            <xsd:attribute
+                name="generator"
+                type="xsd:normalizedString"
+                use="optional"
+            />
+        </xsd:complexType>
+
+        <!-- ここからキー定義 -->
+
+        <xsd:key name="avatar-id">
+            <xsd:selector xpath="./tns:avatarList/tns:avatar" />
+            <xsd:field xpath="@avatarId" />
+        </xsd:key>
+
+        <xsd:keyref name="avatarRef-avatar" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:avatarRef" />
+            <xsd:field xpath="@avatarId" />
+        </xsd:keyref>
+
+        <xsd:keyref name="onStage-avatar" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:onStage" />
+            <xsd:field xpath="@avatarId" />
+        </xsd:keyref>
+
+        <xsd:keyref name="vanish-avatar" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:vanish" />
+            <xsd:field xpath="@avatarId" />
+        </xsd:keyref>
+
+        <xsd:keyref name="checkout-avatar" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:checkout" />
+            <xsd:field xpath="@avatarId" />
+        </xsd:keyref>
+
+        <xsd:keyref name="execution-avatar-victim" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:execution" />
+            <xsd:field xpath="@victim" />
+        </xsd:keyref>
+
+        <xsd:keyref name="nominated-avatar" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:nominated" />
+            <xsd:field xpath="@avatarId" />
+        </xsd:keyref>
+
+        <xsd:keyref name="counting-avatar-victim" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:counting" />
+            <xsd:field xpath="@victim" />
+        </xsd:keyref>
+
+        <xsd:keyref name="vote-avatar-by" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:vote" />
+            <xsd:field xpath="@byWhom" />
+        </xsd:keyref>
+
+        <xsd:keyref name="vote-avatar-to" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:vote" />
+            <xsd:field xpath="@target" />
+        </xsd:keyref>
+
+        <xsd:keyref name="suddenDeath-avatar" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:suddenDeath" />
+            <xsd:field xpath="@avatarId" />
+        </xsd:keyref>
+
+        <xsd:keyref name="playerInfo-avatar" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:playerInfo" />
+            <xsd:field xpath="@avatarId" />
+        </xsd:keyref>
+
+        <xsd:keyref name="examine-avatar-by" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:judge" />
+            <xsd:field xpath="@byWhom" />
+        </xsd:keyref>
+
+        <xsd:keyref name="examine-avatar-to" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:judge" />
+            <xsd:field xpath="@target" />
+        </xsd:keyref>
+
+        <xsd:keyref name="guard-avatar-by" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:guard" />
+            <xsd:field xpath="@byWhom" />
+        </xsd:keyref>
+
+        <xsd:keyref name="guard-avatar-to" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:guard" />
+            <xsd:field xpath="@target" />
+        </xsd:keyref>
+
+        <xsd:keyref name="assault-avatar-by" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:assault" />
+            <xsd:field xpath="@byWhom" />
+        </xsd:keyref>
+
+        <xsd:keyref name="assault-avatar-to" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:assault" />
+            <xsd:field xpath="@target" />
+        </xsd:keyref>
+
+        <xsd:keyref name="talk-avatar" refer="tns:avatar-id">
+            <xsd:selector xpath=".//tns:talk" />
+            <xsd:field xpath="@avatarId" />
+        </xsd:keyref>
+
+        <xsd:unique name="period-day">
+            <xsd:selector xpath="./tns:period" />
+            <xsd:field xpath="@day" />
+        </xsd:unique>
+
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="avatarList">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+Avatar(キャラクター)の集合。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+                <xsd:element ref="tns:avatar" />
+            </xsd:sequence>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="avatar">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+Avatar(キャラクター)の定義。
+
+avatarId => Avatarの識別名。
+      Avatarを連想させる簡潔なアルファベット列が望ましい。(例:「gerd」)
+      適当にユニークで簡素なアルファベットを割り振ってもよい。
+      短縮名で代用してもよい。
+      ハイフン禁止。
+fullName => Avatarのフルネーム。(ex.「楽天家 ゲルト」)
+shortName => Avatarの短縮名。(ex.「ゲルト」)スペース禁止。
+faceIconURI => 顔画像アイコンへのURI。
+               プロローグから一言も発言せずに突然死した場合は省略してもよい。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:sequence />
+            <xsd:attribute
+                name="avatarId"
+                type="core:AvatarId"
+                use="required"
+            />
+            <xsd:attribute
+                name="fullName"
+                type="xsd:normalizedString"
+                use="required"
+            />
+            <xsd:attribute
+                name="shortName"
+                type="xsd:token"
+                use="required"
+            />
+            <xsd:attribute
+                name="faceIconURI"
+                type="xsd:anyURI"
+                use="optional"
+            />
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="period">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+Period(日)の定義。
+子要素として、会話およびシステムメッセージを0個以上抱える。
+各システムメッセージの出現順に関する制約
+(「突然死の次は投票結果のはず」、etc.)は、
+このスキーマでは定義しない。
+
+type => このPeriodの種類。
+day => プロローグは0、n日目はn、n日目の次にエピローグが来たなら、
+       エピローグはn+1となる。
+disclosure => 発言の開示状況。
+              「hot」ならその日はプレイ真っ最中の最新日。
+              「uncomplete」ならまだその日の未開示発言を取得していない可能性がある。
+              「complete」ならその日の全発言は完全に開示された。
+nextCommitDay => 次回更新月日。年はなし。
+                 GMTとの時差も出力するのが望ましい。
+                 8月31日の例)「--08-31+09:00」
+                 時差表記がないならlandInfo要素のtimezone属性を使って
+                 読み込み時に補正すべき。
+commitTime => 更新時刻。秒以下の単位は切り捨て。
+              GMTとの時差も出力するのが望ましい。
+              午後1時30分更新の例)「13:30:00+09:00」
+              時差表記がないならland要素のtimezone属性を使って
+              読み込み時に補正すべき。
+sourceURI => このPeriodを取り込んだときの元となったURI。
+             同じ村の同じ日でも、進行によってURIが変わることが
+             ありうる。
+loadedTime => このPeriodを取り込んだ時刻。
+              GMTとの時差も出力するのが望ましい。
+              人狼BBSサーバからのHTTP応答内部から算出するのが望ましい。
+              無理ならローカルカレンダから。
+loadedBy => 進行中の村を参加者が読み込んだ場合、その時のログインIDを出力する。
+            windows31jに由来する文字が含まれる場合もある。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:choice minOccurs="0" maxOccurs="unbounded">
+                <xsd:element ref="tns:talk" />
+                <xsd:group ref="tns:EventAnnounceGroup" />
+                <xsd:group ref="tns:EventOrderGroup" />
+                <xsd:group ref="tns:EventExtraGroup" />
+            </xsd:choice>
+            <xsd:attribute
+                name="type"
+                type="core:PeriodType"
+                use="required"
+            />
+            <xsd:attribute
+                name="day"
+                type="xsd:nonNegativeInteger"
+                use="required"
+            />
+            <xsd:attribute
+                name="disclosure"
+                type="core:DisclosureType"
+                use="optional"
+                default="complete"
+            />
+            <xsd:attribute
+                name="nextCommitDay"
+                type="xsd:gMonthDay"
+                use="required"
+            />
+            <xsd:attribute
+                name="commitTime"
+                type="xsd:time"
+                use="required"
+            />
+            <xsd:attribute
+                name="sourceURI"
+                type="xsd:anyURI"
+                use="required"
+            />
+            <xsd:attribute
+                name="loadedTime"
+                type="xsd:dateTime"
+                use="optional"
+            />
+            <xsd:attribute
+                name="loadedBy"
+                type="core:PlayerId"
+                use="optional"
+            />
+        </xsd:complexType>
+
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="avatarRef">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+Avatarへの参照。
+avatarId => Avatar識別子
+※ IDREFS属性を使うのやめた。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:attribute
+                name="avatarId"
+                type="core:AvatarId"
+                use="required"
+            />
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="startEntry" type="tns:EventAnnounce">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:エントリ開始
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="onStage" >
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:参加者登場
+entryNo => 登場順番号。ごくまれにAvatar間で重複することあり。
+avatarId => Avatar識別子
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventAnnounce">
+                    <xsd:attribute
+                        name="entryNo"
+                        type="xsd:positiveInteger"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="avatarId"
+                        type="core:AvatarId"
+                        use="required"
+                    />
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="startMirror" type="tns:EventAnnounce">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:1日目開始
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="openRole">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:役職構成開示
+roleHeads要素(各役職の人数記述)を複数かかえる。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventAnnounce">
+                    <xsd:sequence minOccurs="1" maxOccurs="unbounded">
+                        <xsd:element ref="tns:roleHeads" />
+                    </xsd:sequence>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="roleHeads">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+役職とその人数
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:attribute
+                name="role"
+                type="core:Role"
+                use="required"
+            />
+            <xsd:attribute
+                name="heads"
+                type="xsd:positiveInteger"
+                use="required"
+            />
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="murdered">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:突然死でない犠牲者
+avatarRef(Avatar参照)要素を1つ持つ。E国では2つ(ハム溶け)の場合も。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventAnnounce">
+                    <xsd:sequence>
+                        <xsd:element
+                            ref="tns:avatarRef"
+                            minOccurs="1" maxOccurs="2"
+                        />
+                    </xsd:sequence>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="startAssault" type="tns:EventAnnounce">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:最初の襲撃
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="survivor">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:生存者一覧
+生存者を表すavatarRef(Avatar参照)要素を1つ以上持つ。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventAnnounce">
+                    <xsd:sequence>
+                        <xsd:element
+                            ref="tns:avatarRef"
+                            minOccurs="1"
+                            maxOccurs="unbounded"
+                        />
+                    </xsd:sequence>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="counting">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:投票開示
+vote要素(個々の投票)を1つ以上持つ。
+victim => 処刑された人のAvatar識別子。誰も処刑されなかったら省略。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventAnnounce">
+                    <xsd:sequence>
+                        <xsd:element
+                            ref="tns:vote"
+                            minOccurs="1"
+                            maxOccurs="unbounded"
+                        />
+                    </xsd:sequence>
+                    <xsd:attribute
+                        name="victim"
+                        type="core:AvatarId"
+                        use="optional"
+                    />
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="vote">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+処刑投票した人とされた人のペア。
+voteBy => 投票した人のAvatar識別子
+voteTo => 投票された人のAvatar識別子
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:attribute
+                name="byWhom"
+                type="core:AvatarId"
+                use="required"
+            />
+            <xsd:attribute
+                name="target"
+                type="core:AvatarId"
+                use="required"
+            />
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="suddenDeath" >
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:突然死
+avatarId => 突然死者のAvatar識別子
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventAnnounce">
+                    <xsd:attribute
+                        name="avatarId"
+                        type="core:AvatarId"
+                        use="required"
+                    />
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="noMurder" type="tns:EventAnnounce">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:襲撃による犠牲者なし。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="winVillage" type="tns:EventAnnounce">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:村陣営の勝利
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="winWolf" type="tns:EventAnnounce">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:狼陣営の勝利
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="winHamster" type="tns:EventAnnounce">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:ハムスター陣営の勝利
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="playerList">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:プレイヤー一覧開示
+プレイヤーに関する情報(playerInfo要素)を1つ以上持つ。
+avatar総数より少ない場合もあるかもしれない。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventAnnounce">
+                    <xsd:sequence>
+                        <xsd:element
+                            ref="tns:playerInfo"
+                            minOccurs="1" maxOccurs="unbounded"
+                        />
+                    </xsd:sequence>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="playerInfo">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+プレイヤー情報。
+playerId => プレイヤーのログインID。E国では@やTypeKeyニックネームを含む全部。
+            windows31jに由来する文字が含まれる場合もある。
+avatarId => Avatar識別子
+survive => 最終日まで生きていたか否か。
+role => 担当した役職
+uri => プレイヤーの指定した連絡先URI。URI条件を満たすかどうかは不明。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:attribute
+                name="playerId"
+                type="core:PlayerId"
+                use="required"
+            />
+            <xsd:attribute
+                name="avatarId"
+                type="core:AvatarId"
+                use="required"
+            />
+            <xsd:attribute
+                name="survive"
+                type="xsd:boolean"
+                use="required"
+            />
+            <xsd:attribute
+                name="role"
+                type="core:Role"
+                use="required"
+            />
+            <xsd:attribute
+                name="uri"
+                type="xsd:token"
+                use="optional"
+            />
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="panic" type="tns:EventAnnounce">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:システム上のパニック
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="execution">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:処刑結果開示 (G国)
+nominated要素(個々の投票集計)を1つ以上持つ。
+誰が投票したかは開示されない。
+victim => 処刑された人のAvatar識別子。誰も処刑されなかったら省略。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventAnnounce">
+                    <xsd:sequence>
+                        <xsd:element
+                            ref="tns:nominated"
+                            minOccurs="1"
+                            maxOccurs="unbounded"
+                        />
+                    </xsd:sequence>
+                    <xsd:attribute
+                        name="victim"
+                        type="core:AvatarId"
+                        use="optional"
+                    />
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="nominated">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+G国投票状況。
+誰が投票したかは開示されない。
+voteと異なり既に集計済みの結果が表される。
+avatarId => 被投票者
+count => 集票数
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:attribute
+                name="avatarId"
+                type="core:AvatarId"
+                use="required"
+            />
+            <xsd:attribute
+                name="count"
+                type="xsd:positiveInteger"
+                use="required"
+            />
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="vanish">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:失踪 (G国)
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventAnnounce">
+                    <xsd:attribute
+                        name="avatarId"
+                        type="core:AvatarId"
+                        use="required"
+                    />
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="checkout">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:チェックアウト (G国)
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventAnnounce">
+                    <xsd:attribute
+                        name="avatarId"
+                        type="core:AvatarId"
+                        use="required"
+                    />
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="shortMember" type="tns:EventAnnounce">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:定員不足 (G国)
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="askEntry" >
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:プロローグ中の参加促し。
+commitTime => 更新時刻
+minMembers => 最少人数
+maxMembers => 最大人数
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventOrder">
+                    <xsd:attribute
+                        name="commitTime"
+                        type="xsd:time"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="minMembers"
+                        type="xsd:positiveInteger"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="maxMembers"
+                        type="xsd:positiveInteger"
+                        use="required"
+                    />
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="askCommit" >
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:投票促し
+limitVote => 投票期限
+limitSpecial => 特殊行動期限
+※ 両者とも同じ値のはず。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventOrder">
+                    <xsd:attribute
+                        name="limitVote"
+                        type="xsd:time"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="limitSpecial"
+                        type="xsd:time"
+                        use="required"
+                    />
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="noComment">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:発言促し
+未発言AvatarのAvatar参照要素(avatarRef)を1つ以上含む。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventOrder">
+                    <xsd:sequence>
+                        <xsd:element
+                            ref="tns:avatarRef"
+                            minOccurs="1"
+                            maxOccurs="unbounded"
+                        />
+                    </xsd:sequence>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="stayEpilogue" >
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:エピローグ終了予告
+winner => 勝利陣営
+limitTime => エピローグ終了時刻
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventOrder">
+                    <xsd:attribute
+                        name="winner"
+                        type="core:Team"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="limitTime"
+                        type="xsd:time"
+                        use="required"
+                    />
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="gameOver" type="tns:EventOrder">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:ゲーム終了
+エピローグの次の日にしか出ないけど一応。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="judge">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:占い師と占われた人
+byWhom => 占い師Avatarの識別子。
+target => 占われたAvatarの識別子。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventExtra">
+                    <xsd:attribute
+                        name="byWhom"
+                        type="core:AvatarId"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="target"
+                        type="core:AvatarId"
+                        use="required"
+                    />
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="guard" >
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:狩人と護衛された人。
+byWhom => 狩人Avatarの識別子。
+target => 護衛されたAvatarの識別子。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventExtra">
+                    <xsd:attribute
+                        name="byWhom"
+                        type="core:AvatarId"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="target"
+                        type="core:AvatarId"
+                        use="required"
+                    />
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="counting2">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:投票開示(G国以降)
+vote要素(個々の投票)を1つ以上持つ。
+countingと異なりvictim属性は定義されていない。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventExtra">
+                    <xsd:sequence>
+                        <xsd:element
+                            ref="tns:vote"
+                            minOccurs="1"
+                            maxOccurs="unbounded"
+                        />
+                    </xsd:sequence>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="assault" >
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムメッセージ:襲撃
+人狼BBSのXHTML上は赤ログに見える。
+byWhom => 襲撃した人狼のAvatar識別子
+target => 襲撃されたAvatarの識別子
+xname => 人狼BBS XHTML上のname属性値
+time => 襲撃時刻。秒以下の単位は切り捨て。
+faceIconURI => アイコン画像URI
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:EventExtra">
+                    <xsd:attribute
+                        name="byWhom"
+                        type="core:AvatarId"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="target"
+                        type="core:AvatarId"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="xname"
+                        type="xsd:NCName"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="time"
+                        type="xsd:time"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="faceIconURI"
+                        type="xsd:anyURI"
+                        use="optional"
+                    />
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+    <xsd:element name="talk">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+会話データ。
+
+type => 発言種別。
+avatarId => 話したAvatarの識別子。
+xname => 村の中ではほぼユニークな識別子だが、たまに重複もありえる。
+         人狼BBS元データXHTMLのname属性の値に由来する。例:(「mes1239694501」)
+         後半の数値列はエポック時からのミリ秒らしい。
+time => 発言時刻。秒以下の単位は切り捨て。時差も付けるべし。
+faceIconURI => avatar要素の顔アイコンURIと同一なら省略。
+               もし指定されていたら、avatar要素の顔アイコンURIより
+               こちらを使ってイメージ表示した方が望ましい。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="tns:TextLines">
+                    <xsd:attribute
+                        name="type"
+                        type="core:TalkType"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="avatarId"
+                        type="core:AvatarId"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="xname"
+                        type="xsd:NCName"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="time"
+                        type="xsd:time"
+                        use="required"
+                    />
+                    <xsd:attribute
+                        name="faceIconURI"
+                        type="xsd:anyURI"
+                        use="optional"
+                    />
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- ================================================================ -->
+
+</xsd:schema>
+
+<!-- EOF -->
diff --git a/src/main/resources/jp/sourceforge/jindolf/archiver/resources/coreType-090929.xsd b/src/main/resources/jp/sourceforge/jindolf/archiver/resources/coreType-090929.xsd
new file mode 100644 (file)
index 0000000..f2dc65b
--- /dev/null
@@ -0,0 +1,342 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xsd:schema
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:tns      ="http://jindolf.sourceforge.jp/xml/ns/401"
+    targetNamespace="http://jindolf.sourceforge.jp/xml/ns/401"
+    elementFormDefault="qualified"
+    version="2315"
+    xml:lang="ja-JP"
+>
+
+
+    <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+
+人狼BBS 共通型 スキーム定義
+
+by olyutorskii [ http://sourceforge.jp/users/olyutorskii/ ]
+License : The MIT License
+※ カタログ化はご自由に
+
+Copyright(c) 2009 olyutorskii
+$Id: coreType-090929.xsd 850 2009-09-29 08:33:59Z olyutorskii $
+
+############################################################################
+]]></xsd:documentation>
+    </xsd:annotation>
+
+
+    <!-- ================================================================ -->
+
+    <xsd:simpleType name="LandIdentifier">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+Jindolfで管理している国別識別子。国ごとにユニークな識別子が割り当てられる。
+F国なら「wolff」。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+
+        <xsd:restriction base="xsd:string">
+            <xsd:pattern value="[A-Za-z]([A-Za-z0-9_])*"/>
+        </xsd:restriction>
+
+    </xsd:simpleType>
+
+    <xsd:simpleType name="LandState">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+国の状態。
+「closed」ならアクセス不可。
+「historical」なら過去ログ提供のみ。
+「active」なら随時新規村参加者募集中。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="closed"/>
+            <xsd:enumeration value="historical"/>
+            <xsd:enumeration value="active"/>
+        </xsd:restriction>
+
+    </xsd:simpleType>
+
+    <!-- ================================================================ -->
+
+    <xsd:simpleType name="Timezone">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+タイムゾーン。
+GMT表記のみ。例)「GMT+09:00」
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+
+        <xsd:restriction base="xsd:string">
+            <xsd:pattern value="GMT(\+|\-)[0-9][0-9]?(:?[0-9][0-9])?"/>
+        </xsd:restriction>
+
+    </xsd:simpleType>
+
+    <!-- ================================================================ -->
+
+    <xsd:simpleType name="EncodingDecl">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+元XHTMLデータのエンコーディング/文字集合指定。
+人狼BBSの場合は事実上「Shift_JIS」一本か。
+資料 : http://www.w3.org/TR/2008/REC-xml-20081126/#NT-EncName
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+
+        <xsd:restriction base="xsd:string">
+            <xsd:pattern value="[A-Za-z]([A-Za-z0-9\._\-])*"/>
+        </xsd:restriction>
+
+    </xsd:simpleType>
+
+    <!-- ================================================================ -->
+
+    <xsd:simpleType name="VillageState">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+村の状態
+
+prologue => プロローグ中
+progress => 進行中
+epilogue => エピローグ中
+gameover => ゲーム終了
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="prologue" />
+            <xsd:enumeration value="progress" />
+            <xsd:enumeration value="epilogue" />
+            <xsd:enumeration value="gameover" />
+        </xsd:restriction>
+
+    </xsd:simpleType>
+
+    <!-- ================================================================ -->
+
+    <xsd:simpleType name="PeriodType">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+Period(日)の種類
+
+prologue => プロローグ
+progress => 進行中の日
+epilogue => エピローグ
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="prologue" />
+            <xsd:enumeration value="progress" />
+            <xsd:enumeration value="epilogue" />
+        </xsd:restriction>
+
+    </xsd:simpleType>
+
+    <!-- ================================================================ -->
+
+    <xsd:simpleType name="TalkType">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+発言種別
+
+public => 白発言
+wolf => 赤発言
+private => 灰発言
+grave => 青発言
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="public"  />
+            <xsd:enumeration value="wolf"    />
+            <xsd:enumeration value="private" />
+            <xsd:enumeration value="grave"   />
+        </xsd:restriction>
+
+    </xsd:simpleType>
+
+    <!-- ================================================================ -->
+
+    <xsd:simpleType name="EventFamily">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+システムイベント種別
+
+announce => システムイベント白
+order => システムイベント赤
+extra => システムイベント灰
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="announce" />
+            <xsd:enumeration value="order"    />
+            <xsd:enumeration value="extra"    />
+        </xsd:restriction>
+
+    </xsd:simpleType>
+
+    <!-- ================================================================ -->
+
+    <xsd:simpleType name="Team">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+陣営
+
+village => 村人
+wolf => 人狼
+hamster => ハムスター人間
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="village" />
+            <xsd:enumeration value="wolf"    />
+            <xsd:enumeration value="hamster" />
+        </xsd:restriction>
+
+    </xsd:simpleType>
+
+    <!-- ================================================================ -->
+
+    <xsd:simpleType name="Role">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+役職
+
+innocent => 村人
+wolf => 人狼
+seer => 占い師
+shaman => 霊能者
+madman => 狂人
+hunter => 狩人
+frater => 共有者
+hamster => ハムスター人間
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="innocent" />
+            <xsd:enumeration value="wolf"     />
+            <xsd:enumeration value="seer"     />
+            <xsd:enumeration value="shaman"   />
+            <xsd:enumeration value="madman"   />
+            <xsd:enumeration value="hunter"   />
+            <xsd:enumeration value="frater"   />
+            <xsd:enumeration value="hamster"  />
+        </xsd:restriction>
+
+    </xsd:simpleType>
+
+    <!-- ================================================================ -->
+
+    <xsd:simpleType name="AvatarId">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+Avatarの識別子。
+日本語OK。ハイフン禁止。
+XMLのID(xsd:ID)の一部としてハイフンなどと繋げて再利用される可能性あり。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+
+        <xsd:restriction base="xsd:NCName">
+            <xsd:pattern value="[^\-]+"/>
+        </xsd:restriction>
+
+    </xsd:simpleType>
+
+    <!-- ================================================================ -->
+
+    <xsd:simpleType name="PlayerId">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+各プレイヤーのログイン名。
+各国ログイン名の制約詳細は不明。とりあえずタブと改行禁止。
+E国TypeKeyIDからニックネームを分離認識する作業はアプリ側の責務。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+
+        <xsd:restriction base="xsd:string">
+            <xsd:pattern value="[^\n\r\t]+" />
+            <xsd:whiteSpace value="preserve" fixed="true"/>
+        </xsd:restriction>
+
+    </xsd:simpleType>
+
+    <!-- ================================================================ -->
+
+    <xsd:simpleType name="DisclosureType">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+発言の公開状況。
+「hot」ならその日はプレイ真っ最中の最新日。
+「uncomplete」ならまだその日の未公開発言を取得していない可能性がある。
+「complete」ならその日の全発言は完全に公開された。
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="hot" />
+            <xsd:enumeration value="uncomplete" />
+            <xsd:enumeration value="complete" />
+        </xsd:restriction>
+
+    </xsd:simpleType>
+
+    <!-- ================================================================ -->
+
+    <xsd:simpleType name="IntList">
+        <xsd:annotation>
+<xsd:documentation><![CDATA[
+############################################################################
+整数の並び。
+コンマ','で数字を区切る。
+ハイフン'-'を使って範囲指定も可能。
+例) 「1,2,7-15,21」
+############################################################################
+]]></xsd:documentation>
+        </xsd:annotation>
+
+        <xsd:restriction base="xsd:string">
+            <xsd:pattern value="[0-9]+( *\- *[0-9]+)?( *, *[0-9]+( *\- *[0-9]+)?)*" />
+            <xsd:whiteSpace value="preserve" fixed="true"/>
+        </xsd:restriction>
+
+    </xsd:simpleType>
+
+</xsd:schema>
+
+<!-- EOF -->
diff --git a/src/main/resources/jp/sourceforge/jindolf/archiver/resources/xmldummy.xsd b/src/main/resources/jp/sourceforge/jindolf/archiver/resources/xmldummy.xsd
new file mode 100644 (file)
index 0000000..2bebef1
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xsd:schema
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    targetNamespace="http://www.w3.org/XML/1998/namespace"
+>
+
+    <xsd:annotation>
+        <xsd:documentation>
+            See
+            http://www.w3.org/2001/xml.xsd
+            http://www.w3.org/2009/01/xml.xsd
+        </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:attribute name="space">
+        <xsd:simpleType>
+            <xsd:restriction base="xsd:NCName">
+                <xsd:enumeration value="default"/>
+                <xsd:enumeration value="preserve"/>
+            </xsd:restriction>
+        </xsd:simpleType>
+    </xsd:attribute>
+
+    <xsd:attribute name="lang">
+        <xsd:simpleType>
+            <xsd:union memberTypes="xsd:language">
+                <xsd:simpleType>
+                    <xsd:restriction base="xsd:string">
+                        <xsd:enumeration value=""/>
+                    </xsd:restriction>
+                </xsd:simpleType>
+            </xsd:union>
+        </xsd:simpleType>
+    </xsd:attribute>
+
+    <xsd:attribute name="base" type="xsd:anyURI">
+    </xsd:attribute>
+
+</xsd:schema>
+
+
+<!-- EOF -->