xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Unwanted added spaces in output code


Subject: RE: [xsl] Unwanted added spaces in output code
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Wed, 29 Sep 2004 13:26:34 +0300

Hi,

> I didn't include the code because it is a hard coded part of the style
> sheet.
>
> <!--Aaron test footer area-->
>
>     <tr>
>         <td colspan="2" align="left" valign="top">
>
>             <table width="100%" cellspacing="0" cellpadding="0">
>           <tr>
>             <td colspan="3">
>
>             <table width="100%" cellpadding="0" cellspacing="0">
>                 <tr>
>                     <td bgcolor="#bdced6"><img
> src="/includes/assets/2004Design/spacer.gif" width="1"
> height="1" alt=""
> /></td>

If this is your stylesheet, you have no xml:space definitions in your
stylesheet, and it comes out as

<tr>
      <td bgcolor="#bdced6"><img alt="" height="1"
width="1"src="/includes/assets/2004Design/spacer.gif" /> </td>
</tr>

Then your serializer is doing something funny. Or rather, the spec
<http://www.w3.org/TR/xslt#section-HTML-Output-Method> says:

  "If the indent attribute has the value yes, then the html output method may
add or remove whitespace as it outputs the result tree, so long as it does not
change how an HTML user agent would render the output. The default value is
yes."

Maybe your XSLT engine gets it wrong and adds whitespace into places it
shouldn't.

What's your xsl:output/@indent setting? Try with "no".

Cheers,

Jarno - <Unknown>: Dust Angel


Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor