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

Re: XSL 2.0 and .NET and VB

Subject: Re: XSL 2.0 and .NET and VB
From: "M. David Peterson" <m.david@xxxxxxxxxxxxx>
Date: Sun, 01 Jul 2007 06:57:44 -0600
Re:  XSL 2.0 and .NET and VB
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

Current Thread

Back To School Sale!

Save 30% off all Stylus Studio 2008 Products when you purchase from our Online Shop.

Offer ends August 31, 2008.

Coupon Code
TRTY-C4JV-OFF

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-2007 All Rights Reserved.