{"id":5480,"date":"2016-07-06T08:15:45","date_gmt":"2016-07-05T23:15:45","guid":{"rendered":"http:\/\/blog.antenna.co.jp\/ILSoft2\/?p=5480"},"modified":"2016-07-06T08:15:45","modified_gmt":"2016-07-05T23:15:45","slug":"xslt%e3%82%92%e5%ad%a6%e3%81%b6%ef%bc%889%ef%bc%89-%e3%82%b9%e3%83%86%e3%83%83%e3%83%97%e3%81%ae%e6%96%87%e6%b3%95%e3%82%92%e8%bf%bd%e6%b1%82%e3%81%99%e3%82%8b-%e8%bf%b0%e9%83%a8%ef%bc%88predicates","status":"publish","type":"post","link":"https:\/\/blog.antenna.co.jp\/ILSoft2\/archives\/5480\/","title":{"rendered":"XSLT\u3092\u5b66\u3076\uff089\uff09 \u30b9\u30c6\u30c3\u30d7\u306e\u6587\u6cd5\u3092\u8ffd\u6c42\u3059\u308b-\u8ff0\u90e8\uff08Predicates\uff09\u3068\u5f0f"},"content":{"rendered":"<p>\u7b2c3\u56de<sup>[1]<\/sup>\u304b\u3089\u30d1\u30b9\u306e\u6587\u6cd5\u3092\u8abf\u3079\u3066\u304d\u307e\u3057\u305f\u3002\u30d1\u30b9\u306e\u91cd\u8981\u306a\u69cb\u6210\u8981\u7d20\u306b\u30b9\u30c6\u30c3\u30d7\u304c\u3042\u308a\u3001\u30b9\u30c6\u30c3\u30d7\uff08\u7701\u7565\uff09\u306f\u8ef8\u3001\u30ce\u30fc\u30c9\u30c6\u30b9\u30c8\u3001\u8ff0\u90e8\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\u306a\u306e\u3067\u5fc5\u9808\u3067\u306f\u306a\u3044\uff09\u304b\u3089\u69cb\u6210\u3055\u308c\u308b\u3053\u3068\u3092\u8abf\u3079\u307e\u3057\u305f\u3002<\/p>\n<p>\u30b9\u30c6\u30c3\u30d7\u306e\u6700\u5f8c\u306e\u69cb\u6210\u90e8\u54c1\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8ff0\u90e8\u3067\u3059\u3002\u7b2c6\u56de<sup>[2]<\/sup>\u3067\u898b\u307e\u3057\u305f\u304c\u3001\u8ff0\u90e8\u306f<strong>\u5f0f<\/strong>\u3092[]\u3067\u56f2\u3063\u305f\u5f62\u5f0f\u3067\u3059\u3002<\/p>\n<p>\u5f0f\u3068\u306f\u3069\u3093\u306a\u3082\u306e\u3067\u3057\u3087\u3046\u304b\uff1f\u3000\u307e\u305a\u3001XPath\u306e\u5f0f\u306e\u751f\u6210\u898f\u5247<sup>[3]<\/sup>\u3092\u30c8\u30c3\u30d7\u304b\u3089\u8fbf\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u30b9\u30bf\u30fc\u30c8\u306f\u5b9a\u7fa9\u306e[14]\u3067\u3059\u304c\u3001\u5f0fExpr\u3068\u306f\u3001OrExpr\u3067\u3059\u3002[21]orExpr\u306fAndExpr\u3092&#8217;or&#8217;\u3067\u3064\u306a\u3052\u305f\u3082\u306e\u3067\u3059\u3002\u305d\u3057\u3066\u3001[22]AndExpr\u3068\u306f\u3001EqualityExpr\u3092&#8217;and&#8217;\u3067\u3064\u306a\u3052\u305f\u3082\u306e\u3067\u3059\u3002[23]EqualityExpr\u306f\u3001RelationalExpr\u3092&#8217;=&#8217;\u3067\u3064\u306a\u3052\u305f\u3082\u306e\u307e\u305f\u306f&#8217;!=&#8217;\u3067\u3064\u306a\u3052\u305f\u3082\u306e\u3002[24]RelationalExpr\u306f\u3001AdditiveExpr\u3092'&lt;&#8216; &#8216;&gt;&#8221;&lt;=&#8217; &#8216;&gt;=&#8217;\u3067\u3064\u306a\u3052\u305f\u3082\u306e\u306e\u3088\u3046\u3067\u3059\u3002\u3064\u307e\u308a\u3001\u3053\u306e\u3042\u305f\u308a\u307e\u3067\u306f\u3001\u5f0f\u306fAdditiveExpr\uff08\u52a0\u7b97\u5f0f\uff09\u306e\u8ad6\u7406\u6f14\u7b97\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>[14] Expr ::= OrExpr<br \/>\n[21] OrExpr ::= AndExpr | OrExpr &#8216;or&#8217; AndExpr<br \/>\n[22] AndExpr ::= EqualityExpr | AndExpr &#8216;and&#8217; EqualityExpr<br \/>\n[23] EqualityExpr ::= RelationalExpr<br \/>\n| EqualityExpr &#8216;=&#8217; RelationalExpr<br \/>\n| EqualityExpr &#8216;!=&#8217; RelationalExpr<br \/>\n[24] RelationalExpr ::= AdditiveExpr<br \/>\n| RelationalExpr &#8216;&lt;&#8216; AdditiveExpr | RelationalExpr &#8216;&gt;&#8217; AdditiveExpr<br \/>\n| RelationalExpr &#8216;&lt;=&#8217; AdditiveExpr | RelationalExpr &#8216;&gt;=&#8217; AdditiveExpr<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u3055\u3089\u306bAdditiveExpr\u3068\u306f\u4f55\u304b\u3092\u898b\u3066\u307f\u307e\u3059\u3002[25]\u3067\u306fAdditiveExpr\u306f\u3001MultiplicativeExpr\u3092&#8217;+&#8217;\u307e\u305f\u306f&#8217;-&#8216;\u3067\u3064\u306a\u3052\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>[25] AdditiveExpr ::= MultiplicativeExpr<br \/>\n| AdditiveExpr &#8216;+&#8217; MultiplicativeExpr<br \/>\n| AdditiveExpr &#8216;-&#8216; MultiplicativeExpr<\/p>\n<p>[26]\u3067\u306fMultiplicativeExpr\u3068\u306f\u3001UnaryExpr\uff08\u5358\u9805\u5f0f\uff09\u3001\u307e\u305f\u306fMultiplicativeExpr\u306bUnaryExpr\u3092\u639b\u3051\u305f\uff08&#8217;*&#8217;\uff09\u3001\u307e\u305f\u306fMultiplicativeExpr\u3092UnaryExpr\u3067\u5272\u308a\u7b97\uff08&#8217;div&#8217;\uff09\u3001\u5270\u4f59\u7b97\uff08&#8217;mod&#8217;\uff09\u3057\u305f\u3082\u306e\u3067\u3059\u3002<br \/>\n[26] MultiplicativeExpr ::= UnaryExpr<br \/>\n| MultiplicativeExpr MultiplyOperator UnaryExpr<br \/>\n| MultiplicativeExpr &#8216;div&#8217; UnaryExpr<br \/>\n| MultiplicativeExpr &#8216;mod&#8217; UnaryExpr<br \/>\n[34] MultiplyOperator ::= &#8216;*&#8217;<\/p>\n<p>UnaryExpr\u306f\u3001UnionExpr\u307e\u305f\u306f\u305d\u306e\u524d\u306b\u30de\u30a4\u30ca\u30b9\u8a18\u53f7\uff08&#8217;-&#8216;\uff09\u3092\u3064\u3051\u305f\u3082\u306e\u3002<\/p>\n<p>[27] UnaryExpr ::= UnionExpr | &#8216;-&#8216; UnaryExpr<\/p>\n<p>UnionExpr\u306f\u3001\u3072\u3068\u3064\u306ePathExpr\uff08\u30d1\u30b9\u5f0f\uff09\u3001\u307e\u305f\u306f\u305d\u308c\u3092&#8217;|&#8217;\u3067\u7d50\u5408\u3057\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>[18] UnionExpr ::= PathExpr| UnionExpr &#8216;|&#8217; PathExpr<\/p>\n<p>PathExpr\u5f0f\u306f\u3001LocationPath\uff08\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9\uff09\u3001\u307e\u305f\u306fFilterExpr\u307e\u305f\u306f\u3001FilterExpr\u3068\u76f8\u5bfe\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9\u3092&#8217;\/&#8217;\u3001&#8217;\/\/&#8217; \u3067\u7d50\u5408\u3057\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>[19] PathExpr ::= LocationPath<br \/>\n| FilterExpr<br \/>\n| FilterExpr &#8216;\/&#8217; RelativeLocationPath<br \/>\n| FilterExpr &#8216;\/\/&#8217; RelativeLocationPath<\/p>\n<p>\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9\u306b\u3064\u3044\u3066\u306f\u7b2c\uff13\u56de<sup>[2]<\/sup>\u3067\u3059\u3067\u306b\u5b66\u3073\u307e\u3057\u305f\u304c\u3001XML\u30c4\u30ea\u30fc\u306e\u30ce\u30fc\u30c9\u3092\u9078\u629e\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u30ce\u30fc\u30c9\u306e\u9078\u629e\u7d50\u679c\u306f\u30ce\u30fc\u30c9\u306e\u96c6\u307e\u308a\uff08\u30ce\u30fc\u30c9\u96c6\u5408\uff09\u3067\u3059\u304c\u3001\u3053\u308c\u306b\u5bfe\u3057\u3066\u3001\u639b\u3051\u7b97\uff08&#8217;*&#8217;\uff09\u3001\u5272\u308a\u7b97\uff08&#8217;div&#8217;\uff09\u3001\u5270\u4f59\u7b97\uff08&#8217;mod&#8217;\uff09\u3001\u8db3\u3057\u7b97\uff08&#8217;+&#8217;\uff09\u3001\u5f15\u304d\u7b97\uff08&#8217;-&#8216;\uff09\u3001\u6bd4\u8f03\u306a\u3069\u306e\u6f14\u7b97\u3092\u3059\u308b\u306e\u306f\u5c11\u3057\u4e0d\u601d\u8b70\u306a\u6c17\u3082\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u5f8c\u307b\u3069\u8abf\u3079\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3059\uff08<sup>[5]<\/sup>\uff09\u3002<\/p>\n<p>FilterExpr\u306e\u65b9\u306f\u3001PrimaryExpr\u307e\u305f\u306fPrimaryExpr\u306b\u8ff0\u90e8\uff08Predicate\uff09\u3092\u4ed8\u3051\u305f\u3082\u306e\u3068\u306a\u308a\u307e\u3059\u3002\u3053\u3053\u306b\u51fa\u3066\u304f\u308b\u8ff0\u90e8\u306fFilterExpr Predicate\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u307e\u3059\u304c\u3001\u30b9\u30c6\u30c3\u30d7\u306e\u4e2d\u3067\u51fa\u3066\u304f\u308b\u8ff0\u90e8\u306e\u4f7f\u308f\u308c\u65b9\u306fAxisSpecifier NodeTest Predicate*\u3067\u3059\u3002\u3053\u306e2\u7a2e\u985e\u306e\u8ff0\u90e8\u306e\u4f7f\u308f\u308c\u65b9\u306e\u9055\u3044\u306f\u306a\u3093\u3067\u3057\u3087\u3046\u304b\uff1f\u3000\u3053\u308c\u3082\u5f8c\u307b\u3069\u8abf\u3079\u3066\u307f\u307e\u3057\u3087\u3046\uff08<sup>[4]<\/sup>\uff09\u3002<\/p>\n<p>PrimaryExpr\u306f\u3001VariableReference\uff08\u5909\u6570\u53c2\u7167\uff09\u3001\u5f0f\u3092()\u3067\u56f2\u3063\u305f\u3082\u306e\u3001\u30ea\u30c6\u30e9\u30eb\u3001\u6570\u5024\u3001FunctionCall\uff08\u95a2\u6570\u547c\u3073\u51fa\u3057\uff09\u306e\u3069\u308c\u304b\u3067\u3059\u3002\u3067\u3059\u306e\u3067\u3001\u5f0f\u306b\u306f\u6570\u7f6e\u306e\u56db\u5247\u6f14\u7b97\u3082\u8868\u73fe\u3057\u305f\u3082\u306e\u3082\u542b\u307e\u308c\u307e\u3059\uff08\u3088\u304f\u77e5\u3063\u3066\u3044\u308b\u521d\u6b69\u7684\u306a\u6570\u5f0f\u3082\u542b\u307e\u308c\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u4e00\u5b89\u5fc3\u3067\u3059\uff09\u3002<\/p>\n<p>[20] FilterExpr ::= PrimaryExpr<br \/>\n| FilterExpr Predicate<br \/>\n[15] PrimaryExpr ::= VariableReference<br \/>\n| &#8216;(&#8216; Expr &#8216;)&#8217;<br \/>\n| Literal<br \/>\n| Number<br \/>\n| FunctionCall<\/p>\n<p>\u6700\u3082\u5358\u7d14\u306a\u30b1\u30fc\u30b9\u3067\u306f\u3001\u4e00\u3064\u306e\u6570\u5024\uff08Number\uff09\u3060\u3051\u3067\u3082\u5f0f\u3068\u306a\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u6b21\u306e\u3088\u3046\u306b\u4e0b\u304b\u3089\u8fbf\u3063\u3066\u307f\u307e\u3059\u3002<br \/>\n(1) PrimaryExpr\u304cNumber:100<br \/>\n(2) FilterExpr\u304cPrimaryExpr:100<br \/>\n(3) PathExpr\u304cFilterExpr:100<br \/>\n(4) UnionExpr\u304cPathExpr:100<br \/>\n(5) UnaryExpr\u304cUnionExpr :100<br \/>\n(6) MultiplicativeExpr\u304cUnaryExpr:100<br \/>\n(7) AdditiveExpr\u304cMultiplicativeExpr:100<br \/>\n(8) RelationalExpr\u304cAdditiveExpr :100<br \/>\n(9) EqualityExpr\u304cRelationalExpr :100<br \/>\n(10) AndExpr\u304cEqualityExpr:100<br \/>\n(11) OrExpr\u304cAndExpr:100<br \/>\n(12) Expr\u304cOrExpr:100<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u8ff0\u90e8\u306b[100]\u3068\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u3068\u3081\u307e\u3059\u3068\u3001\u8ff0\u90e8\uff08[]\u5185\uff09\u306b\u306f<strong>\u5f0f<\/strong>\u3092\u66f8\u304d\u307e\u3059\u304c\u3001\u5f0f\u3068\u3057\u3066\u306f\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9\u3092\u66f8\u304f\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3057\u3001\u307e\u305f\u3001\u6570\u5024\u3001\u5909\u6570\u3001\u95a2\u6570\u547c\u3073\u51fa\u3057\u3001\u6570\u5f0f\u3092\u66f8\u304f\u3053\u3068\u3082\u3067\u304d\u308b\u3001\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u9014\u4e2d\u3067\u3001\u3044\u308d\u3044\u308d\u308f\u304b\u3089\u306a\u3044\u8a00\u8449\u304c\u51fa\u3066\u304d\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u6b21\u56de\u4ee5\u964d\u3001\u3082\u3046\u5c11\u3057\u8a73\u3057\u304f\u8abf\u3079\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>[1] <a href=\"http:\/\/192.168.16.141\/ILSoft2\/archives\/5254\">XSLT\u3092\u5b66\u3076\u3000\uff083\uff09 \u30d1\u30b9\u3068\u306f<\/a><br \/>\n[2] <a href=\"http:\/\/192.168.16.141\/ILSoft2\/archives\/5362\">XSLT\u3092\u5b66\u3076\u3000\uff086\uff09 \u30b9\u30c6\u30c3\u30d7\u306e\u6587\u6cd5\u3092\u8ffd\u6c42\u3059\u308b<\/a>\u306e[8]\u3001[9]\u5f0f<br \/>\n[3] <a href=\"https:\/\/www.w3.org\/TR\/xpath\/#section-Expressions\">3 Expressions<\/a><br \/>\n[4] \u6b21\u56de\uff08\u7b2c10\u56de\uff09\u306e<strong>preceding::foo[1] \u3068(preceding::foo)[1]\u306e\u6bd4\u8f03 <\/strong>\u306e\u9805\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n[5] \u30ce\u30fc\u30c9\u96c6\u5408\u306e\u8ad6\u7406\u6f14\u7b97\u3001\u6bd4\u8f03\u6f14\u7b97\u306b\u3064\u3044\u3066\u306f\u7b2c11\u56de\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3010\u5e83\u544a\u3011<a href=\"https:\/\/www.antenna.co.jp\/AHF\/ahf_publication\/index.html\">\u2605AH Formatter XML\u95a2\u9023\u51fa\u7248\u7269\u306e\u7d39\u4ecb<\/a><\/p>\n<p style=\"color: orange; font-style: italic;\">\u6b21\u56de:<br \/>\n<a href=\"http:\/\/192.168.16.141\/ILSoft2\/archives\/5525\">XSLT\u3092\u5b66\u3076\u3000\uff0810\uff09\u5f0f\u306b\u3088\u308b\u30ce\u30fc\u30c9\u96c6\u5408\u306e\u4f5c\u6210\u3001\u30ce\u30fc\u30c9\u96c6\u5408\u306e\u548c\u96c6\u5408\u3001\u30d5\u30a3\u30eb\u30bf\u30fc\u5f0f<\/a><\/p>\n<p style=\"color: orange; font-style: italic;\">\u524d\u56de:<br \/>\n<a href=\"http:\/\/192.168.16.141\/ILSoft2\/archives\/5422\">XSLT\u3092\u5b66\u3076\uff088\uff09\u30b9\u30c6\u30c3\u30d7\u306e\u6587\u6cd5\u3092\u8ffd\u6c42\u3059\u308b-NodeTest<\/a><\/p>\n<p style=\"color: green; font-style: italic;\">\u521d\u56de:<br \/>\n<a href=\"http:\/\/192.168.16.141\/ILSoft2\/archives\/5113\">XSLT\u3092\u5b66\u3076\uff081\uff09XML\u306e\u30c4\u30ea\u30fc\u30e2\u30c7\u30eb\u3068XPath\/XSLT\u306e\u30c4\u30ea\u30fc\u30e2\u30c7\u30eb\u3067\u306f\u30eb\u30fc\u30c8\u306e\u610f\u5473\u304c\u9055\u3046<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c3\u56de[1]\u304b\u3089\u30d1\u30b9\u306e\u6587\u6cd5\u3092\u8abf\u3079\u3066\u304d\u307e\u3057\u305f\u3002\u30d1\u30b9\u306e\u91cd\u8981\u306a\u69cb\u6210\u8981\u7d20\u306b\u30b9\u30c6\u30c3\u30d7\u304c\u3042\u308a\u3001\u30b9\u30c6\u30c3\u30d7\uff08\u7701\u7565\uff09\u306f\u8ef8\u3001\u30ce\u30fc\u30c9\u30c6\u30b9\u30c8\u3001\u8ff0\u90e8\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\u306a\u306e\u3067\u5fc5\u9808\u3067\u306f\u306a\u3044\uff09\u304b\u3089\u69cb\u6210\u3055\u308c\u308b\u3053\u3068\u3092\u8abf\u3079\u307e\u3057\u305f\u3002 \u30b9\u30c6\u30c3\u30d7\u306e\u6700\u5f8c\u306e\u69cb\u6210\u90e8\u54c1\u306f\u30aa\u30d7\u30b7 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,16],"tags":[52,254,258,263,347,597],"class_list":["post-5480","post","type-post","status-publish","format-standard","hentry","category-ah-formatter","category-structured-doc","tag-ah-formatter","tag-xml","tag-xpath","tag-xslt","tag-347","tag-597"],"_links":{"self":[{"href":"https:\/\/blog.antenna.co.jp\/ILSoft2\/wp-json\/wp\/v2\/posts\/5480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.antenna.co.jp\/ILSoft2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.antenna.co.jp\/ILSoft2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.antenna.co.jp\/ILSoft2\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.antenna.co.jp\/ILSoft2\/wp-json\/wp\/v2\/comments?post=5480"}],"version-history":[{"count":0,"href":"https:\/\/blog.antenna.co.jp\/ILSoft2\/wp-json\/wp\/v2\/posts\/5480\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.antenna.co.jp\/ILSoft2\/wp-json\/wp\/v2\/media?parent=5480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.antenna.co.jp\/ILSoft2\/wp-json\/wp\/v2\/categories?post=5480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.antenna.co.jp\/ILSoft2\/wp-json\/wp\/v2\/tags?post=5480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}