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.
This topic has been locked.
12 replies Latest Post - 2013-04-03T11:56:33Z by SystemAdmin
Pinned topic Documenting RPE Templates
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-04-03T11:56:33Z at 2013-04-03T11:56:33Z by SystemAdmin
Re: Documenting RPE Templates2011-04-20T08:19:03Z in response to Dragos.CojocariHi 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,
Re: Documenting RPE Templates2011-04-20T08:29:30Z in response to Dragos.CojocariHi,
>> 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
Re: Documenting RPE Templates2013-03-28T19:48:58Z in response to Dragos.CojocariI 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.
Re: Documenting RPE Templates2013-03-29T11:47:29Z in response to Dragos.CojocariHey 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.