[TYPO3-dev] Eclipse Autoformatting XML

Johnny Peck johnny at slipcasemedia.com
Sat Jul 21 10:55:47 CEST 2007


Aloha,

Latest non-SVN versions of all parts of TYPO3, PHP5, Apache 2, WinXP, 
etc, and a nice glass of iced coffee.

I just used the formatter in Eclipse whilst working on the flexform.xml 
document for an extension.  In Eclipse with latest PDT version working 
on the file, right click -> Format -> Document (Ctrl+Shift+F). To my 
surprise, I reload the BE of TYPO3 and all of the language labels for 
the extension are showing the the path to the data as written in the 
flexform.xml instead of the labels I specified.

I searched Eclipse help, obligatory google marathon, reread portions of 
the requisite TYPO3 dev documents, and eventually found myself inside of 
Templavoilas'codebase playing around.  In TV i was looking for some 
strip spaces situation of sorts or similar formatter, there is a lot of 
code in that thing.  Anyhow, for example, if I have this in my xml 
(example 1):

<label>LLL:EXT:ics/locallang_db.xml:flexform.controllerSelection</label>

...the labels I defined are shown.  If I have this in my xml (example 2):

<label>
	LLL:EXT:ics/locallang_db.xml:flexform.controllerSelection
</label>

...the path itself is shown in the form.

I don't have in-depth knowledge of XML so please, any pointers would be 
wonderful.  I check preferences in Eclipse to format the docs' this way 
but I just don't know and would like not to spend a day on it at the 
moment.

I have two questions regarding the situation.

Can anyone point me into a direction regarding the formatting of the 
document in Eclipse and controlling it to do this 'working' way?

Should TV be accepting the code in example 2 and if not, why?

Thank you for your time.

Johnny




More information about the TYPO3-dev mailing list