forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject Re: pdf-link and txt-link in views
Date Sun, 05 Jun 2005 12:37:44 GMT
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">
> &#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.

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)


Mime
View raw message