Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MrTom -- re: LIBXSLT

Status
Not open for further replies.

spiel2001

Programmer
Nov 1, 2001
39
0
0
US
I realize this is a tad off-topic for this board... but since you seem familiar with this library... two questions for you:

1) any idea why LIBXSLT is stripping the WIDTH and HEIGHT values off the STYLE attribute in my <SPAN> statements? It's messing up my page formatting as none of the spans are bounded now. TOP and LEFT are still there, as is OVERFLOW. But HEIGHT and WIDTH are gone from the output even though they were in the input.

2) The output HTML is a continuous string of HTML with all new lines and indentation stripped out. Is there a way to preserve the formatting in the output stream?

Aside from those two observations, it was a remarkably painless job getting LIBXML and LIBXSLT installed and to convert my CGI (test case) to do server side transforms.

Very nice and thanks again for the recommendation on it. My appologies to the board for straying slightly off topic.
 
Oops -- found the problem with the HEIGHT and WIDTH values in the STYLE section of my SPAN elements. Seems Dreamweaver has a bug in it... it enters WIDTH and HEIGHT as WIDTH=Xpx and HEIGHT=Ypx instead of the WIDTH: Xpx and HEIGHT: Ypx form that it should be in.

Just a heads up in case anyone else encounteres the same problem.

Still wondering about preserving indentation, white space and new lines in the output from LIBXSLT though.

Again, very cool and thanks again MrTom.
 
yeah, the output can be a little messy.

i always use
<xsl:eek:utput method=&quot;xml&quot; indent=&quot;yes&quot;>

at the top of my sheets but the indent hasn't always done what i've expected. i think that might just be the old version i'm using. i just tried a transform on the new libraries and the output looks neat.
if you are outputting to a text file you can always get the exact formatting you want but you have to be very verbose when writing the stylesheet.
 
MrTom --

Doh! That did the trick. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top