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

Re: variable ending with ^@

Subject: Re: variable ending with ^@
From: "Deborah Pickett" <debbiep-list-xsl@xxxxxxxxxx>
Date: Tue, 24 Feb 2009 16:55:10 +1100 (EST)
Re:  variable ending with ^@
Hi himanshu,

It might help for you to try to find whether the problem is with the first
  CGI -> Perl -> libxslt -> HTML
or the second stage after the user presses the submit button:
  CGI -> Perl logic_file.cgi -> HTTP redirect -> CGI -> Perl abc.cgi

You can do that easily enough by going "View Source" on the HTML that the
libxslt is producing.  Is there trailing garbage on the variable?  I
suspect not.

(If my suspicion is correct, it makes the rest of this reply off-topic for
an XSL list, since there isn't any XSLT in the second stage.  But if you
just want to hack together something that works, then I will summon my
Perl-fu for this advice:)

If you want to trim a trailing ASCII NUL byte from a Perl string, chomp
won't work.  chop should work, but it's usually too aggressive and will
chop anything.  Try instead:
  $variable =~ s/\0$//;

But I believe that you have probably removed the part of the code that is
introducing the trailing NUL in your effort to simplify the problem.  It's
quite unlikely that it's in the XSLT part of your chain, and far more
likely to be in the Perl code.

It might also be good to look through your HTTP server's logs and see if
the HTTP redirect URL looks right.

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

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.
First Name
Last Name
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-2013 All Rights Reserved.