Hi,
my question is a bit different from the other ones..
i got an xsl-code like this:
<xsl:value-of select="..."/> <xsl:value-of select="...">
what i want in my result is:
result_of_select_1 result_of_select_2
what i get is:
result_of_select_1result_of_select_2
how can i prevent this? ( any xsl:output option for example?...
I have a function that transforms XML according to a XSLT. To test it, I'm using it in a jsp but it's entering a lot of breaks before my output. It seems to be the breaks I enter when setting variables:
<c:set var="blah" value="blah" />
<c:set var="blah2" value="blah2" />
That will show two line breaks before the output. Is there a...
Hello
I'm trying to achieve full XHTML transitional validation of my JSP output but I've hit a snag. The top of the header looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
It is included with a stat...
Hi
I have this HTML string which often has a lot of whitespaces
Example:
<p>All these words <br />
<strong>All</strong> <em>these</em> words
<pre> All these words</pre>
</p>
I need to remove them using JavaScript, and have come up with this regEx:
String.replace(/ {2,}/g, '');
Which seems to do the job with replacin...
I am using lxml to manipulate some existing XML documents, and I want to introduce as little diff noise as possible. Unfortunately by default lxml.etree.XMLParser doesn't preserve whitespace before or after the root element of a document:
>>> xml = '\n <etaoin>shrdlu</etaoin>\n'
>>> lxml.etree.tostring(lxml.etree.fromstring(xml))
'<e...
I have some Java (5.0) code that constructs a DOM from various (cached) data sources, then removes certain element nodes that are not required, then serializes the result into an XML string using:
// Serialize DOM back into a string
Writer out = new StringWriter();
Transformer tf = TransformerFactory.newInstance().newTransformer();
tf.s...
I am in the distinctly unfortunate circumstance of working in an environment which worries little of the deep evil known as "trailing whitespace"... But, alas, the enlightened Mercurial persists in warning me, by means of red highlights in diffs, that code I will be checking in contains this unholy thing.
So, is there any way to tell Me...
I have a particularly stupid insecurity about the aesthetics of my code... my use of white space is, frankly, awkward. My code looks like a geek dancing; not quite frightening, but awkward enough that you feel bad staring, yet can't look away.
I'm just never sure when I should leave a blank line or use an end of line comment instead of...
I have a textarea. I am trying to check that it contains atleast 3 non-whitespace characters in javascript, and if it does, I need to recheck the posted message in php.
I think once I get it working in php, I can use the same regexp for javascript. However, the whitespaces are messing it up.
I don't understand why the following does no...
Hello,
Is it a known problem that unregular spaces used in code can cause a CSS or an HTML to be defective ?
When typing a bit fast, I sometimes type ALT+SPACE instead of SPACE (before the curly braces most of the time).
Is it possible to make all alternative spaces symbols (that are invisible to the eyes, but not to the code) be the ...
Hello,
The question has two parts, one of which I already have the answer for.
How to auto-remove trailing whitespace from the entire file being edited? -> Answer: use the AnyEdit plugin, which can be set to do that on any save to the file.
How to auto-remove trailing whitespace only from the lines I changed? -> This I don't know and ...
Hi everyone.
Well i am really pissed off :(
I have a file called test.txt. and here it is:
"/var/lib/backup.log"
"/var/lib/backup2.log"
double quotes are included in the file each at beginning and end of the directory and i can not remove them.
i am trying to write a script to remove files in test.txt.
like this:
for del in `cat tes...
Hi everyone..
Well i am really stuck at this one.
I have dirs.txt which is as follows:
/var/tmp/old files.txt
/var/tmp/old backups.bak
dirs.txt file is generated by the script itself.
When i want to use dirs.txt in a for loop like:
for dir in `cat dirs.txt` ; do
ls -al $dir
done
Here is what the command throws:
ls: cannot ac...
Apple's Objective-C documentation, references, and generated code seem to be totally inconsistent with their coding style. I can not determine the "preferred" style (if one exists) for Objective-C and Cocoa source code.
Here's what I've ran into so far.
Tab settings
Xcode's default setting is set to tabs. However, generated projects ...
There seems to be a bug in a Wordpress PHP function that leaves whitespace in front of the title of the page generated by <?php echo wp_title(''); ?> I've been through the Wordpress docs and forums on that function without any luck.
I'm using it this way <body id="<?php echo wp_title(''); ?>"> in order to generate an HTML body tag with...
I am building a tool to display diffs between two text documents and I need to show formatting.
Anyone know how to do it in a FlowDocumentPageViewer or WPF?
...
Presuming that the spaces are not important in a field's data, is it good practice to trim off the spaces when inserting, updating or selecting data from the table ?
I imagine different databases implement handling of spaces differently, so to avoid that headache, I'm thinking I should disallow leading and trailing spaces in any field d...
Hello, I have the following Antlr grammar:
grammar MyGrammar;
doc : intro planet;
intro : 'hi';
planet : 'world';
MLCOMMENT
: '/*' ( options {greedy=false;} : . )* '*/' { $channel = HIDDEN; };
WHITESPACE : (
(' ' | '\t' | '\f')+
|
// handle newlines
( '\r\n' // DOS/Windows
| '\r' // Macintosh
| '\...
How would I go about detecting whitespace within a string? For example, I have a name string like:
"Jane Doe"
Keep in mind that I don't want to trim or replace it, just detect if whitespace exists between the first and second string.
...
This one got me the other day. What would you expect the following to return?
SELECT 'X' AS line
UNION
SELECT 'X ' AS line
Notice the space in the second SELECT.
Well apparently SQL 2000 and 2005 both return 1 result. Even though its a UNION (and not a UNION ALL).
There is nothing I can see in Books on line about this. Why does it ha...