xml - Using XSLT to replace http:// with https:// -


i trying replace http:// instances href tags , image sources, https://

<xsl:for-each select="item[position()&lt;2 , position()&gt; 0]"><!-- display 1 - skip none -->         <article class="395by265-presentation">             <a href="{link}" target="_blank">                 <img src="" width="395" height="265" alt="{title}" border="0" class="fbapp"><xsl:attribute name="src">                     <xsl:value-of  disable-output-escaping="yes" select="enclosure/@url"/></xsl:attribute>                 </img>                 <div class="synopsis"><xsl:value-of select="description"/></div>             </a>         </article>     </xsl:for-each> 

any appreciated.

i using xslt 1.0.

trying access , replace all instances of http.

what version of xslt working with?

xslt 2.0 supports replace function:

replace(string,pattern,replace)  

returns string created replacing given pattern replace argument.

example: replace("bella italia", "l", "*") result: 'be**a ita*ia'  example: replace("bella italia", "l", "") result: 'bea itaia'  example syntax: <xsl:value-of select="string:replace('bella italia','l','')" /> result: 'bea itaia' 

have here: https://stackoverflow.com/a/3067130/1846192 xslt 1.0 solution.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -