0

各 SVG 要素の許容されるコンテンツ要素を記述する perl ハッシュを構築しようとしています。これを実行できる perl スクリプトを持っている人はいますか?

4

2 に答える 2

1
{
  "altGlyphDef"         => ["glyphRef", "altGlyphItem"],
  "animate"             => ["desc", "metadata", "title"],
  "animateColor"        => ["desc", "metadata", "title"],
  "animateTransform"    => ["desc", "metadata", "title"],
  "circle"              => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                           ],
  "clipPath"            => [
                             "desc",
                             "metadata",
                             "title",
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "circle",
                             "ellipse",
                             "line",
                             "path",
                             "polygon",
                             "polyline",
                             "rect",
                             "text",
                             "use",
                           ],
  "color-profile"       => ["desc", "metadata", "title"],
  "cursor"              => ["desc", "metadata", "title"],
  "defs"                => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                             "circle",
                             "ellipse",
                             "line",
                             "path",
                             "polygon",
                             "polyline",
                             "rect",
                             "defs",
                             "g",
                             "svg",
                             "symbol",
                             "use",
                             "linearGradient",
                             "radialGradient",
                             "a",
                             "altGlyphDef",
                             "clipPath",
                             "color-profile",
                             "cursor",
                             "filter",
                             "font",
                             "font-face",
                             "foreignObject",
                             "image",
                             "marker",
                             "mask",
                             "pattern",
                             "script",
                             "style",
                             "switch",
                             "text",
                             "view",
                           ],
  "ellipse"             => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                           ],
  "feBlend"             => ["animate", "set"],
  "feColorMatrix"       => ["animate", "set"],
  "feComponentTransfer" => ["feFuncA", "feFuncB", "feFuncG", "feFuncR"],
  "feComposite"         => ["animate", "set"],
  "feConvolveMatrix"    => ["animate", "set"],
  "feDisplacementMap"   => ["animate", "set"],
  "feDistantLight"      => ["animate", "set"],
  "feFlood"             => ["animate", "animateColor", "set"],
  "feGaussianBlur"      => ["animate", "set"],
  "feImage"             => ["animate", "animateTransform", "set"],
  "feMerge"             => ["feMergeNode"],
  "feMorphology"        => ["animate", "set"],
  "feOffset"            => ["animate", "set"],
  "fePointLight"        => ["animate", "set"],
  "feSpotLight"         => ["animate", "set"],
  "feTile"              => ["animate", "set"],
  "feTurbulence"        => ["animate", "set"],
  "filter"              => [
                             "desc",
                             "metadata",
                             "title",
                             "feBlend",
                             "feColorMatrix",
                             "feComponentTransfer",
                             "feComposite",
                             "feConvolveMatrix",
                             "feDiffuseLighting",
                             "feDisplacementMap",
                             "feFlood",
                             "feGaussianBlur",
                             "feImage",
                             "feMerge",
                             "feMorphology",
                             "feOffset",
                             "feSpecularLighting",
                             "feTile",
                             "feTurbulence",
                             "animate",
                             "set",
                           ],
  "font"                => [
                             "desc",
                             "metadata",
                             "title",
                             "font-face",
                             "glyph",
                             "hkern",
                             "missing-glyph",
                             "vkern",
                           ],
  "font-face-src"       => ["font-face-name", "font-face-uri"],
  "font-face-uri"       => ["font-face-format"],
  "g"                   => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                             "circle",
                             "ellipse",
                             "line",
                             "path",
                             "polygon",
                             "polyline",
                             "rect",
                             "defs",
                             "g",
                             "svg",
                             "symbol",
                             "use",
                             "linearGradient",
                             "radialGradient",
                             "a",
                             "altGlyphDef",
                             "clipPath",
                             "color-profile",
                             "cursor",
                             "filter",
                             "font",
                             "font-face",
                             "foreignObject",
                             "image",
                             "marker",
                             "mask",
                             "pattern",
                             "script",
                             "style",
                             "switch",
                             "text",
                             "view",
                           ],
  "glyph"               => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                             "circle",
                             "ellipse",
                             "line",
                             "path",
                             "polygon",
                             "polyline",
                             "rect",
                             "defs",
                             "g",
                             "svg",
                             "symbol",
                             "use",
                             "linearGradient",
                             "radialGradient",
                             "a",
                             "altGlyphDef",
                             "clipPath",
                             "color-profile",
                             "cursor",
                             "filter",
                             "font",
                             "font-face",
                             "foreignObject",
                             "image",
                             "marker",
                             "mask",
                             "pattern",
                             "script",
                             "style",
                             "switch",
                             "text",
                             "view",
                           ],
  "image"               => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                           ],
  "line"                => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                           ],
  "linearGradient"      => [
                             "desc",
                             "metadata",
                             "title",
                             "animate",
                             "animateTransform",
                             "set",
                             "stop",
                           ],
  "marker"              => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                             "circle",
                             "ellipse",
                             "line",
                             "path",
                             "polygon",
                             "polyline",
                             "rect",
                             "defs",
                             "g",
                             "svg",
                             "symbol",
                             "use",
                             "linearGradient",
                             "radialGradient",
                             "a",
                             "altGlyphDef",
                             "clipPath",
                             "color-profile",
                             "cursor",
                             "filter",
                             "font",
                             "font-face",
                             "foreignObject",
                             "image",
                             "marker",
                             "mask",
                             "pattern",
                             "script",
                             "style",
                             "switch",
                             "text",
                             "view",
                           ],
  "mask"                => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                             "circle",
                             "ellipse",
                             "line",
                             "path",
                             "polygon",
                             "polyline",
                             "rect",
                             "defs",
                             "g",
                             "svg",
                             "symbol",
                             "use",
                             "linearGradient",
                             "radialGradient",
                             "a",
                             "altGlyphDef",
                             "clipPath",
                             "color-profile",
                             "cursor",
                             "filter",
                             "font",
                             "font-face",
                             "foreignObject",
                             "image",
                             "marker",
                             "mask",
                             "pattern",
                             "script",
                             "style",
                             "switch",
                             "text",
                             "view",
                           ],
  "missing-glyph"       => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                             "circle",
                             "ellipse",
                             "line",
                             "path",
                             "polygon",
                             "polyline",
                             "rect",
                             "defs",
                             "g",
                             "svg",
                             "symbol",
                             "use",
                             "linearGradient",
                             "radialGradient",
                             "a",
                             "altGlyphDef",
                             "clipPath",
                             "color-profile",
                             "cursor",
                             "filter",
                             "font",
                             "font-face",
                             "foreignObject",
                             "image",
                             "marker",
                             "mask",
                             "pattern",
                             "script",
                             "style",
                             "switch",
                             "text",
                             "view",
                           ],
  "path"                => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                           ],
  "pattern"             => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                             "circle",
                             "ellipse",
                             "line",
                             "path",
                             "polygon",
                             "polyline",
                             "rect",
                             "defs",
                             "g",
                             "svg",
                             "symbol",
                             "use",
                             "linearGradient",
                             "radialGradient",
                             "a",
                             "altGlyphDef",
                             "clipPath",
                             "color-profile",
                             "cursor",
                             "filter",
                             "font",
                             "font-face",
                             "foreignObject",
                             "image",
                             "marker",
                             "mask",
                             "pattern",
                             "script",
                             "style",
                             "switch",
                             "text",
                             "view",
                           ],
  "polygon"             => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                           ],
  "polyline"            => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                           ],
  "radialGradient"      => [
                             "desc",
                             "metadata",
                             "title",
                             "animate",
                             "animateTransform",
                             "set",
                             "stop",
                           ],
  "rect"                => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                           ],
  "set"                 => ["desc", "metadata", "title"],
  "stop"                => ["animate", "animateColor", "set"],
  "svg"                 => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                             "circle",
                             "ellipse",
                             "line",
                             "path",
                             "polygon",
                             "polyline",
                             "rect",
                             "defs",
                             "g",
                             "svg",
                             "symbol",
                             "use",
                             "linearGradient",
                             "radialGradient",
                             "a",
                             "altGlyphDef",
                             "clipPath",
                             "color-profile",
                             "cursor",
                             "filter",
                             "font",
                             "font-face",
                             "foreignObject",
                             "image",
                             "marker",
                             "mask",
                             "pattern",
                             "script",
                             "style",
                             "switch",
                             "text",
                             "view",
                           ],
  "switch"              => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                             "circle",
                             "ellipse",
                             "line",
                             "path",
                             "polygon",
                             "polyline",
                             "rect",
                             "a",
                             "foreignObject",
                             "g",
                             "image",
                             "svg",
                             "switch",
                             "text",
                             "use",
                           ],
  "symbol"              => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                             "circle",
                             "ellipse",
                             "line",
                             "path",
                             "polygon",
                             "polyline",
                             "rect",
                             "defs",
                             "g",
                             "svg",
                             "symbol",
                             "use",
                             "linearGradient",
                             "radialGradient",
                             "a",
                             "altGlyphDef",
                             "clipPath",
                             "color-profile",
                             "cursor",
                             "filter",
                             "font",
                             "font-face",
                             "foreignObject",
                             "image",
                             "marker",
                             "mask",
                             "pattern",
                             "script",
                             "style",
                             "switch",
                             "text",
                             "view",
                           ],
  "text"                => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                             "altGlyph",
                             "textPath",
                             "tref",
                             "tspan",
                             "a",
                           ],
  "textPath"            => [
                             "desc",
                             "metadata",
                             "title",
                             "a",
                             "altGlyph",
                             "animate",
                             "animateColor",
                             "set",
                             "tref",
                             "tspan",
                           ],
  "tref"                => ["desc", "metadata", "title", "animate", "animateColor", "set"],
  "tspan"               => [
                             "desc",
                             "metadata",
                             "title",
                             "a",
                             "altGlyph",
                             "animate",
                             "animateColor",
                             "set",
                             "tref",
                             "tspan",
                           ],
  "use"                 => [
                             "animate",
                             "animateColor",
                             "animateMotion",
                             "animateTransform",
                             "set",
                             "desc",
                             "metadata",
                             "title",
                           ],
  "view"                => ["desc", "metadata", "title"],
}
于 2013-09-10T20:32:18.740 に答える