Topic
  • 3 replies
  • Latest Post - ‏2015-04-23T14:21:50Z by Heather_Linsk
SystemAdmin
SystemAdmin
1299 Posts

Pinned topic print only ole in Object Text

‏2012-12-19T22:59:05Z |
Hello,

Is there a way of only printing the ole if the object Text contains both ole and text? Thank you.

-Jim
Updated on 2012-12-20T14:56:26Z at 2012-12-20T14:56:26Z by Dragos.Cojocari
  • Dragos.Cojocari
    Dragos.Cojocari
    1647 Posts

    Re: print only ole in Object Text

    ‏2012-12-20T14:56:26Z  
    Hey Jim,

    this is now possible with the new JavaScript capabilities we have in RPE 1.2, i.e. processing the rich text in Java Script.

    Attached is an RPE 1.2 template that does this and a test DOORS module. The script code is documented but at a very high level it does the following: checks if the XHTML that is received from DOORS contains a certain text that is present for OLEs and if that's the case it extracts the OLE from it otherwise it renders the text as is.

    Do note that the script is very crude and will only works in the following conditions:
    • the text type="application/ole" is not present in the object text
    • the object text contains a single OLE and no additional images

    These shortcomings can be addressed by improving the script code in my example.

    Also note that processing XHTML will take its toe on performance.

    Regards,
    Dragos

    RPE Actual
  • Heather_Linsk
    Heather_Linsk
    51 Posts

    Re: print only ole in Object Text

    ‏2015-04-23T14:13:49Z  

    Hi Dragos -

    I have RPE 1.3 and DOORS 9.6.1.  I tried using your javascript to pull out the image, but I got the following in my output:

     

    <Image/OLE>

    Caption text

     

    I have a set of objects where there is an image and text all in the object text.

    I need to display the image and pull out the caption text and make it a figure caption.

    Any thoughts?

    Heather

  • Heather_Linsk
    Heather_Linsk
    51 Posts

    Re: print only ole in Object Text

    ‏2015-04-23T14:21:50Z  

    Hi Dragos -

    I have RPE 1.3 and DOORS 9.6.1.  I tried using your javascript to pull out the image, but I got the following in my output:

     

    <Image/OLE>

    Caption text

     

    I have a set of objects where there is an image and text all in the object text.

    I need to display the image and pull out the caption text and make it a figure caption.

    Any thoughts?

    Heather

    My bad - I forgot to check the XHTML boxes