josh.asbury
Usenet Archive
- Joined
- Jan 28, 2005
- Messages
- 1
- Reaction score
- 0
I am having some major issues with whitespace in my XSL stylesheets. We recently upgraded our servlet-based application to JDK 1.4, and this has forced the issue of my finally upgrading to Xalan-Java 2. The earlier version of Xalan was much more forgiving in regards to whitespace in our .xsl files, and now I am learning all about <xsl:text> and <xsl:strip-space>.
I've come across something with HTML buttons, though, that I can't find a way around.
Our XSL looks like this:
<input type="button" name="save" id="save"
onClick="thisValidate"> <xsl:attribute
name="value">select</xsl:attribute>
</input>
<span style="width:5"/>
<input type="button" name="cancel" id="cancel" value="cancel"> <xsl:attribute name="onClick">window.navigate('<xsl:value-of select="$parentPage"/>?catid=<xsl:value-of select="$categoryId"/>')</xsl:attribute> </input>
Which outputs to HTML exactly like this:
<INPUT onClick="thisValidate" id="save" name="save" type="button" value="select"><span style="width:5"></span><input value="cancel" id="cancel" name="cancel" type="button" onClick="window.navigate('AddLocalServicesByCategory
?catid=204194')">
I'm stumped. I've put <xsl:text/> in the window.navigate section. I've put <xsl:strip-space elements="*"/> in the stylesheet ( which, I think, shouldn't impact this behavior ).
Any insight or ideas on this would be greatly appreciated. I've got a ton of stylesheets behaving like this and need to have a solid go-forward plan in order to make this upgrade a success.
Thanks!
Josh
I've come across something with HTML buttons, though, that I can't find a way around.
Our XSL looks like this:
<input type="button" name="save" id="save"
onClick="thisValidate"> <xsl:attribute
name="value">select</xsl:attribute>
</input>
<span style="width:5"/>
<input type="button" name="cancel" id="cancel" value="cancel"> <xsl:attribute name="onClick">window.navigate('<xsl:value-of select="$parentPage"/>?catid=<xsl:value-of select="$categoryId"/>')</xsl:attribute> </input>
Which outputs to HTML exactly like this:
<INPUT onClick="thisValidate" id="save" name="save" type="button" value="select"><span style="width:5"></span><input value="cancel" id="cancel" name="cancel" type="button" onClick="window.navigate('AddLocalServicesByCategory
?catid=204194')">
I'm stumped. I've put <xsl:text/> in the window.navigate section. I've put <xsl:strip-space elements="*"/> in the stylesheet ( which, I think, shouldn't impact this behavior ).
Any insight or ideas on this would be greatly appreciated. I've got a ton of stylesheets behaving like this and need to have a solid go-forward plan in order to make this upgrade a success.
Thanks!
Josh