{"id":3459,"date":"2014-06-18T12:06:37","date_gmt":"2014-06-18T03:06:37","guid":{"rendered":"http:\/\/auctionpro.co.kr\/?p=3459"},"modified":"2019-06-24T17:26:37","modified_gmt":"2019-06-24T08:26:37","slug":"xsl-replace-template","status":"publish","type":"post","link":"https:\/\/www.auctionpro.co.kr\/?p=3459","title":{"rendered":"[XSL] replace template"},"content":{"rendered":"<pre class=\"lang:xhtml decode:true \" >&lt;xsl:function name=\"functx:replace-multi\" as=\"xs:string?\"\r\n              xmlns:functx=\"http:\/\/www.functx.com\"&gt;\r\n  &lt;xsl:param name=\"arg\" as=\"xs:string?\"\/&gt;\r\n  &lt;xsl:param name=\"changeFrom\" as=\"xs:string*\"\/&gt;\r\n  &lt;xsl:param name=\"changeTo\" as=\"xs:string*\"\/&gt;\r\n\r\n  &lt;xsl:sequence select=\"\r\n   if (count($changeFrom) &gt; 0)\r\n   then functx:replace-multi(\r\n          replace($arg, $changeFrom[1],\r\n                     functx:if-absent($changeTo[1],'')),\r\n          $changeFrom[position() &gt; 1],\r\n          $changeTo[position() &gt; 1])\r\n   else $arg\r\n \"\/&gt;\r\n\r\n&lt;\/xsl:function&gt;<\/pre>\n<pre class=\"lang:xhtml decode:true \" >&lt;xsl:variable name=\"fr\" select=\"('[a-c]', 'def', '\\d+')\"\/&gt;\r\n&lt;xsl:variable name=\"to\" select=\"('x', 'y', '0')\"\/&gt;\r\nXPath Example\tResults\r\nfunctx:replace-multi('abcdef123',$fr,$to)\r\nxxxy0\r\n<\/pre>\n<p>\ucc38\uc870 : http:\/\/www.xsltfunctions.com\/xsl\/functx_replace-multi.html<\/p>\n<p>\ub354 \uac04\ub2e8\ud55c \ubc29\ubc95<\/p>\n<pre class=\"lang:vim decode:true \" >var data = \"abc\/def\/gh\";\r\nvar result = data.replace(\/\\\/\/gi, '');\r\nconsole.log('\uacb0\uacfc', result); \/\/ abcdefgh<\/pre>\n<p>\ucc38\uc870 : http:\/\/www.codejs.co.kr\/%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EC%97%90%EC%84%9C-replace%EB%A5%BC-replaceall-%EC%B2%98%EB%9F%BC-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0\/<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>&lt;xsl:function name=&#8221;functx:replace-multi&#8221; as=&#8221;xs:string?&#8221; xmlns:functx=&#8221;http:\/\/www.functx.com&#8221;&gt; &lt;xsl:param name=&#8221;arg&#8221; as=&#8221;xs:string?&#8221;\/&gt; &lt;xsl:param name=&#8221;changeFrom&#8221; as=&#8221;xs:string*&#8221;\/&gt; &lt;xsl:param name=&#8221;changeTo&#8221; as=&#8221;xs:string*&#8221;\/&gt; &lt;xsl:sequence select=&#8221; if (count($changeFrom) &gt; 0) then functx:replace-multi( replace($arg, $changeFrom[1], functx:if-absent($changeTo[1],&#8221;)), $changeFrom[position() <a class=\"mh-excerpt-more\" href=\"https:\/\/www.auctionpro.co.kr\/?p=3459\" title=\"[XSL] replace template\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[60],"tags":[],"class_list":["post-3459","post","type-post","status-publish","format-standard","hentry","category-xsl"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[XSL] replace template - AuctionPro<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.auctionpro.co.kr\/?p=3459\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[XSL] replace template - AuctionPro\" \/>\n<meta property=\"og:description\" content=\"&lt;xsl:function name=&quot;functx:replace-multi&quot; as=&quot;xs:string?&quot; xmlns:functx=&quot;http:\/\/www.functx.com&quot;&gt; &lt;xsl:param name=&quot;arg&quot; as=&quot;xs:string?&quot;\/&gt; &lt;xsl:param name=&quot;changeFrom&quot; as=&quot;xs:string*&quot;\/&gt; &lt;xsl:param name=&quot;changeTo&quot; as=&quot;xs:string*&quot;\/&gt; &lt;xsl:sequence select=&quot; if (count($changeFrom) &gt; 0) then functx:replace-multi( replace($arg, $changeFrom[1], functx:if-absent($changeTo[1],&#039;&#039;)), $changeFrom[position() [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.auctionpro.co.kr\/?p=3459\" \/>\n<meta property=\"og:site_name\" content=\"AuctionPro\" \/>\n<meta property=\"article:published_time\" content=\"2014-06-18T03:06:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-06-24T08:26:37+00:00\" \/>\n<meta name=\"author\" content=\"golgol\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"golgol\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=3459#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=3459\"},\"author\":{\"name\":\"golgol\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#\\\/schema\\\/person\\\/d3dbae599b06cd55f5b14a3e2116f7a2\"},\"headline\":\"[XSL] replace template\",\"datePublished\":\"2014-06-18T03:06:37+00:00\",\"dateModified\":\"2019-06-24T08:26:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=3459\"},\"wordCount\":51,\"commentCount\":0,\"articleSection\":[\"[Dev]XSL XML JSON\"],\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=3459#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=3459\",\"url\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=3459\",\"name\":\"[XSL] replace template - AuctionPro\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#website\"},\"datePublished\":\"2014-06-18T03:06:37+00:00\",\"dateModified\":\"2019-06-24T08:26:37+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#\\\/schema\\\/person\\\/d3dbae599b06cd55f5b14a3e2116f7a2\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=3459#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=3459\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=3459#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[XSL] replace template\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#website\",\"url\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/\",\"name\":\"AuctionPro\",\"description\":\"\uc625\uc158\ud504\ub85c\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#\\\/schema\\\/person\\\/d3dbae599b06cd55f5b14a3e2116f7a2\",\"name\":\"golgol\",\"url\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?author=6\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[XSL] replace template - AuctionPro","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.auctionpro.co.kr\/?p=3459","og_locale":"ko_KR","og_type":"article","og_title":"[XSL] replace template - AuctionPro","og_description":"&lt;xsl:function name=\"functx:replace-multi\" as=\"xs:string?\" xmlns:functx=\"http:\/\/www.functx.com\"&gt; &lt;xsl:param name=\"arg\" as=\"xs:string?\"\/&gt; &lt;xsl:param name=\"changeFrom\" as=\"xs:string*\"\/&gt; &lt;xsl:param name=\"changeTo\" as=\"xs:string*\"\/&gt; &lt;xsl:sequence select=\" if (count($changeFrom) &gt; 0) then functx:replace-multi( replace($arg, $changeFrom[1], functx:if-absent($changeTo[1],'')), $changeFrom[position() [...]","og_url":"https:\/\/www.auctionpro.co.kr\/?p=3459","og_site_name":"AuctionPro","article_published_time":"2014-06-18T03:06:37+00:00","article_modified_time":"2019-06-24T08:26:37+00:00","author":"golgol","twitter_card":"summary_large_image","twitter_misc":{"\uae00\uc4f4\uc774":"golgol","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"1\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.auctionpro.co.kr\/?p=3459#article","isPartOf":{"@id":"https:\/\/www.auctionpro.co.kr\/?p=3459"},"author":{"name":"golgol","@id":"https:\/\/www.auctionpro.co.kr\/#\/schema\/person\/d3dbae599b06cd55f5b14a3e2116f7a2"},"headline":"[XSL] replace template","datePublished":"2014-06-18T03:06:37+00:00","dateModified":"2019-06-24T08:26:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.auctionpro.co.kr\/?p=3459"},"wordCount":51,"commentCount":0,"articleSection":["[Dev]XSL XML JSON"],"inLanguage":"ko-KR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.auctionpro.co.kr\/?p=3459#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.auctionpro.co.kr\/?p=3459","url":"https:\/\/www.auctionpro.co.kr\/?p=3459","name":"[XSL] replace template - AuctionPro","isPartOf":{"@id":"https:\/\/www.auctionpro.co.kr\/#website"},"datePublished":"2014-06-18T03:06:37+00:00","dateModified":"2019-06-24T08:26:37+00:00","author":{"@id":"https:\/\/www.auctionpro.co.kr\/#\/schema\/person\/d3dbae599b06cd55f5b14a3e2116f7a2"},"breadcrumb":{"@id":"https:\/\/www.auctionpro.co.kr\/?p=3459#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.auctionpro.co.kr\/?p=3459"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.auctionpro.co.kr\/?p=3459#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/www.auctionpro.co.kr\/"},{"@type":"ListItem","position":2,"name":"[XSL] replace template"}]},{"@type":"WebSite","@id":"https:\/\/www.auctionpro.co.kr\/#website","url":"https:\/\/www.auctionpro.co.kr\/","name":"AuctionPro","description":"\uc625\uc158\ud504\ub85c","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.auctionpro.co.kr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Person","@id":"https:\/\/www.auctionpro.co.kr\/#\/schema\/person\/d3dbae599b06cd55f5b14a3e2116f7a2","name":"golgol","url":"https:\/\/www.auctionpro.co.kr\/?author=6"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/3459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3459"}],"version-history":[{"count":0,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/3459\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}