Topic
12 replies Latest Post - ‏2013-04-03T11:56:33Z by SystemAdmin
Dragos.Cojocari
Dragos.Cojocari
1591 Posts
ACCEPTED ANSWER

Pinned topic Documenting RPE Templates

‏2011-03-09T10:12:15Z |
RPE can be used to document itself, or more precisely, create documents using RPE templates as source. This can prove useful in many scenarios and can be achieved using the technique described bellow. You can use the output documents for searching in complex RPE templates or for printing templates.

The attached RPE template (print_RPE_Template) can be used to create a document with the content of any other RPE template. The attachments also contain the schema for the RPE templates, the sample template I tested on ( sample.dta) and and the HTML output.

The print_RPE_Template does not document master pages or the formatting information of elements. You can enhance it however to do that too using the provided schema.

To run the document generation you have two options:
- manually unzip the target RPE template and then point RPE to the template.xml file from the unzip location
- if you have a zip utility that can be controlled through command line you can automate the process by running that in the pre processing command of the data source. See bellow an example of unzipping D:\test\rpeprint\sample.dta into the d:\tmp\template folder. The docspec is configured to get template XML from that location:
"C:\Program Files\7-Zip\7z.exe" e -y -oD:\tmp\template "D:\test\rpeprint\sample.dta"

Make sure that the command requires no user input ( confirmations) as that would block RPE. The DSX that is attached shows using 7zip for this task.

Regards,
Dragos
Updated on 2013-04-03T11:56:33Z at 2013-04-03T11:56:33Z by SystemAdmin
  • Buberg
    Buberg
    7 Posts
    ACCEPTED ANSWER

    Re: Documenting RPE Templates

    ‏2011-04-20T08:19:03Z  in response to Dragos.Cojocari
    Hi Dragos,

    I appreciate your idea to have the possibility of documenting templates.

    Please give some assistance to correctly interprete your sentence "manually unzip the target RPE template and then point RPE to the template.xml file from the unzip location".

    1. What do you mean exactly with "point RPE to the template.xml file"? I cannot find the template.xml file anywhere in the unzipped folder.

    2. Which is the "target template"?

    3. At which part of the documentation process can I find the relation between your "documentation tool" and the sample.dta template?

    Unfortunately I cannot reproduce your *.htm output.

    Thanks for your support and kind regards,

    Chris
  • Dragos.Cojocari
    Dragos.Cojocari
    1591 Posts
    ACCEPTED ANSWER

    Re: Documenting RPE Templates

    ‏2011-04-20T08:29:30Z  in response to Dragos.Cojocari
    Hi,

    >> 1. What do you mean exactly with "point RPE to the template.xml file"? I cannot find the template.xml file anywhere in the unzipped folder.
    Most likely something went wrong during the unzip process. Unzip manually ( or open the archive with Windows Explorer) and you will see template.xml. Use that XML file to manually configure the data source of the print_RPE_Template.

    >> 2. Which is the "target template"?
    The RPE template you want to document.

    >> 3. At which part of the documentation process can I find the relation between your "documentation tool" and the sample.dta template?
    Look at the "command" property of the data source in the docspec. You will see that the command unzips sample.dta

    /Dragos
    • Buberg
      Buberg
      7 Posts
      ACCEPTED ANSWER

      Re: Documenting RPE Templates

      ‏2011-04-20T10:20:36Z  in response to Dragos.Cojocari
      Hi Dragos,

      thank you for your response.

      However, using Winzip, Power Archiver, or Windows Explorer: I cannot find the template.xml file.

      What's wrong?

      Chris
  • Dragos.Cojocari
    Dragos.Cojocari
    1591 Posts
    ACCEPTED ANSWER

    Re: Documenting RPE Templates

    ‏2011-04-20T10:31:56Z  in response to Dragos.Cojocari
    Hey Chris,

    I assume you are trying to unzip sample.dta not just the archive rpeprint.zip. All RPE templates are zip files and template.xml is inside them.

    Regards,
    Dragos
    • Buberg
      Buberg
      7 Posts
      ACCEPTED ANSWER

      Re: Documenting RPE Templates

      ‏2011-04-26T09:03:59Z  in response to Dragos.Cojocari
      Hi Dragos,

      this hint was the solution to my problem.

      Thank you,

      Chris
  • Dragos.Cojocari
    Dragos.Cojocari
    1591 Posts
    ACCEPTED ANSWER

    Re: Documenting RPE Templates

    ‏2011-04-26T09:08:49Z  in response to Dragos.Cojocari
    Hey Chris,

    glad you got it to work. I'd appreciate feedback on the usefulness of this technique and what could be done to improve it.

    Regards,
    Dragos
  • PeterJO
    PeterJO
    29 Posts
    ACCEPTED ANSWER

    Re: Documenting RPE Templates

    ‏2013-03-28T19:48:58Z  in response to Dragos.Cojocari
    I am unable to locate the template.xml file

    I used winzip to extract all files to a folder and below is a screen shot of what I see.
  • Dragos.Cojocari
    Dragos.Cojocari
    1591 Posts
    ACCEPTED ANSWER

    Re: Documenting RPE Templates

    ‏2013-03-28T20:04:30Z  in response to Dragos.Cojocari
    You need to unzip sample.dta

    Regards,
    Dragos

    RPE Actual
  • Dragos.Cojocari
    Dragos.Cojocari
    1591 Posts
    ACCEPTED ANSWER

    Re: Documenting RPE Templates

    ‏2013-03-29T11:47:29Z  in response to Dragos.Cojocari
    Hey Peter,

    dta files are zip archives. Most archive utilities will recognize archives even if they have a different extension. But if the tool that you use doesn't than just rename sample.dta to sample.zip and open it using Windows Explorer or your zip utility.

    Regards,
    Dragos

    RPE Actual
  • SystemAdmin
    SystemAdmin
    1299 Posts
    ACCEPTED ANSWER

    Re: Documenting RPE Templates

    ‏2013-04-03T11:56:33Z  in response to Dragos.Cojocari
    Very nice. This will be useful.