OSDN Git Service

XMLスキーマを追加。
authorsirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Sat, 3 Sep 2011 11:50:05 +0000 (11:50 +0000)
committersirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Sat, 3 Sep 2011 11:50:05 +0000 (11:50 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/tpi/tpi@558 9df91469-1e22-0410-86e7-ea8537beb833

bin/lib/7zArc.xml
bin/lib/calLibrary.xml
bin/lib/cuiWrapper.xml
doc/files.html
doc/history.html
doc/readme.html
doc/schema.xsd [new file with mode: 0644]
doc/schema.xsl [new file with mode: 0644]
doc/style.css

index be468bb..5ab7524 100644 (file)
@@ -62,7 +62,4 @@
  <library name="0x0c" typename="XZ"       suffix="xz"          extract=''    test='' archive="0" disable-win="1"
         level-min="0" level-max="9"
         create  ='-mx=%94' />
- <!--
-; 7zArc plug-in. See cuiWrapper.xml for details.
--->
 </libraries>
index f221eb5..9c6c552 100644 (file)
  <library name="Bga32.dll" prefix="Bga" typename="BZA" suffix="bza"
         level-min="1" level-max="9"
         create  ='a -a -i -r -l%94 -m2 "%90" "%91" "@%92"' />
- <!--
-; calLibrary plug-in. See cuiWrapper.xml for details.
-;   Samples(older, disabled):
--->
+
+ <!-- Samples(older, disabled): -->
+
  <library name="7-zip32.dll" prefix="SevenZip" typename="7z" suffix="7z" disable="1"
         level-min="0" level-max="9"
         create  ='a -mx=%94 -hide -ssw -ms=%a2{on|off} -mhe=%a4{on|off} %a5{"-p#"|} %a7{-v#|} %a1{-sfx|} -t7z -- "%90" "%91" "@%92"'
index 2ed7c8b..ae15520 100644 (file)
         test    ='k "%90"' />
  <library name="gcac" typename="GCA" suffix="gca" quote-resp="0"
         create  ='%a2{s|a} %a5{"-p#"|} %a6{"-k#"|} "-o%92" "%90"' />
- <!--
-; cuiWrapper plug-in.
-;   Constant:
-;           %%  : %
-;   Variable:
-;           %90 : Archive name.
-;           %92 : Response file name.
-;           %93 : Target files.
-;       Create/Add:
-;           %91 : Base directory.
-;           %94 : Compression level.
-;           %95 : Recovery Record.
-;           %96 : Comment.
-;       Extract/Sfx:
-;           %91 : Destination directory.
-;   Valiable/If:
-;           %a0 : Enable pathes.
-;       Create/Add:
-;           %a1 : Make SFX.
-;           %a2 : Solid compression.
-;           %a3 : Multimedia optimization.
-;           %a4 : Encrypt header.
-;           %a5 : Enable Password.(Use # for actual string)
-;           %a6 : Enable Keyfile. (Use # for actual string)
-;           %a7 : Split size.     (Use # for actual size)
-;
-;   Samples(older,disabled):
--->
+
+ <!-- Samples(older,disabled): -->
+
  <library name="7z" typename="7z" suffix="7z;zip;lzh;lha;cab;rpm;deb;cpio;iso;dmg;hfs;msi" disable="1"
         list    ='l -- "%90"'
         list-line-s ='------------------- ----- ------------ ------------  ------------------------' list-line-c="1"
index 4130907..7602ab6 100644 (file)
@@ -14,6 +14,7 @@
    <li>Files</li>\r
    <li><a href="history.html">History</a></li>\r
    <li><a href="api/index.html">TPI spec</a></li>\r
+   <li><a href="schema.xsd">XML spec</a></li>\r
    <li><a href="license.txt">License</a></li>\r
    <li><br /></li>\r
    <li>Files:</li>\r
index da47273..124ec54 100644 (file)
@@ -14,6 +14,7 @@
    <li><a href="files.html">Files</a></li>\r
    <li>History</li>\r
    <li><a href="api/index.html">TPI spec</a></li>\r
+   <li><a href="schema.xsd">XML spec</a></li>\r
    <li><a href="license.txt">License</a></li>\r
    <li><br /></li>\r
    <li>History:</li>\r
    <li><a href="#0.01beta12">0.01&beta;12</a></li>\r
    <li><a href="#0.01beta11">0.01&beta;11</a></li>\r
    <li><a href="#0.01beta10">0.01&beta;10</a></li>\r
-   <li><a href="#0.01beta9">0.01&beta;9</a></li>\r
-   <li><a href="#0.01beta8">0.01&beta;8</a></li>\r
-   <li><a href="#0.01beta7">0.01&beta;7</a></li>\r
-   <li><a href="#0.01beta6">0.01&beta;6</a></li>\r
-   <li><a href="#0.01beta5">0.01&beta;5</a></li>\r
-   <li><a href="#0.01beta4">0.01&beta;4</a></li>\r
-   <li><a href="#0.01beta3">0.01&beta;3</a></li>\r
-   <li><a href="#0.01beta2">0.01&beta;2</a></li>\r
-   <li><a href="#0.01beta">0.01&beta;</a></li>\r
+   <li>...</li>\r
    <li><a href="#0.00.20090822">0.00.090822</a></li>\r
-   <li><a href="#0.00.20090813">0.00.090813</a></li>\r
-   <li><a href="#0.00.20090429">0.00.090429</a></li>\r
-   <li><a href="#0.00.20061120">0.00.061120</a></li>\r
   </ul>\r
 \r
   <h2>History</h2>\r
index abd9ac7..345a370 100644 (file)
@@ -19,6 +19,7 @@
    <li><a href="files.html">Files</a></li>\r
    <li><a href="history.html">History</a></li>\r
    <li><a href="api/index.html">TPI spec</a></li>\r
+   <li><a href="schema.xsd">XML spec</a></li>\r
    <li><a href="license.txt">License</a></li>\r
    <li><br /></li>\r
    <li>Readme:</li>\r
diff --git a/doc/schema.xsd b/doc/schema.xsd
new file mode 100644 (file)
index 0000000..d914642
--- /dev/null
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>\r
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">\r
+ <xs:element name="libraries" type="tLibraries">\r
+  <xs:annotation>\r
+   <xs:documentation>Root element.</xs:documentation>\r
+  </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:complexType name="tLibraries">\r
+  <xs:sequence>\r
+   <xs:element ref="library" minOccurs="0" maxOccurs="unbounded" />\r
+  </xs:sequence>\r
+ </xs:complexType>\r
+\r
+ <xs:attributeGroup name="gList">\r
+  <xs:annotation>\r
+   <xs:documentation>\r
+    Attributes to parse standard output.\r
+    Suffix:\r
+        line-s : Start line to parse.\r
+        line-e : End line to parse. Default is the value of line-s.\r
+        line-c : The number of line used for each file.\r
+        s      : Start position of string to get.\r
+        c      : Length of string to get. Default is until the end of line.\r
+        l      : Line of string to get.\r
+        f      : Format of string to get(strftime format).\r
+   </xs:documentation>\r
+  </xs:annotation>\r
+  <xs:attribute name="list-line-s"      type="xs:string" />\r
+  <xs:attribute name="list-line-e"      type="xs:string" />\r
+  <xs:attribute name="list-line-c"      type="xs:int" default="1" />\r
+  <xs:attribute name="list-fname-s"     type="xs:int" />\r
+  <xs:attribute name="list-fname-c"     type="xs:int" />\r
+  <xs:attribute name="list-fname-l"     type="xs:int" default="1" />\r
+  <xs:attribute name="list-usize-s"     type="xs:int" />\r
+  <xs:attribute name="list-usize-c"     type="xs:int" />\r
+  <xs:attribute name="list-usize-l"     type="xs:int" default="1" />\r
+  <xs:attribute name="list-psize-s"     type="xs:int" />\r
+  <xs:attribute name="list-psize-c"     type="xs:int" />\r
+  <xs:attribute name="list-psize-l"     type="xs:int" default="1" />\r
+  <xs:attribute name="list-date-s"      type="xs:int" />\r
+  <xs:attribute name="list-date-c"      type="xs:int" />\r
+  <xs:attribute name="list-date-l"      type="xs:int" default="1" />\r
+  <xs:attribute name="list-date-f"      type="xs:string" />\r
+ </xs:attributeGroup>\r
+\r
+ <xs:simpleType name="tCmdLine">\r
+  <xs:annotation>\r
+   <xs:documentation>\r
+    Command line with some special variables.\r
+    Constant:\r
+            %%  : %\r
+    Variable:\r
+            %90 : Archive name.\r
+            %92 : Response file name.\r
+            %93 : Target files.\r
+        Create/Add:\r
+            %91 : Base directory.\r
+            %94 : Compression level.\r
+            %95 : Recovery Record.\r
+            %96 : Comment.\r
+        Extract/Sfx:\r
+            %91 : Destination directory.\r
+    Valiable/If:\r
+            %a0 : Enable pathes.\r
+        Create/Add:\r
+            %a1 : Make SFX.\r
+            %a2 : Solid compression.\r
+            %a3 : Multimedia optimization.\r
+            %a4 : Encrypt header.\r
+            %a5 : Enable Password.(Use # for actual string)\r
+            %a6 : Enable Keyfile. (Use # for actual string)\r
+            %a7 : Split size.     (Use # for actual size)\r
+   </xs:documentation>\r
+  </xs:annotation>\r
+  <xs:restriction base="xs:string" />\r
+ </xs:simpleType>\r
+\r
+ <xs:attributeGroup name="gCmdLine">\r
+  <xs:annotation>\r
+   <xs:documentation>\r
+    Attributes to set command line.\r
+    Suffix:\r
+        (none)  : Command line sent to library.\r
+        alt     : Command line sent to alternative library.\r
+        disabled: Ignored.\r
+   </xs:documentation>\r
+  </xs:annotation>\r
+  <xs:attribute name="list"             type="tCmdLine" />\r
+  <xs:attribute name="list-alt"         type="tCmdLine" />\r
+  <xs:attribute name="create"           type="tCmdLine" />\r
+  <xs:attribute name="create-alt"       type="tCmdLine" />\r
+  <xs:attribute name="create-disabled"  type="tCmdLine" />\r
+  <xs:attribute name="add"              type="tCmdLine" />\r
+  <xs:attribute name="add-alt"          type="tCmdLine" />\r
+  <xs:attribute name="add-disabled"     type="tCmdLine" />\r
+  <xs:attribute name="extract"          type="tCmdLine" />\r
+  <xs:attribute name="extract-alt"      type="tCmdLine" />\r
+  <xs:attribute name="extract-disabled" type="tCmdLine" />\r
+  <xs:attribute name="delete"           type="tCmdLine" />\r
+  <xs:attribute name="delete-alt"       type="tCmdLine" />\r
+  <xs:attribute name="delete-disabled"  type="tCmdLine" />\r
+  <xs:attribute name="update"           type="tCmdLine" />\r
+  <xs:attribute name="update-alt"       type="tCmdLine" />\r
+  <xs:attribute name="update-disabled"  type="tCmdLine" />\r
+  <xs:attribute name="test"             type="tCmdLine" />\r
+  <xs:attribute name="test-alt"         type="tCmdLine" />\r
+  <xs:attribute name="test-disabled"    type="tCmdLine" />\r
+  <xs:attribute name="repair"           type="tCmdLine" />\r
+  <xs:attribute name="repair-alt"       type="tCmdLine" />\r
+  <xs:attribute name="repair-disabled"  type="tCmdLine" />\r
+  <xs:attribute name="move"             type="tCmdLine" />\r
+  <xs:attribute name="move-alt"         type="tCmdLine" />\r
+  <xs:attribute name="move-disabled"    type="tCmdLine" />\r
+  <xs:attribute name="sfx"              type="tCmdLine" />\r
+  <xs:attribute name="sfx-alt"          type="tCmdLine" />\r
+  <xs:attribute name="sfx-disabled"     type="tCmdLine" />\r
+  <xs:attribute name="unsfx"            type="tCmdLine" />\r
+  <xs:attribute name="unsfx-alt"        type="tCmdLine" />\r
+  <xs:attribute name="unsfx-disabled"   type="tCmdLine" />\r
+ </xs:attributeGroup>\r
+\r
+ <xs:simpleType name="tSuffix">\r
+  <xs:annotation>\r
+   <xs:documentation>Semicolon-separated extension list.</xs:documentation>\r
+  </xs:annotation>\r
+  <xs:restriction base="xs:string">\r
+   <xs:pattern value="[^;]*(;[^;]+)*" />\r
+  </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:element name="library" type="tLibrary">\r
+  <xs:annotation>\r
+   <xs:documentation>Library setting.</xs:documentation>\r
+  </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:complexType name="tLibrary">\r
+  <xs:attribute name="typename"         type="xs:string" use="required">\r
+   <xs:annotation>\r
+    <xs:documentation>Name of format.</xs:documentation>\r
+   </xs:annotation>\r
+  </xs:attribute>\r
+  <xs:attribute name="name"             type="xs:string" use="required">\r
+   <xs:annotation>\r
+    <xs:documentation>Name of library.</xs:documentation>\r
+   </xs:annotation>\r
+  </xs:attribute>\r
+  <xs:attribute name="name-alt"         type="xs:string">\r
+   <xs:annotation>\r
+    <xs:documentation>Name of alternative library.</xs:documentation>\r
+   </xs:annotation>\r
+  </xs:attribute>\r
+  <xs:attribute name="prefix"           type="xs:string">\r
+   <xs:annotation>\r
+    <xs:documentation>API prefix of the library.</xs:documentation>\r
+   </xs:annotation>\r
+  </xs:attribute>\r
+  <xs:attribute name="prefix-alt"       type="xs:string" />\r
+  <xs:attribute name="suffix"           type="tSuffix" />\r
+  <xs:attribute name="unicode"          type="xs:boolean" default="0">\r
+   <xs:annotation>\r
+    <xs:documentation>True when the library supports Unicode.</xs:documentation>\r
+   </xs:annotation>\r
+  </xs:attribute>\r
+  <xs:attribute name="unicode-alt"      type="xs:boolean" default="0" />\r
+  <xs:attribute name="archive"          type="xs:boolean" default="1">\r
+   <xs:annotation>\r
+    <xs:documentation>True when the format can store multiple files.</xs:documentation>\r
+   </xs:annotation>\r
+  </xs:attribute>\r
+  <xs:attribute name="quote-resp"       type="xs:boolean" default="1">\r
+   <xs:annotation>\r
+    <xs:documentation>True when quotation of the filename is needed in responce file.</xs:documentation>\r
+   </xs:annotation>\r
+  </xs:attribute>\r
+\r
+  <xs:attribute name="disable"          type="xs:boolean" default="0" />\r
+  <xs:attribute name="disable-win"      type="xs:boolean" default="0" />\r
+  <xs:attribute name="disable-lin"      type="xs:boolean" default="0" />\r
+\r
+  <xs:attribute name="level-min"        type="xs:int" />\r
+  <xs:attribute name="level-max"        type="xs:int" />\r
+  <xs:attribute name="rr-min"           type="xs:int" />\r
+  <xs:attribute name="rr-max"           type="xs:int" />\r
+\r
+  <xs:attributeGroup ref="gList" />\r
+  <xs:attributeGroup ref="gCmdLine" />\r
+ </xs:complexType>\r
+</xs:schema>\r
diff --git a/doc/schema.xsl b/doc/schema.xsl
new file mode 100644 (file)
index 0000000..2611f9e
--- /dev/null
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<xsl:stylesheet version="1.0"\r
+  xmlns    ="http://www.w3.org/1999/xhtml"\r
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
+  xmlns:xs ="http://www.w3.org/2001/XMLSchema">\r
+<xsl:template match="/">\r
+ <xsl:apply-templates select="xs:schema" />\r
+</xsl:template>\r
+\r
+<xsl:template match="xs:schema">\r
+ <html xml:lang="ja">\r
+  <head>\r
+   <title>XML Schema</title>\r
+   <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />\r
+   <link rel="stylesheet" href="style.css" type="text/css" />\r
+  </head>\r
+  <body>\r
+   <h1>XML Schema</h1>\r
+\r
+  <ul id="menu">\r
+   <li><a href="readme.html">Readme</a></li>\r
+   <li><a href="files.html">Files</a></li>\r
+   <li><a href="history.html">History</a></li>\r
+   <li><a href="api/index.html">TPI spec</a></li>\r
+   <li>XML spec</li>\r
+   <li><a href="license.txt">License</a></li>\r
+   <li><br /></li>\r
+   <li>XML spec:</li>\r
+   <li><a href="#element">Element</a></li>\r
+   <li><a href="#complex">Complex type</a></li>\r
+   <li><a href="#simple">Simple type</a></li>\r
+   <li><a href="#attrgrp">Attribute group</a></li>\r
+  </ul>\r
+\r
+   <h2 id="element">Element</h2>\r
+   <xsl:apply-templates select="xs:element" />\r
+   <h2 id="complex">Complex type</h2>\r
+   <xsl:apply-templates select="xs:complexType" />\r
+   <h2 id="simple">Simple type</h2>\r
+   <xsl:apply-templates select="xs:simpleType" />\r
+   <h2 id="attrgrp">Attribute group</h2>\r
+   <xsl:apply-templates select="xs:attributeGroup" />\r
+  </body>\r
+ </html>\r
+</xsl:template>\r
+\r
+<xsl:template name="base">\r
+ <h3>\r
+  <xsl:attribute name="id">\r
+   <xsl:value-of select="@name" />\r
+  </xsl:attribute>\r
+  <xsl:value-of select="@name" />\r
+ </h3>\r
+ <div style="white-space:pre">\r
+  <xsl:value-of select="xs:annotation/xs:documentation" />\r
+ </div>\r
+ <xsl:apply-templates select="xs:sequence" />\r
+</xsl:template>\r
+\r
+<xsl:template name="type">\r
+ <xsl:choose>\r
+  <xsl:when test="@type='xs:string'">(string)</xsl:when>\r
+  <xsl:when test="@type='xs:int'">(int)</xsl:when>\r
+  <xsl:when test="@type='xs:boolean'">(bool)</xsl:when>\r
+  <xsl:otherwise>\r
+   <a>\r
+    <xsl:attribute name="href">#<xsl:value-of select="@type" /></xsl:attribute>\r
+    <xsl:value-of select="@type" />\r
+   </a>\r
+  </xsl:otherwise>\r
+ </xsl:choose>\r
+</xsl:template>\r
+\r
+<xsl:template name="attributes">\r
+ <xsl:if test="count(xs:attribute)!=0">\r
+ <table>\r
+  <colgroup span="1" />\r
+  <colgroup>\r
+   <col span="1" style="text-align: center" />\r
+   <col span="1" style="text-align: right" />\r
+  </colgroup>\r
+  <thead>\r
+   <tr><th>attribute</th><th>type</th><th>default</th><th>description</th></tr>\r
+  </thead>\r
+  <tbody>\r
+   <xsl:for-each select="xs:attribute">\r
+    <tr>\r
+     <td>\r
+      <xsl:if test="@use='required'">\r
+       <xsl:attribute name="style">color: red</xsl:attribute>\r
+       <xsl:attribute name="title">Required</xsl:attribute>\r
+      </xsl:if>\r
+      <xsl:value-of select="@name" />\r
+     </td>\r
+     <td><xsl:call-template name="type" /></td>\r
+     <td><xsl:value-of select="@default" /></td>\r
+     <td><xsl:value-of select="xs:annotation/xs:documentation" /></td>\r
+    </tr>\r
+   </xsl:for-each>\r
+   <xsl:if test="count(xs:attributeGroup)!=0">\r
+    <tr>\r
+     <td colspan="4">\r
+      Attribute group: \r
+      <xsl:for-each select="xs:attributeGroup">\r
+       <a>\r
+        <xsl:attribute name="href">#<xsl:value-of select="@ref" /></xsl:attribute>\r
+        <xsl:value-of select="@ref" />\r
+       </a>\r
+       <xsl:if test="position()!=last()">, </xsl:if>\r
+      </xsl:for-each>\r
+     </td>\r
+    </tr>\r
+   </xsl:if>\r
+  </tbody>\r
+ </table>\r
+ </xsl:if>\r
+</xsl:template>\r
+\r
+<xsl:template match="xs:simpleType">\r
+ <xsl:call-template name="base" />\r
+ <h4>Restriction</h4>\r
+ <p>Derived from <xsl:value-of select="xs:restriction/@base" />.</p>\r
+</xsl:template>\r
+\r
+<xsl:template match="xs:complexType">\r
+ <xsl:call-template name="base" />\r
+ <xsl:call-template name="attributes" />\r
+</xsl:template>\r
+\r
+<xsl:template match="xs:attributeGroup">\r
+ <xsl:call-template name="base" />\r
+ <xsl:call-template name="attributes" />\r
+</xsl:template>\r
+\r
+<xsl:template match="xs:element">\r
+ <xsl:call-template name="base" />\r
+ <p>Type is <xsl:call-template name="type" />.</p>\r
+</xsl:template>\r
+\r
+<xsl:template match="xs:sequence">\r
+ <h4>Children</h4>\r
+ <table>\r
+  <thead>\r
+   <tr><th>name</th><th>min</th><th>max</th></tr>\r
+  </thead>\r
+  <tbody>\r
+   <xsl:for-each select="xs:element">\r
+    <tr>\r
+     <td>\r
+      <a>\r
+       <xsl:attribute name="href">#<xsl:value-of select="@ref" /></xsl:attribute>\r
+       <xsl:value-of select="@ref" />\r
+      </a>\r
+     </td>\r
+     <td><xsl:value-of select="@minOccurs" /></td>\r
+     <td><xsl:value-of select="@maxOccurs" /></td>\r
+    </tr>\r
+   </xsl:for-each>\r
+  </tbody>\r
+ </table>\r
+</xsl:template>\r
+\r
+</xsl:stylesheet>
\ No newline at end of file
index 186db51..526b9d7 100644 (file)
@@ -1,7 +1,7 @@
 \r
 body\r
 {\r
-  margin: auto 15%;\r
+  margin: 1% 15%;\r
   border-left: 1px solid #ccffcc;\r
   border-right:1px solid #ccffcc;\r
 }\r
@@ -86,3 +86,20 @@ kbd, code
   border: 1px solid #aaaaaa;\r
   background-color: #eeeeee;\r
 }\r
+\r
+th\r
+{\r
+  background-color: #f5fff5;\r
+  font-weight: normal;\r
+}\r
+\r
+td\r
+{\r
+  background-color: #f5f5ff;\r
+}\r
+\r
+table\r
+{\r
+  margin: auto 2%;\r
+  width: 96%;\r
+}\r