[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] stripping newlines
Subject: RE: [xsl] stripping newlines From: "Andrew Kane" <akane@xxxxxxxxxxxx> Date: Wed, 5 Sep 2001 16:53:05 -0400 |
You can have carriage returns in javascript strings: setHTML(' bla \ bla '); is the same as: setHTML(' bla bla '); Now in XSLT if you have a variable which contains your html (named myHTML) you can do something like: setHTML( '<xsl:value-of select='translate($myHTML, " ", "\\ 
")' />' ); ( is a carriage return) though you probably want to escape the quotes in the myHTML output: setHTML( '<xsl:value-of select='translate(translate($myHTML, " ", "\\ 
"), "\'", "\\\'")' />' ); I'm not sure if that is the right escaping... Andrew. > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Matt > Alexander > Sent: September 5, 2001 12:16 PM > To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx' > Subject: [xsl] stripping newlines > > > > hi, > > i'm creating an html page with javascript in it. > > inside one of the js calls, setHTML('') i can't have any carriage returns, > or it is an 'unterminated string'. > the only way i've been able to get around this is to right my transform as > one big chunk of xslt w/out any carriage returns. this makes it ugly and > hard to update, so i'm, hoping to find a transform that would take my > transform and create a new transform without any carriage return between > elements. xsl:strip-space, never catches all of the returns. > > i need... > blah.setHTML('<table><tr><td><etc..../></td></tr></table>'); > > but i always end up with... > > blah.setHTML('<table><tr> > <td><etc..../></td> > </tr></table>'); > > or something like that. i don't know if there is anything that > will do this > in xslt, but i'd appreciate any help... > > thanks, > -matt > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Controlling Newlines (was Re: [xsl], Thomas B. Passin | Thread | RE: [xsl] Text Box Prob, Hewko, Doug |
[xsl] How to define the XPath expre, Ed Steenhoek | Date | [xsl] Re: _why_ do people use xsl:e, Deborah Aleyne Lapey |
Month |
Keywords