Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSLT White Space Gaps Under Images

From: "Marrow" <marrow@---------.--.-->
To: NULL
Date: 9/2/2004 11:48:00 PM
Hi Mark,

To take tight control of the whitespace produced by your transformation...
1. Make sure your output method is HTML and turn indentation off, e.g.
      <xsl:output method="html" indent="no"/>

2. Ensure that all implicit output text is made explicit - implicit output
text being text that is not wrapped within <xsl:text>, e.g.
    convert things like...
      <p>Something</p>
    to...
      <p>
        <xsl:text>Something</xsl:text>
      </p>

Also, don't use <xsl:attribute> when an AVT (attribute value template) would
suffice, e.g. rather than...
        <td>
           <a>
             <xsl:attribute name="href">
                <xsl:value-of select="$VirPath" />default.aspx
             </xsl:attribute>
             <img name="ImageName" src="Image.gif></img>
           </a>
        </td>
      use instead...
          <td>
            <a href="{$VirPath}default.aspx">
              <img name="ImageName" src="Image.gif"/>
            </a>
          </td>


HTH
Marrow
http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
http://www.topxml.com/Xselerator


"Mark247" <Mark247.1bzay2@m...> wrote in message
news:Mark247.1bzay2@m......
>
> Hi,
> When transforming an XSLT to HTML I get a very annnoying white space
> gap of about 2px under each image. This is particularly annoying as I
> am creating a vertical navigation menu made up of images with
> rollovers. I know why the space is there, I just dont know how to
> remedy the problem in my XSLT. The space is caused by the transformed
> HTML closing </a> being on the next line from the closing </img> tag
> and the closing </td> on the next line again. Even if I line everything
> up on the same line in the source XSLT it jumps down again when it is
> transformed to HTML.
>
> The XSLT code is pretty simple:
>
> <td><a>
> <xsl:attribute name="href">
> <xsl:value-of select="$VirPath" />default.aspx
> </xsl:attribute>
> <img name="ImageName" src="Image.gif>
> </img></a></td>
>
> How can I force the transformed HTML to line up properly so I dont get
> this 2px gap under my images?
>
>
>
> --
> Mark247
> ------------------------------------------------------------------------
> Posted via http://www.forum4designers.com
> ------------------------------------------------------------------------
> View this thread: http://www.forum4designers.com/message115162.html
>




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent