regex in xslt

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sgxbytes
    New Member
    • Sep 2008
    • 25

    regex in xslt

    Hi,
    can any one help in splitting this string

    <par >
    <picture>
    <par >
    <run>&lt;img src= imgone onClick=OpenIma geFile( D:\Corp_Annc_At tachment\Images \red.gif )&gt;&lt;/img&gt;</run>
    </par>
    </picture>
    </par>

    this is my xml
    i need to xsl transformation ,i need to write an xsl using href and i will show the imgone alone and i need to store D:\Corp_Annc_At tachment\Images \red.gif in a seperate string,so that on clicking the img i will open this gif.

    thanks in advance..
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    regex in xslt

    you can use the XPath function substring-before() and substring-after(). a similar problem was asked here.

    regards

    Comment

    • sgxbytes
      New Member
      • Sep 2008
      • 25

      #3
      Originally posted by Dormilich
      you can use the XPath function substring-before() and substring-after(). a similar problem was asked here.

      regards

      thanks Dormilich

      i am done with the help of it

      <xsl:variable name="pathy" select="substri ng-before(substrin g-after(picture/par/run,'OpenImageF ile('), ')') "/>
      <a href="{$pathy}" >
      <xsl:value-of select="picture/par/run" disable-output-escaping="yes" />
      </a>

      Comment

      Working...