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

spacing issues when working with the Saxon processor w

Subject: spacing issues when working with the Saxon processor with Stylus
From: Spencer Tickner <spencertickner@xxxxxxxxx>
Date: Mon, 18 Jul 2005 09:27:04 -0800
 spacing issues when working with the Saxon processor w
Hi everyone,

I am having difficulty with a spacing issue in a link. I've been able
to recreate the problem with a stripped down verision of my stylesheet
and xml:

XSLT

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html" indent="no" omit-xml-declaration="yes"
encoding="ISO-8859-1" name="html"/>
	<xsl:strip-space elements="tlc"/>

<xsl:template match="/">
			<xsl:apply-templates/>
</xsl:template>

<xsl:template match="currency">
	<html>
		<body>
		<table>
		<xsl:if test="/descendant::tlc">
			<tr>
				<td colspan="4" class="tabletext">This Act has &quot;Not in
Force&quot; sections. <em>See</em> the <xsl:element
name="a"><xsl:attribute name="href"><xsl:text>#!--
#ID:</xsl:text><xsl:value-of select="normalize-space(translate(tlc, '
', ''))"/><xsl:text> </xsl:text>--#</xsl:attribute>Table of
Legislative Changes.</xsl:element></td>
			</tr>
		</xsl:if>
		</table>
		</body>
	</html>
</xsl:template>
</xsl:stylesheet>

XML:

<?xml version="1.0"?>
<currency>
 <tlc>E2tlc96159</tlc>
</currency>

Results:

<html><body><table><tr><td colspan="4" class="tabletext">This Act has
"Not in Force" sections. <em>See</em> the <a href="#!-- #ID:
E2tlc96159   --#">Table of Legislative
Changes.</a></td></tr></table></body></html>

The problem is the link,,

<a href="#!-- #ID: E2tlc96159   --#">

should be,

<a href="#!-- #ID:E2tlc96159  --#">

If you can't make it out in the email there should be 1 less space
after the final "9" before the dash, and no space between the "ID:"
and the "E"..

Any thoughts would really help me out.

Spencer

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.