You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Thorsten Scherler <th...@apache.org> on 2004/08/12 05:06:32 UTC

Copyless for pelt-dev - Re: svn commit: rev 36266 - in forrest/trunk/src/core/context/skins/pelt-dev: . css xslt/html

Hello Devs,

again, why I had to copy and paste the code from common to pelt-dev to 
enable the external link images?

BTW the tigris style does not support external link images (bug or 
feature?).

Any help to prevend that is very welcome!

king regards
thorsten

thorsten@apache.org wrote:
> Author: thorsten
> Date: Wed Aug 11 19:47:51 2004
> New Revision: 36266
> 
> Modified:
>    forrest/trunk/src/core/context/skins/pelt-dev/css/profile.css.xslt
>    forrest/trunk/src/core/context/skins/pelt-dev/css/screen.css
>    forrest/trunk/src/core/context/skins/pelt-dev/note.txt
>    forrest/trunk/src/core/context/skins/pelt-dev/xslt/html/site2xhtml.xsl
> Log:
> - added external link image support
> - enhanced the underline 
> Modified: forrest/trunk/src/core/context/skins/pelt-dev/note.txt
> ==============================================================================
> --- forrest/trunk/src/core/context/skins/pelt-dev/note.txt	(original)
> +++ forrest/trunk/src/core/context/skins/pelt-dev/note.txt	Wed Aug 11 19:47:51 2004
> @@ -1,25 +1,34 @@
>  -- introduce the external-link-images.
> --> TODO
> +-> DONE
> 
> Modified: forrest/trunk/src/core/context/skins/pelt-dev/xslt/html/site2xhtml.xsl
> ==============================================================================
> --- forrest/trunk/src/core/context/skins/pelt-dev/xslt/html/site2xhtml.xsl	(original)
> +++ forrest/trunk/src/core/context/skins/pelt-dev/xslt/html/site2xhtml.xsl	Wed Aug 11 19:47:51 2004
> @@ -325,7 +325,7 @@
> -
> + <!-- handle all obfuscating mail links and disabling external link images -->
> +  <xsl:template match="a">
> +    <xsl:choose>
> +      <xsl:when test="$obfuscate-mail-links='true' and starts-with(@href, 'mailto:') and contains(@href, '@')">
> +        <xsl:variable name="mailto-1" select="substring-before(@href,'@')"/>
> +        <xsl:variable name="mailto-2" select="substring-after(@href,'@')"/>
> +          <a href="{$mailto-1}.at.{$mailto-2}">
> +            <xsl:apply-templates/>
> +          </a>
> +       </xsl:when>
> +       <xsl:when test="not($disable-external-link-image='true') and contains(@href, ':') and not(contains(@href, //skinconfig/group-url)) and not(contains(@href, //skinconfig/project-url))">
> +          <a href="{@href}" class="external">
> +            <xsl:apply-templates/>
> +          </a>
> +       </xsl:when>       
> +       <xsl:otherwise>
> +        <!-- xsl:copy-of makes sure we copy <a href> as well as <a name>
> +             or any other <a ...> forms -->
> +        <xsl:copy-of select="."/>
> +      </xsl:otherwise>
> +    </xsl:choose>
> +  </xsl:template>
>    <xsl:template name="menu">
>  <xsl:comment>+
>      |start Menu
> 


Re: Copyless for pelt-dev - Re: svn commit: rev 36266 - in forrest/trunk/src/core/context/skins/pelt-dev: . css xslt/html

Posted by "Scherler, Thorsten" <th...@apache.org>.
Hi Rick,

cheers, dude!

I removed <xsl:template match="node()|@*" priority="-1"/> and it works 
fine!

Thank you very much again!

King regards
thorsten

Rick Tessner wrote:
> On Wed, 2004-08-11 at 20:06, Thorsten Scherler wrote:
> 
>>Hello Devs,
>>
>>again, why I had to copy and paste the code from common to pelt-dev to 
>>enable the external link images?
> 
> 
> Hi there,
> 
> I'd suggest removing the default template from the
> pelt-dev/xslt/html/site2html.xsl (ie the
> 
>         <xsl:template match="node()|@*" priority="-1">
> 
> template.)
> 
> This template would typically match anything not explicitly defined in
> the pelt-dev/xslt/html/site2html.xsl over anything defined in the
> imported common/xslt/html/site2html.xsl due to import precedence rules. 
> I'm not clear on how the priority attribute affects this, even after
> reading the W3C spec.  It would appear however, that the imported
> templates are not being matched since you are having to copy/paste
> templates from common into pelt-dev.
> 
> I'd try removing that template above from pelt-dev, along with any
> others that you've copy/pasted and try running forrest again. 
> Everything should work properly. :)
>   



Re: Copyless for pelt-dev - Re: svn commit: rev 36266 - in forrest/trunk/src/core/context/skins/pelt-dev: . css xslt/html

Posted by Rick Tessner <ri...@onnadayr.ca>.
On Wed, 2004-08-11 at 20:06, Thorsten Scherler wrote:
> Hello Devs,
> 
> again, why I had to copy and paste the code from common to pelt-dev to 
> enable the external link images?

Hi there,

I'd suggest removing the default template from the
pelt-dev/xslt/html/site2html.xsl (ie the

        <xsl:template match="node()|@*" priority="-1">

template.)

This template would typically match anything not explicitly defined in
the pelt-dev/xslt/html/site2html.xsl over anything defined in the
imported common/xslt/html/site2html.xsl due to import precedence rules. 
I'm not clear on how the priority attribute affects this, even after
reading the W3C spec.  It would appear however, that the imported
templates are not being matched since you are having to copy/paste
templates from common into pelt-dev.

I'd try removing that template above from pelt-dev, along with any
others that you've copy/pasted and try running forrest again. 
Everything should work properly. :)
  
-- 
Rick Tessner <ri...@onnadayr.ca>


Re: Copyless for pelt-dev - Re: svn commit: rev 36266 - in forrest/trunk/src/core/context/skins/pelt-dev: . css xslt/html

Posted by "Scherler, Thorsten" <th...@apache.org>.
> BTW the tigris style does not support external link images (bug or 
> feature?).
> 

That is not true! I just tried it again and it works fine!

king regards
thorsten