forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diwaker Gupta <diwakergu...@gmail.com>
Subject pdf-link and txt-link in views
Date Sun, 05 Jun 2005 09:16:04 GMT
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

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">
&#9;function printit() {
&#9;  if (window.print) {
&#9;    window.focus();
&#9;    window.print();
&#9;  }
&#9;}
&#9;        </script><script language="Javascript" type="text/javascript">
&#9;var NS = (navigator.appName == "Netscape");
&#9;var VERSION = parseInt(navigator.appVersion);
&#9;if (VERSION &gt; 3) {
&#9;  document.write('<div title="Print this Page" class="txt">');
&#9;  document.write('  <a class="dida" href="javascript:printit()">');
&#9;  document.write('    <img alt="print - icon"
src="skin/images/printer.gif" class="skin" />');
&#9;  document.write('    <br />');
&#9;  document.write('  PRINT</a>');
&#9;  document.write('</div>');
&#9;}
&#9;        </script>

I'm still looking into it.

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 -->

cheers,
Diwaker
-- 
Diwaker Gupta
http://resolute.ucsd.edu/diwaker

Mime
View raw message