Changeset 217

Show
Ignore:
Timestamp:
02/06/07 09:36:19 (1 year ago)
Author:
nsteiner
Message:

adding correct attribute support to stub:image

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/experiments/general/xsl/main_home.xml

    r216 r217  
    88    <stub:include href="parts.xml" part="frank"/> 
    99    <stub:include href="parts.xml" part="schst"/> 
     10    <!-- Dieser Kommentar ist im Output nicht sichtbar --> 
    1011    <stub:comment>Das ist ein Kommentar</stub:comment> 
    1112    <stub:script> 
     
    1415      ]]> 
    1516    </stub:script> 
    16     <stub:image src="stubbles.png" alt="Stubbles Logo"/
     17    <stub:image src="stubbles.png" alt="Stubbles Logo" height="1000" width="1000"/> <!-- width und height werden überschrieben --
    1718    <stub:langselect> 
    1819      <stub:lang name="default">Das ist der Default-Text.</stub:lang> 
  • trunk/experiments/general/xsl/stub.xsl

    r216 r217  
    118118     
    119119  <xsl:template match="stub:image"> 
    120     <xsl:param name="src" select="@src"/> 
    121120    <xsl:variable name="dimensions" select="php:function('stubXSLCallback::invoke', 'image', 'getImageDimensions', @src)/child::*"/> 
    122     <img src="{$src}"> 
    123       <xsl:copy-of select="@style"/> 
    124       <xsl:copy-of select="@alt"/> 
    125       <xsl:copy-of select="@title"/> 
     121    <img> 
     122      <xsl:copy-of select="@*[local-name() != 'width' and local-name() != 'height']"/> 
    126123      <xsl:attribute name="width"><xsl:value-of select="$dimensions/width"/></xsl:attribute> 
    127124      <xsl:attribute name="height"><xsl:value-of select="$dimensions/height"/></xsl:attribute>