[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

trying again: automaticly image width and height

Subject: trying again: automaticly image width and height
From: Janning Vygen <vygen@xxxxxxxxxxxx>
Date: Fri, 11 May 2001 22:17:09 +0200
get image width
first question didnt get an answer. why? was ist so stupid??

heres my question again:
i tried some extension from lunatech to insert width and height into the img 
tags of a html nod set. i cant find the lunatech extensions in the internet 
again, so i cant ask them why the i get an input stream error after about 400 
images.

Does anybody has another  tool for inserting img width and height into an 
xhtml stream? Would be a great help for me.

thanks in advance 
janning

my xsl looks like this:

<xsl:template match="@*|node()" mode="html.defaults">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()" mode="html.defaults"/>
  </xsl:copy>
</xsl:template>

<xsl:template match="img" mode="html.defaults">
  <xsl:copy use-attribute-sets="img.defaults">
    <xsl:for-each select="@*">
      <xsl:copy/>
    </xsl:for-each>
    <xsl:if test="not(@width) or not(@height)">
      <xsl:variable name="source" select="concat($img.path, @src)"/>
      <xsl:if test="function-available('ImageSize:get-image-width')">
        <xsl:attribute name="width">
          <xsl:value-of select="ImageSize:get-image-width($source)"/>
        </xsl:attribute>
        <xsl:attribute name="height">
          <xsl:value-of select="ImageSize:get-image-height($source)"/>
        </xsl:attribute>
      </xsl:if>
    </xsl:if>
    <xsl:apply-templates mode="html.defaults"/>
  </xsl:copy>
</xsl:template>

-- 
Planwerk 6 /websolutions
Herzogstraße 86
40215 Düsseldorf

fon 0211-6015919
fax 0211-6015917
http://www.planwerk6.de

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.