Tutorial: Using JavaServer Pages with WebWorks PublisherIf you use WebWorks Publisher to create HTML-based output from your FrameMaker documents, you can add JavaServer Pages (JSP) functionality to your HTML output. DAVID CASTRO |
|
|
There are four sets of steps for adding functionality to your HTML output that lets your end-users determine what content they want to view. This is similar to the conditionalize text feature in FrameMaker, but dynamic. |
|
Adding a JSP Conditional Tag to FrameMaker |
Use the following steps to add a JSP conditional tag to a FrameMaker document:
|
Setting WebWorks Publisher to Process JSP Code |
You must set up WebWorks Publisher so that it does not display the JSP content that is marked with the JSP condition you just created. Instead, WebWorks Publisher puts the JSP content into the output files as is. Use the following steps to set WebWorks Publisher to properly process JSP code:
|
Adding JSP Tag Library Capabilities to Your Output |
You must set up your page.asp file so that code is added to each HTML file that is output. Each page must have this code in order to use the JSP tag library you created. Use the following steps to add JSP tag library capabilities to your output:
|
Post-Processing your HTML or XML Output |
Finally, using this technique does require some post-processing. Fortunately, you can automate the post-processing. When you examine your output, you will notice the following:
If you leave the tags as they are generated, you will end up with empty paragraphs and empty table rows. Instead, you likely want the conditionalized paragraphs completely removed and the empty table rows to disappear. To do this, you must use a search and replace tool (for example, a grep tool) to go through your files and change the order of elements in your HTML code. The following steps show you all of the post-processing steps you need to perform. The search and replace tool that I use, and for which I provide grep syntax, is called Search and Replace and is distributed by Funduc Software. Use the following steps to post-process your HTML or XML output:
This particular search and replace changes the following code: <li class="SmartList1"><a name="32063"> </a><p><cond:dept dept="radiology">All Radiology personnel must ... </cond:dept></p></li> to this: <cond:dept dept="radiology"><li class="SmartList1"><a name="32063"> </a><p>All Radiology personnel must ... </p></li></cond:dept> Additional grep syntax is available on my Web site. |
| David
Castro works from his home outside of Charleston, South Carolina. When
he is not working as a Senior Information Developer for his telecommuting
job at CrossAccess Corporation, based in Santa Clara, California, he is
pretending to be a programmer by developing JSP tag libraries. He is married
and has a |
|
|
Practical Magic Reluctant Trainer Web Review Book Review Resources & References Home Fall 2001 (Volume 4, #4) Copyright © 1998, 2002 Society for Technical Communication |
|