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.
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:03ZThis is the accepted answer. This is the accepted answer.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,
Re: Documenting RPE Templates2011-04-20T08:29:30ZThis is the accepted answer. This is the accepted answer.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
Re: Documenting RPE Templates2011-04-20T10:20:36ZThis is the accepted answer. This is the accepted answer.
- Dragos.Cojocari 270001QUCG
thank you for your response.
However, using Winzip, Power Archiver, or Windows Explorer: I cannot find the template.xml file.
Re: Documenting RPE Templates2011-04-20T10:31:56ZThis is the accepted answer. This is the accepted answer.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.
Re: Documenting RPE Templates2011-04-26T09:08:49ZThis is the accepted answer. This is the accepted answer.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.
Re: Documenting RPE Templates2013-03-28T19:48:58ZThis is the accepted answer. This is the accepted answer.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.
Re: Documenting RPE Templates2013-03-29T11:47:29ZThis is the accepted answer. This is the accepted answer.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.