Difference between revisions of "Talk:INX extension descriptor format"

From Inkscape Wiki
Jump to: navigation, search
m (Relax NG Compact)
Line 6: Line 6:
  
  
== Relax NG Compact ==
+
=== Relax NG Compact ===
 
This is what I get when I convert [http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/annotate/head%3A/share/extensions/inkscape.extension.rng RELAX NG Schema] to Relax NG Compact with Trang. Is this the right version for the current scheme? --[[User:Flor|Flor]] 18:29, 1 November 2010 (UTC)
 
This is what I get when I convert [http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/annotate/head%3A/share/extensions/inkscape.extension.rng RELAX NG Schema] to Relax NG Compact with Trang. Is this the right version for the current scheme? --[[User:Flor|Flor]] 18:29, 1 November 2010 (UTC)
 
<small><pre>
 
<small><pre>

Revision as of 18:30, 1 November 2010

Questions related to the recent changes (Relax NG Compact (RNC)):

  • How does the created Relax NG Compact (RNC) example differ/compare to the RELAX NG Schema in trunk?
  • The Example INX file is outdated - the format was slightly changed in 0.47, see revisions 5472, 5946 and 5947 I added the namespace etc. Does that cover all the changes? --Flor 18:06, 1 November 2010 (UTC)
Additional information (as far as I could find it ;) ): Subject: Extensions (inx) files (inkscape-devel mailing list)

--~suv 06:46, 28 August 2010 (UTC)


Relax NG Compact

This is what I get when I convert RELAX NG Schema to Relax NG Compact with Trang. Is this the right version for the current scheme? --Flor 18:29, 1 November 2010 (UTC)

default namespace =
  "http://www.inkscape.org/namespace/inkscape/extension"

start =
  element inkscape-extension {
    element _name { text },
    element id { text },
    element dependency {
      attribute type { inx.dependency-type.values },
      attribute location { inx.location.values }?,
      attribute _description { text }?,
      text
    }*,
    (inx.parameters
     | element param {
         attribute name { text },
         attribute type { "notebook" },
         element page {
           attribute name { text },
           attribute _gui-text { text },
           inx.parameters+
         }+
       })*,
    (element input {
       inx.io.common,
       element output_extension { text }?
     }
     | element output {
         inx.io.common,
         element dataloss { xsd:boolean }?
       }
     | element effect {
         attribute needs-document { xsd:boolean }?,
         attribute needs-live-preview { xsd:boolean }?,
         element object-type {
           xsd:token "all" | xsd:token "path" | xsd:token "rect"
         },
         element effects-menu {
           attribute hidden { xsd:boolean "true" }
           | element submenu {
               attribute _name { text },
               empty
             }
         }
       }
     | element path-effect { empty }
     | element print { empty }),
    (element script {
       element command {
         inx.reldir.attr,
         attribute interpreter { "python" | "perl" }?,
         text
       },
       element helper_extension { xsd:NMTOKEN }?,
       element check { inx.reldir.attr, text }*
     }
     | element xslt {
         element file { inx.reldir.attr, text }
       }
     | element plugin {
         element name { text }
       })
  }
inx.reldir.attr = attribute reldir { inx.location.values }
inx.location.values = "extensions" | "path" | "plugins"
inx.dependency-type.values = "extension" | "executable" | "plugin"
inx.io.common =
  element extension { text },
  element mimetype { text },
  element _filetypename { text }?,
  element _filetypetooltip { text }?
inx.parameter =
  attribute name { xsd:token },
  attribute gui-hidden { xsd:boolean }?,
  attribute _gui-text { text }?,
  ((attribute type { "int" },
    attribute min { xsd:integer }?,
    attribute max { xsd:integer }?,
    (empty | xsd:integer))
   | (attribute type { "float" },
      attribute precision { xsd:integer }?,
      attribute min { xsd:float }?,
      attribute max { xsd:float }?,
      xsd:float)
   | (attribute type { "boolean" },
      xsd:boolean)
   | (attribute type { "string" },
      attribute max_length { xsd:integer }?,
      (empty | text))
   | (attribute type { "description" },
      text)
   | (attribute type { "enum" },
      (element _item { inx.parameter.enum.item }
       | element item { inx.parameter.enum.item })+)
   | (attribute type { "optiongroup" },
      attribute appearance { "minimal" }?,
      (element option { inx.parameter.optiongroup.option }
       | element _option { inx.parameter.optiongroup.option })+))
inx.parameters =
  element param { inx.parameter }
  | element _param { inx.parameter }
inx.parameter.enum.item =
  attribute value { text },
  xsd:token
inx.parameter.optiongroup.option =
  attribute value { text }?,
  text