Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] XSL 2.0 and .NET and VB

From: "M. David Peterson" <m.david@------------->
To:
Date: 7/1/2007 12:58:00 PM
On Sun, 01 Jul 2007 06:06:11 -0600, Florent Georges
<darkman_spam@xxxxxxxx> wrote:

The other point to use xsl:text is to not have non intended
whitespace in the output when you "indent" the stylesheet and have a
"well-indented" stylesheet where a string is surrounded by spaces and
newlines.  The human eye is used to strip white spaces in XML, so you
not always see them:

Excellent point!  I ran into this just the other day[1] building out a
solution[2] for testing the redirects for a newly installed instance of
MovableType in which included content from an old install of MovableType,
changing the URI's of the old content to a new URI scheme.  The problem
was with the .htaccess file for doing the redirect.  By using just
"RedirectPermanent <xsl:value-of select="$old-uri"/> <xsl:value-of
select="$new-uri"/>" it would output the white-space preceding the
"RedirectPermanent" in the tranformation file, something I avoided by
using concat() to build the string out manually.  Of course, with a
.htaccess file the white-space is ignored, so this was really more from a
personal aesthetics standpoint, but the point of taking control over the
text output using xsl:text or some other manner such as concat() is an
important lesson to both learn and understand the importance of.

[1] http://www.oreillynet.com/xml/blog/2007/06/lessig_20_v2_now_live.html
[2]
http://extf.googlecode.com/svn/trunk/WebApp/transform/controller/test/movable
-type-conversion.xsl

--
/M:D

M. David Peterson
http://mdavid.name | http://www.oreillynet.com/pub/au/2354 |
http://dev.aol.com/blog/3155


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