Topic
  • 8 replies
  • Latest Post - ‏2013-12-07T02:08:06Z by Kumaraswamy M
SharonS2
SharonS2
4 Posts

Pinned topic Subscripts in Headers

‏2013-11-23T21:22:55Z |

I am trying to produce a report from a DOORS module that contains subscripts.  The report is correctly producing the text objects that contain subscripts, but the subscripts in header objects are not printing.  The subscripts consist of a single letter.  Can anyone please tell me how to produce the header subscripts.  Thank You.

  • Kumaraswamy M
    Kumaraswamy M
    246 Posts

    Re: Subscripts in Headers

    ‏2013-11-25T02:50:04Z  

    Hi Sharon,

    Which version of DOORS and RPE are you using? I tested it on latest version of these products and I could see header subscripts reported correctly.

    Please attach the data XML as it would help to understand the issue better. You could get the XML data by right clicking on "Data Source" --> Preview Data in RPE Document specification.

     

    Thanks

    Kumar

  • SharonS2
    SharonS2
    4 Posts

    Re: Subscripts in Headers

    ‏2013-11-26T22:59:06Z  

    Hi Sharon,

    Which version of DOORS and RPE are you using? I tested it on latest version of these products and I could see header subscripts reported correctly.

    Please attach the data XML as it would help to understand the issue better. You could get the XML data by right clicking on "Data Source" --> Preview Data in RPE Document specification.

     

    Thanks

    Kumar

    Hello Kumar,

    Thanks for answering me so quickly.  I'm using DOORS 9.5.  I tried running the RPE template in both RPE 1.1.2 and 1.2 and get the same results.  I copied the text into an object and the subscripts print correctly from the text objects.  I also went into DOORS and exported the module into a Word file - all subscripts printed correctly.

    I believe the text with the subscript was copied into DOORS from Word.  How did you enter your subscripts in the headers?  Is there some particular way that subscripts should be entered into DOORS other than copying and pasting from Word? 

    Unfortunately, I'm unable to attach the data XML as this file is sensitive.  I did figure out how to produce the file and am able to see that it specifies <sub> and </sub> for the subscripts in all the seemingly appropriate places.  Would you be able to tell me what to look for in the xml file?  Or if you can tell me how much of the xml file you would need to see - maybe I can reproduce (manually type) just that portion.

    Thanks for your help!

    Sharon

    Updated on 2013-11-26T23:07:16Z at 2013-11-26T23:07:16Z by SharonS2
  • Kumaraswamy M
    Kumaraswamy M
    246 Posts

    Re: Subscripts in Headers

    ‏2013-11-27T05:06:02Z  
    • SharonS2
    • ‏2013-11-26T22:59:06Z

    Hello Kumar,

    Thanks for answering me so quickly.  I'm using DOORS 9.5.  I tried running the RPE template in both RPE 1.1.2 and 1.2 and get the same results.  I copied the text into an object and the subscripts print correctly from the text objects.  I also went into DOORS and exported the module into a Word file - all subscripts printed correctly.

    I believe the text with the subscript was copied into DOORS from Word.  How did you enter your subscripts in the headers?  Is there some particular way that subscripts should be entered into DOORS other than copying and pasting from Word? 

    Unfortunately, I'm unable to attach the data XML as this file is sensitive.  I did figure out how to produce the file and am able to see that it specifies <sub> and </sub> for the subscripts in all the seemingly appropriate places.  Would you be able to tell me what to look for in the xml file?  Or if you can tell me how much of the xml file you would need to see - maybe I can reproduce (manually type) just that portion.

    Thanks for your help!

    Sharon

    Hi Sharon,

    I tired on RPE1.2 as well and it worked fine.

     

    >>> I also went into DOORS and exported the module into a Word file - all subscripts printed correctly.

    Which export option did you use here?

     

    >>> I believe the text with the subscript was copied into DOORS from Word.  How did you enter your subscripts in the headers?  Is there some particular way that subscripts should be entered into DOORS other than copying and pasting from Word?

    I too copied into DOORS from Word. No, it's a simple straight forward copy.

     

    >>> Would you be able to tell me what to look for in the xml file?

    I wanted to take a look at <sub> tags in the data XML. Do you see these <sub> tags for Object headings too in the XML?

     

    >>> Or if you can tell me how much of the xml file you would need to see - maybe I can reproduce (manually type) just that portion.

    I'm attaching a simple DOORS module along with a simple template and document specification. Does this issue happen with this on RPE1.2 with the attached artifacts? Feel free to modify attached module, template to replicate the issue.
     

    Thanks,

    Kumar

  • SharonS2
    SharonS2
    4 Posts

    Re: Subscripts in Headers

    ‏2013-11-27T22:25:51Z  

    Hi Sharon,

    I tired on RPE1.2 as well and it worked fine.

     

    >>> I also went into DOORS and exported the module into a Word file - all subscripts printed correctly.

    Which export option did you use here?

     

    >>> I believe the text with the subscript was copied into DOORS from Word.  How did you enter your subscripts in the headers?  Is there some particular way that subscripts should be entered into DOORS other than copying and pasting from Word?

    I too copied into DOORS from Word. No, it's a simple straight forward copy.

     

    >>> Would you be able to tell me what to look for in the xml file?

    I wanted to take a look at <sub> tags in the data XML. Do you see these <sub> tags for Object headings too in the XML?

     

    >>> Or if you can tell me how much of the xml file you would need to see - maybe I can reproduce (manually type) just that portion.

    I'm attaching a simple DOORS module along with a simple template and document specification. Does this issue happen with this on RPE1.2 with the attached artifacts? Feel free to modify attached module, template to replicate the issue.
     

    Thanks,

    Kumar

    Hello Kumar,

    Thanks again for responding and also for the sample files.  I ran these files and the subscripts are beautiful!  I believe I finally found the problem and it's one of my own making. 

    In my output Word document, I need to prepend text at the beginning of every object consisting of another attribute enclosed by parentheses and followed by the text.

    Text objects are simple - In RPE I just add text boxes with the parenthesis, the attribute, closing parenthesis and then the object - and one prints right after the other as follows:

    (AttributeText) Here is a paragraph of just plain stuff.

     

    Headers are a different story.  The required format is:

    1.  (AttributeText) Here is some header stuff.

     

    Adding text boxes before the object produced:

    (AttributeText)

    1.  Here is some header stuff.

     

    I had written script to concatenate the attribute text and parentheses with the header text into a variable and then have RPE print the variable.  Works well except when there's subscripts.  I guess the subscripts must not be able to transfer to a variable.

    Do you have any ideas on how I might accomplish this?

    Thank you, once again, for your assistance.  I apologize for not having all the details in my first post.

    Sharon

    P.S.  I used the File, Export, Microsoft Office, Word to export to the Word file.

  • Kumaraswamy M
    Kumaraswamy M
    246 Posts

    Re: Subscripts in Headers

    ‏2013-11-28T03:04:16Z  
    • SharonS2
    • ‏2013-11-27T22:25:51Z

    Hello Kumar,

    Thanks again for responding and also for the sample files.  I ran these files and the subscripts are beautiful!  I believe I finally found the problem and it's one of my own making. 

    In my output Word document, I need to prepend text at the beginning of every object consisting of another attribute enclosed by parentheses and followed by the text.

    Text objects are simple - In RPE I just add text boxes with the parenthesis, the attribute, closing parenthesis and then the object - and one prints right after the other as follows:

    (AttributeText) Here is a paragraph of just plain stuff.

     

    Headers are a different story.  The required format is:

    1.  (AttributeText) Here is some header stuff.

     

    Adding text boxes before the object produced:

    (AttributeText)

    1.  Here is some header stuff.

     

    I had written script to concatenate the attribute text and parentheses with the header text into a variable and then have RPE print the variable.  Works well except when there's subscripts.  I guess the subscripts must not be able to transfer to a variable.

    Do you have any ideas on how I might accomplish this?

    Thank you, once again, for your assistance.  I apologize for not having all the details in my first post.

    Sharon

    P.S.  I used the File, Export, Microsoft Office, Word to export to the Word file.

    Hi Sharaon,

    >>>  Adding text boxes before the object produced:
    (AttributeText)
    1.  Here is some header stuff.

    This is because "Object heading" has a style "Heading 1" (see doorsData.xml from my previous post.). (AttributText) is a normal style. Hence they are written in different lines. You could see the style (formatting) difference in Word tool.

     

    >>> I had written script to concatenate the attribute text and parentheses with the header text into a variable and then have RPE print the variable.  Works well except when there's subscripts.  I guess the subscripts must not be able to transfer to a variable.

    Yes. Javascript strips off formatting including subscripts.

    >>> Do you have any ideas on how I might accomplish this?

    As per knowledge, I doubt this could be achieved. Let me check and get back.

     

    >>> P.S.  I used the File, Export, Microsoft Office, Word to export to the Word file.

    This is an export from DOORS itself. It doesn't use RPE.

     

    Thanks,

    Kumar

  • SharonS2
    SharonS2
    4 Posts

    Re: Subscripts in Headers

    ‏2013-12-06T23:40:58Z  

    Hi Sharaon,

    >>>  Adding text boxes before the object produced:
    (AttributeText)
    1.  Here is some header stuff.

    This is because "Object heading" has a style "Heading 1" (see doorsData.xml from my previous post.). (AttributText) is a normal style. Hence they are written in different lines. You could see the style (formatting) difference in Word tool.

     

    >>> I had written script to concatenate the attribute text and parentheses with the header text into a variable and then have RPE print the variable.  Works well except when there's subscripts.  I guess the subscripts must not be able to transfer to a variable.

    Yes. Javascript strips off formatting including subscripts.

    >>> Do you have any ideas on how I might accomplish this?

    As per knowledge, I doubt this could be achieved. Let me check and get back.

     

    >>> P.S.  I used the File, Export, Microsoft Office, Word to export to the Word file.

    This is an export from DOORS itself. It doesn't use RPE.

     

    Thanks,

    Kumar

    Hello Kumar,

    Thanks again for your assistance.  Just thought I would mention that I came across an article that might (or might) help here.  It is regarding processing rich text format.  I haven't had a chance to investigate this yet, but I thought I would pass it on to you just in case it's relevant...  and you're still interested...  o:)

    Thanks!

    Sharon

    http://rpeactual.com/2013/01/18/processing-rich-text-in-rpe/?relatedposts_exclude=286

     

  • Kumaraswamy M
    Kumaraswamy M
    246 Posts

    Re: Subscripts in Headers

    ‏2013-12-07T02:07:17Z  
    • SharonS2
    • ‏2013-12-06T23:40:58Z

    Hello Kumar,

    Thanks again for your assistance.  Just thought I would mention that I came across an article that might (or might) help here.  It is regarding processing rich text format.  I haven't had a chance to investigate this yet, but I thought I would pass it on to you just in case it's relevant...  and you're still interested...  o:)

    Thanks!

    Sharon

    http://rpeactual.com/2013/01/18/processing-rich-text-in-rpe/?relatedposts_exclude=286

     

    Hi Sharon,

    Thanks for the link!

    This happens only for "Obect Heading" since it has heading level. When there is a heading, it is moved to next line. What I could do is to strip of heading tag with a different tag. When I do this, the heading style is lost in the word document. I'm not sure if this helps.

    See attached template that makes use of the javascript (checkout the script in the template). The javascript tries getting rid of heading from "Object Heading". I've also checked "XHTML Input" and "XHTML Ouptut" in the javascript editor.

    Note: This solution might not work in all scenarios. There could be a risk of using this of failure in some cases.

    Thanks,

    Kumar

  • Kumaraswamy M
    Kumaraswamy M
    246 Posts

    Re: Subscripts in Headers

    ‏2013-12-07T02:08:06Z  

    Hi Sharon,

    Thanks for the link!

    This happens only for "Obect Heading" since it has heading level. When there is a heading, it is moved to next line. What I could do is to strip of heading tag with a different tag. When I do this, the heading style is lost in the word document. I'm not sure if this helps.

    See attached template that makes use of the javascript (checkout the script in the template). The javascript tries getting rid of heading from "Object Heading". I've also checked "XHTML Input" and "XHTML Ouptut" in the javascript editor.

    Note: This solution might not work in all scenarios. There could be a risk of using this of failure in some cases.

    Thanks,

    Kumar

    I had issues attaching template. Please use the below javascript and checking the "XHTML Input/Output" checkboxes.

     

    var attrHeading = '(' + id + ')' + Object_Heading;
    attrHeading = attrHeading.replace('<heading','<teading');
    attrHeading = attrHeading.replace('</heading','</teading');
    //java.lang.System.out.println(attrHeading);
    attrHeading