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

Re: Saxon html includes unwanted white space in anchor tag

Subject: Re: Saxon html includes unwanted white space in anchor tag
From: Steve Tinney <stinney@xxxxxxxxxxxxx>
Date: Wed, 19 Jan 2000 10:58:14 -0500
html includes
You can add indent="no" to xsl:output.

Finer-grained control over indenting would be useful in XSL, even if not
strictly necessary.  Maybe an attribute on xsl:output which allowed
control on a per-output-tag basis.

 Steve

Mike Alsup wrote:
> 
> I'm having trouble when trying to use an html image tag inside an anchor tag
> using the following stylesheet:
> 
> ----------------------------
> <xsl:stylesheet
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
>     xmlns:saxon="http://icl.com/saxon"
>     extension-element-prefixes="saxon">
> 
> <xsl:output method="html"/>
> <xsl:strip-space elements="*"/>
> 
> <xsl:template match="/">
>     <html><body>
> 
>     <a href="#"><img border="0" src="image.jpg"/></a>
> 
>     test text
>     </body></html>
> </xsl:template>
> </xsl:stylesheet>
> ----------------------------
> 
> The saxon v5.1 processor ( when run via the StyleSheet class on the command
> line ) generates the following HTML:
> 
> ----------------------------
> <html>
>     <body>
>         <a href="#">
>             <img src="image.jpg" border="0">
>         </a>
> 
>     test text
>     </body>
> </html>
> ----------------------------
> 
> The trouble here is that there is white space after the image tag but within
> the anchor tag and when rendered this appears as part of the hyperlink (ie,
> the link extends beyond the image).  The Lotusxsl processor (v0.19.1)
> produces the following HTML which works fine as there is no unwanted white
> space in the anchor:
> 
> ----------------------------
> <html>
> <body>
> <a href="#"><img src="image.jpg" border="0"></a>
> 
>     test text
>     </body>
> </html>
> ----------------------------
> 
> Can anyone give me some guidance as to how to make this work right using the
> Saxon processor?
> 
> Thanks!
> 
> Michael
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

-- 
----------------------------------------------------------------------
Steve Tinney                                        Babylonian Section
                                 *   University of Pennsylvania Museum
stinney@xxxxxxxxxxxxx                          Phila, PA. 215-898-4047


 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.