On Sun, 2005-06-05 at 02:16 -0700, Diwaker Gupta wrote:
> Hi Thorsten and list,
>
> Has anyone got pdf-link and txt-link contracts working in views? I
> tried them out today. The pdf-link contract doesn't even run -- I get
> the following exception:
>
> X [0] linkmap.html BROKEN:
> javax.xml.transform.TransformerException: ElemTemplateElement error:
> pdf-link-body
>
Did you add org.apache.forrest.plugin.output.pdf to required plugins?
...but yeah this contracts are buggy. I will re-factor that code ASAP
(will go now out for lunch). ;-)
The pdf-link within the content-contract is working, but I am in the
middle of refactoring this contract to better extract the features added
by the document2html.xsl. This link and the other are on my list. ;-)
> With the txt-link, the build goes fine, but the txt pages are just
> never generated. Also, the txt-link target just generates a whole
> bunch of Javascript in the generated page:
>
> <div id="export-link"><script language="Javascript"
type="text/javascript">
> 	function printit() {
> 	 if (window.print) {
> 	 window.focus();
> 	 window.print();
> 	 }
> 	}
> 	 </script><script language="Javascript"
type="text/javascript">
> 	var NS = (navigator.appName == "Netscape");
> 	var VERSION = parseInt(navigator.appVersion);
> 	if (VERSION > 3) {
> 	 document.write('<div title="Print this Page" class="txt">');
> 	 document.write(' <a class="dida"
href="javascript:printit()">');
> 	 document.write(' <img alt="print - icon"
> src="skin/images/printer.gif" class="skin" />');
> 	 document.write(' <br />');
> 	 document.write(' PRINT</a>');
> 	 document.write('</div>');
> 	}
> 	 </script>
>
> I'm still looking into it.
Yeah I will re-factor that ASAP. It is direct copy of pelt. ;-)
>
> Also, I would recommend changing the div tag for "notes" and "warning"
> from "frame note" to "frame-note" for example. I just don't like the
> space because its inconvinient when writing CSS rules. The change is
> trivial:
>
> Index: main/webapp/skins/common/xslt/html/document2html.xsl
> ===================================================================
> --- main/webapp/skins/common/xslt/html/document2html.xsl
> (revision 180076)
> +++ main/webapp/skins/common/xslt/html/document2html.xsl
(working copy)
> @@ -137,7 +137,7 @@
>
> <xsl:template match="note | warning | fixme">
> <xsl:apply-templates select="@id"/>
> - <div class="frame {local-name()}">
> + <div class="frame-{local-name()}">
> <div class="label">
> <xsl:choose>
> <!-- FIXME: i18n Transformer here -->
>
I will look on that. Have to go now.
> cheers,
> Diwaker
salu2
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)