error in extracting text present between html tags

Posted on 2011-10-27
Last Modified: 2012-05-12
i m getting error invalid xpath expression. Unexpected token on this line of xslt

<xsl:value-of select="FIELD[NAME/text() = 'html']/VALUE/substring-before(substring-after(text(),'&lt;body&gt;'),'&lt;/body&gt;')"  />

when i m trying to extract text between the html body element

&lt;html&gt;&lt;body&gt;Living With Chronic Obstructive Pulmonary Disease (COPD) &lt;/body&gt;&lt;/html&gt;
Question by:mmalik15
    LVL 60

    Accepted Solution

    you are using an XSLT2 syntax with a XSLT1 processor
    (it works by the way in XSLT2)

    - you need to run this using XSLT2 processor
    - also you should replace text() in favour of '.' to remove undesired effects

    the XSLT1 alternative for this statement

           <xsl:value-of select="substring-before(substring-after(FIELD[normalize-space(NAME) = 'html']/VALUE,'&lt;body&gt;'),'&lt;/body&gt;')"  />  

    Author Closing Comment

    LVL 60

    Expert Comment

    by:Geert Bormans

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
    Do you want to insert HTML5 video into your site? This is the tutorial how to do so. What are the main advantages of HTML5 video? 1) Have good compression, good image quality, and low decode processor use. 2) It is royalty-free 3) It is easi…
    In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
    In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now