XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Gerald NelsonSubject: incorrectly deleting space
Author: Gerald Nelson
Date: 14 Jul 2002 04:09 PM
I think the following behavior is a bug. When I use the indent xml tags on the material below, the space between the closing emphasis tag and the word Columns is deleted.

(Key Question) Columns 1 through 4 of the accompanying table show the marginal utility, measured in terms of utils, which Ricardo would get by purchasing various amounts of products A, B, C, and D. Column 5 shows the marginal utility Ricardo gets from saving. Assume that the prices of A, B, C, and D are $18, $6, $4, and $24, respectively, and that Ricardo has a money income of $106.

Postnext
Alberto MassariSubject: Re: incorrectly deleting space
Author: Alberto Massari
Date: 15 Jul 2002 06:02 AM
At 16.23 14/07/2002 -0400, you wrote:
>From: "Gerald Nelson"
>
>I think the following behavior is a bug. When I use the indent xml tags on
>the material below, the space between the closing emphasis tag and the
>word Columns is deleted.

Gerald,
if you want to force this behavior (preserving all whitespace occurring at
the start and at the end of a text fragment), you should:
- select Tool | Options
- select the Editor General entry
- choose the editor where you want this behavior to be used (e.g. XML
Editor and/or XSLT Editor)
- check the "Indenter should preserve whitespace" check box

Hope this helps,
Alberto

Postnext
Gerald NelsonSubject: Re: incorrectly deleting space
Author: Gerald Nelson
Date: 15 Jul 2002 08:38 PM
Thanks for the tip. But I still wonder about this. I don't want to preserve all white space. Isn't there a difference in xml between a single space and multiple spaces?
Jerry

Posttop
Alberto MassariSubject: Re: incorrectly deleting space
Author: Alberto Massari
Date: 16 Jul 2002 06:40 AM
At 20.52 15/07/2002 -0400, you wrote:
>From: "Gerald Nelson"
>
>Thanks for the tip. But I still wonder about this. I don't want to
>preserve all white space. Isn't there a difference in xml between a single
>space and multiple spaces?

No, there is no difference between a single space or multiple space before
and after a fragment of text; because these could be formatting spaces,
they are by default removed and replaced by the tabs or spaces needed to
properly indent the text.
If you don't want to enable the setting to keep all these spaces (note that
text fragments entirely made of whitespace are still removed), you can
selectively preserve them by adding an xml:space="preserve" attribute to
the node containing the text.
In your example, this would mean write

{para xml:space="preserve"}{emphasis}(Key Question){/emphasis} Columns 1
through 4 of the accompanying table show the marginal utility, measured in
terms of utils, which Ricardo would get by purchasing various amounts of
products A, B, C, and D. Column 5 shows the marginal utility Ricardo gets
from saving. Assume that the prices of A, B, C, and D are $18, $6, $4, and
$24, respectively, and that Ricardo has a money income of $106.{/para}

Alberto

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.