All entities have unwanted space before and after them

Bug #78135 reported by Matthew Paul Thomas on 2007-01-06
4
Affects Status Importance Assigned to Milestone
Ubuntu Documentation
Undecided
Matthew East

Bug Description

Because (a) each entity is its own XML file, (b) there is whitespace between the <?xml?> declaration and the first element in all those files, and (c) a variety of text editors insist on ending files with a newline character, any Ubuntu-Help-specific entity is presented with a space both before and after it. Sometimes this doesn't matter, but often it does, when the entity is supposed to be immediately preceded or followed by punctuation (for example, if it is used at the end of a sentence).

description: updated
Sean Wheller (sean-inwords) wrote :

I will take a look at this, altough at face value this seems like an editor setup problem.

Changed in ubuntu-doc:
assignee: nobody → sean-inwords
Sean Wheller (sean-inwords) wrote :

The problem is resulting from eol characters in the entity file. The solution is therefore to remove all such characters from the entity files so that the xml is one string without eol's.

I asked mdke to run this shell script of the files and test.

#! /bin/bash
files=`ls *.xml`
echo $files
for i in tr -d '\n \f' < $files ;done

Changed in ubuntu-doc:
assignee: sean-inwords → mdke
status: Unconfirmed → In Progress
Sean Wheller (sean-inwords) wrote :

Sorry copy paste errors, that script should be

#! /bin/bash
files=`ls *.xml`
echo $files
for i in $files; do tr -d '\n \f' < $files ;done

Jeff Schering (jeffsch) wrote :

The xslt normalize-space() function might help. See a similar problem and its solution here: http://cocoon.apache.org/2.0/faq/faq-xslt.html

The changes can be implemented in the customization layer in trunk/ubuntu/libs/, but I don't know how to do it for yelp.

Matthew East (mdke) wrote :

It looks like the best solution for this will be to include the xml directly in the gnome-menus-C.ent file... that way we can avoid having to customise the build each time. Thanks to mpt for identifying this solution. I've posted to devel-discuss for some scripting help in moving the material across.

Matthew East (mdke) wrote :

It took about 5 minutes to get a script to move this material. Wow!

Changed in ubuntu-doc:
status: In Progress → Fix Committed
Matthew East (mdke) wrote :

Released

Changed in ubuntu-doc:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers