[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Where did my tabs go? Trying to understand xsl:va
David Carlisle wrote:
(no tabs) <xsl:value-of select="somenode" separator="{&tab;}" /> Ouch, that hurts! Cut 'n' paste typo and I thought to have checked them all. Well, I meant "{'&tab;'}" ;-) <!DOCTYPE x [ This is where I fell asleep during the lesson last year ;-) I'm sure I saw this before. Thanks! Now it works as I expect it to. I can even use the character map, so as to prevent the tabs to be re-interpreted when I micro-pipeline some data, or use a normalize-space somewhere too often.
Haha. Nightmarish fun, yes. Some day in ancient history, I thought I had it all figured out. But recently we started redesigning some of the xslt libraries and we messed up big time in these corner areas of whitespace handling. I am sure this issue also has to do with the way I am mistreating newline characters. One more question that I still don't get. If XML parses these entities before it gets to XSLT, and if XML has predefined entities & < > ' and " why can't I use the following to the same success? <!DOCTYPE x [ <!ENTITY tab "	" > <!ENTITY tab2 "&#x09;" > ]> It will produce '	' where you previously got ' ' (tab). Hmm, thinking out loud here: if I get rid of that character map, and I stick to the lovely &tab; (defined as your &tab2;), do I risk loosing the tab characters in the output stream when I tossle and hossle them hence and forth through my templates during a single pass? Meaning, can normalize-space, strip-space, xsl:value-of, xsl:variable + pipelining, xsl:function etc be a spoil-sport for me? (if so, character maps are safer, if not, I can as well get rid of them) Cheers and thanks! -- Abel Braaksma http://www.nuntia.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|