{"id":6832,"date":"2019-06-09T06:38:11","date_gmt":"2019-06-08T21:38:11","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=6832"},"modified":"2023-05-28T08:16:06","modified_gmt":"2023-05-27T23:16:06","slug":"%e3%80%90xml%e3%80%91%e3%80%8cdtd%e3%80%8d%e3%82%84%e3%80%8cxml-schma%e3%80%8d%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=6832","title":{"rendered":"\u3010XML\u3011\u30bf\u30b0\u306e\u53d6\u308a\u6c7a\u3081\uff08\u300cDTD\u300d\u3084\u300cXML Schma\uff1axsd\u300d\uff09\u3001\u540d\u524d\u7a7a\u9593\u306b\u3064\u3044\u3066"},"content":{"rendered":"<h2>XML\u306e\u53d6\u308a\u6c7a\u3081\u306b\u3064\u3044\u3066<\/h2>\n<p>XML\u306f\u3001\u4eba\u540c\u58eb\u3084\u3001\u4f01\u696d\u9593\u3068\u304b\u3067\u30c7\u30fc\u30bf\u3092\u3084\u308a\u53d6\u308a\u3059\u308b\u306b\u3042\u305f\u308a\u3001<span style=\"color: #ff0000;\"><strong>\u672c\u5f53\u306b\u305d\u306e\u30c7\u30fc\u30bf\u304c\u6b63\u3057\u3044\u304b\u3069\u3046\u304b\u59a5\u5f53\u6027\u3092\u30c1\u30a7\u30c3\u30af<\/strong><\/span>\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>DTD<\/h2>\n<p>XML\u3067\u306f\u3001\u30bf\u30b0\u306e\u53d6\u308a\u6c7a\u3081\u3092<span style=\"color: #ff0000;\"><strong>DTD(Document Type Definition)<\/strong><\/span>\u3068\u3044\u3046\u4ed5\u69d8\u306b\u3088\u3063\u3066\u898f\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #ff0000;\"><strong>\u300cXML\u6587\u66f8\u4e2d\u306b\u3069\u306e\u3088\u3046\u306b\u8981\u7d20\u3084\u5c5e\u6027\u304c\u73fe\u308c\u308b\u306e\u304b\u300d<\/strong><\/span>\u306e\u53d6\u308a\u6c7a\u3081\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h3>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h3>\n<p>DTD\u306f\u3001XML\u306e\u6587\u6cd5\u3068\u306f\u7570\u306a\u308b\u5f62\u5f0f\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u53d6\u308a\u6271\u3044\u4e0a\u4e0d\u4fbf\u306a\u70b9\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n<p>\u4e3b\u306b\u3001<span style=\"color: #ff0000;\"><strong>\u30c7\u30fc\u30bf\u578b\u3092\u5229\u7528\u3067\u304d\u306a\u304b\u3063\u305f\u308a\u3001<\/strong><strong>DTD\u306f\u30bf\u30b0\u3092\u6df7\u5728\u3059\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u4f5c\u3089\u308c\u3066\u304a\u3089\u305a\u3001\u300c<\/strong><strong>\u540d\u524d\u7a7a\u9593\u300d\u306e\u4f7f\u7528\u3068\u76f8\u6027\u304c\u60aa\u3044<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<p>\u305d\u308c\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u65b0\u305f\u306a\u4ed5\u69d8\u3068\u3057\u3066<span style=\"color: #ff0000;\"><strong>\u300cXML Schema\u300d<\/strong><\/span>\u3068\u3044\u3046\u3082\u306e\u304c\u767b\u5834\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h4>\u540d\u524d\u7a7a\u9593\u3068\u306f\uff1f<\/h4>\n<p>\u4f8b\u3048\u3070\u3001\u5225\u306e\u4f1a\u793e\u304c<span style=\"color: #ff0000;\"><strong>\u4e8c\u3064\u306eXML\u6587\u66f8\u3092\u6271\u3063\u3066\u3044\u3066\u3001\u305d\u308c\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u3044<\/strong><\/span>\u3068\u3044\u3046\u3053\u3068\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u306e\u969b\u306b\u3001\u300c&lt;value&gt;\u300d\u3068\u3044\u3046\u8981\u7d20\u3067\u91cd\u8907\u3057\u3066\u3044\u305f\u5834\u5408\u306f\u3001\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u3088\u3046\u306a\u3053\u3068\u3092\u9632\u3050\u305f\u3081\u306bXML\u306b\u306f<span style=\"color: #ff0000;\"><strong>\u300c\u540d\u524d\u7a7a\u9593\u300d<\/strong><\/span>\u3068\u3044\u3046\u4ed5\u7d44\u307f\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #ff0000;\"><strong>\u30bf\u30b0\u304c\u3069\u3053\u3067\u53d6\u308a\u6c7a\u3081\u3089\u308c\u305f\u3082\u306e\u306a\u306e\u304b\u8b58\u5225\u3059\u308b<\/strong><\/span>\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>\u540d\u524d\u7a7a\u9593\u3092\u4f7f\u3063\u305f\u4f8b<\/h4>\n<p>\u540d\u524d\u7a7a\u9593\u3092\u6307\u5b9a\u3059\u308b\u969b\u306f\u3001\u300c\u5c5e\u6027\u300d\u306bxmlns\u3092\u6307\u5b9a\u3057\u3066\u5404\u540d\u524d\u7a7a\u9593\u306b\u5bfe\u5fdc\u3057\u305f<span style=\"color: #ff0000;\"><strong>\u300cURI\u300d<\/strong><\/span>\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u5177\u4f53\u7684\u306b\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30a4\u30e1\u30fc\u30b8\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">&lt;root xmlns:A=\"http:\/\/xxxx\"\r\n      xmlns:B=\"http:\/\/yyyy\"&gt;\r\n  &lt;A:value&gt;test&lt;\/A:value&gt;\r\n  &lt;B:value&gt;\u30c6\u30b9\u30c8&lt;\/B:value&gt;\r\n&lt;\/root&gt;<\/pre>\n<h2>XML Schema<\/h2>\n<h3>XML Schema\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u30dd\u30a4\u30f3\u30c8<\/h3>\n<ul>\n<li>\u62e1\u5f35\u5b50\u3092<span style=\"color: #ff0000;\"><strong>\u300cxsd\u300d<\/strong><\/span>\u306b\u3059\u308b\u3002<\/li>\n<li>\u5f62\u5f0f\u304c<span style=\"color: #ff0000;\"><strong>XML\u5f62\u5f0f\u3068\u540c\u3058<\/strong><\/span><\/li>\n<li>XML Schema\u7279\u6709\u306e\u540d\u524d\u7a7a\u9593\u3092\u4f7f\u3063\u3066\u5185\u5bb9\u3092\u8a18\u8ff0\u3059\u308b\u3002<\/li>\n<\/ul>\n<h3>\u4f8b<\/h3>\n<pre class=\"lang:default decode:true\">&lt;?xml version=\"1.0\" encoding=\"Shift_JIS\" ?&gt;\r\n\r\n&lt;xsd:schema xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\"&gt;\r\n\r\n  &lt;xsd:element name=\"people\"&gt;\r\n    &lt;xsd:complexType&gt;\r\n      &lt;xsd:sequence&gt;\r\n        &lt;xsd:element name=\"man\"&gt;\r\n          &lt;xsd:complexType&gt;\r\n            &lt;xsd:sequence&gt;\r\n              &lt;xsd:element name=\"name\" type=\"xsd:string\"\/&gt;\r\n              &lt;xsd:element name=\"age\" type=\"xsd:decimal\"\/&gt;\r\n            &lt;\/xsd:sequence&gt;\r\n          &lt;\/xsd:complexType&gt;\r\n        &lt;\/xsd:element&gt;\r\n      &lt;\/xsd:sequence&gt;\r\n    &lt;\/xsd:complexType&gt;\r\n  &lt;\/xsd:element&gt;\r\n\r\n&lt;\/xsd:schema&gt;<\/pre>\n<p>XML Schma\u306e\u30eb\u30fc\u30c8\u8981\u7d20\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u300cxsd:schema\u300d<\/strong><\/span>\u3068\u3059\u308b\u3053\u3068\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>XML Schema\u306e\u8981\u7d20<\/h3>\n<table>\n<tbody>\n<tr>\n<th>\u8981\u7d20\u540d<\/th>\n<th>\u7528\u9014<\/th>\n<\/tr>\n<tr>\n<td>xsd:schema<\/td>\n<td>XML Schema\u306e\u30eb\u30fc\u30c8\u8981\u7d20<\/td>\n<\/tr>\n<tr>\n<td>\u251c\u2500xsd:element<\/td>\n<td>\u8981\u7d20\u3092\u6c7a\u3081\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u3000\u3000\u251c\u2500xsd:complexType<\/td>\n<td>\u8981\u7d20\u306e\u4e2d\u306b\u8981\u7d20\u3092\u542b\u3081\u308b\u3002<span style=\"color: #ff0000;\"><strong>\u5b50\u8981\u7d20\u306b\u305d\u306e\u4ed6\u8981\u7d20\u3084\u3001\u5c5e\u6027\u3092\u542b\u3081\u308b\u5834\u5408<\/strong><\/span>\u306b\u4f7f\u3046\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u3000\u00a0 \u00a0 \u00a0\u3000\u251c\u2500xsd:sequence<\/td>\n<td>\u8981\u7d20\u306e\u51fa\u73fe\u9806\u756a\u3092\u6c7a\u3081\u308c\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u3000\u00a0 \u00a0 \u00a0\u3000\u251c\u2500xsd:choice<\/td>\n<td>\u8981\u7d20\u3092\u3044\u305a\u308c\u304b\u3092\u51fa\u73fe\u3055\u305b\u308c\u308b\u3002\uff08\u3044\u305a\u308c\u304b1\u56de)<\/td>\n<\/tr>\n<tr>\n<td>\u00a0\u3000\u00a0 \u00a0 \u00a0\u3000\u251c\u2500xsd:all<\/td>\n<td>\u5185\u5bb9\u30920\u56de\u307e\u305f\u306f1\u56de\u51fa\u73fe\u3055\u305b\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u3000\u3000\u251c\u2500xsd:attribute<\/td>\n<td>\u5c5e\u6027\u3092\u5b9a\u7fa9\u3067\u304d\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u3000\u3000\u2514\u2500xsd:simpleType<\/td>\n<td><span style=\"color: #ff0000;\"><strong>\u5b50\u8981\u7d20\u306b\u30c6\u30ad\u30b9\u30c8\u3057\u304b\u6301\u305f\u306a\u3044\u8981\u7d20\u306e\u5834\u5408<\/strong><\/span>\u306b\u4f7f\u3046\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u3000\u3000\u3000\u3000 \u251c\u2500xsd:restriction<\/td>\n<td>\u8981\u7d20\u3068\u3057\u3066\u6307\u5b9a\u3059\u308b\u30c6\u30ad\u30b9\u30c8\u60c5\u5831\u3068\u304b\u306b\u3001\u5236\u7d04\u6761\u4ef6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u2514\u2500xsd:simpleType<\/td>\n<td><span style=\"color: #ff0000;\"><b>\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u578b\u306e\u5b9a\u7fa9<\/b>\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>xsd:element\u3067\u6307\u5b9a\u3067\u304d\u308b\u5c5e\u6027<\/h4>\n<table>\n<tbody>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>type<\/td>\n<td>string\u3068\u304b\u3001decimal\u3068\u304b\u306e\u30c7\u30fc\u30bf\u306e\u7a2e\u985e<\/td>\n<\/tr>\n<tr>\n<td>ref<\/td>\n<td><span style=\"color: #ff0000;\"><strong>xsd:element\u3092\u5225\u306e\u5834\u6240\u306b\u5916\u3060\u3057<\/strong><\/span>\u3057\u3066xsd\u3092\u8aad\u307f\u3084\u3059\u304f\u3067\u304d\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>minOccurs<\/td>\n<td>\u6700\u5c0f\u51fa\u73fe\u56de\u6570\u3092\u6307\u5b9a\u3059\u308b\u3002<span style=\"color: #ff0000;\"><strong>\u7701\u7565\u6642\u306f1\u56de\uff08\u3064\u307e\u308a\u5fc5\u9808\u6307\u5b9a)<\/strong><\/span>\u3001unbounded\u3067\u4e0a\u9650\u3092\u306a\u304f\u305b\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>maxOccurs<\/td>\n<td>\u6700\u5927\u51fa\u73fe\u56de\u6570\u3092\u6307\u5b9a\u3059\u308b\u3002<span style=\"color: #ff0000;\"><strong>\u7701\u7565\u6642\u306f1\u56de\uff08\u3064\u307e\u308a\u5fc5\u9808\u6307\u5b9a)<\/strong><\/span>\u3001unbounded\u3067\u4e0a\u9650\u3092\u306a\u304f\u305b\u308b\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>xsd:complexType\u3067\u6307\u5b9a\u3067\u304d\u308b\u5c5e\u6027<\/h4>\n<table>\n<tbody>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>mixed<\/td>\n<td>\u6587\u5b57\u3068\u30bf\u30b0\u306e\u6df7\u5408\u5185\u5bb9\u3068\u3067\u304d\u308b\u3002\uff08\u4f8b\u3001\u3053\u308c\u306f&lt;strong&gt;\u91cd\u8981\u4e8b\u9805&lt;\/strong&gt;\u3067\u3059\u3002\uff09<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"XML\u306e\u53d6\u308a\u6c7a\u3081\u306b\u3064\u3044\u3066 XML\u306f\u3001\u4eba\u540c\u58eb\u3084\u3001\u4f01\u696d\u9593\u3068\u304b\u3067\u30c7\u30fc\u30bf\u3092\u3084\u308a\u53d6\u308a\u3059\u308b\u306b\u3042\u305f\u308a\u3001\u672c\u5f53\u306b\u305d\u306e\u30c7\u30fc\u30bf\u304c\u6b63\u3057\u3044\u304b\u3069\u3046\u304b\u59a5\u5f53\u6027\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 DTD XML\u3067\u306f\u3001\u30bf\u30b0\u306e\u53d6\u308a\u6c7a\u3081\u3092DTD(Document  [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[25],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/6832"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6832"}],"version-history":[{"count":31,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/6832\/revisions"}],"predecessor-version":[{"id":20720,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/6832\/revisions\/20720"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6832"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}