Remove all whitespace

Author Message

Daniel Guerrier

Monday 25 July 2005 9:04:10 am

I created this template to export some info as xml.
It seems to be adding some return characters to the output and it is messing up the application that is using it.
I would like to keep the template readable for future editing but I can't avoid outputing the return charaters. Is there a way of doing so?

<?xml version="1.0" encoding="UTF-8"?>
<media>
{let items=fetch( 'content', 'list', hash( 'parent_node_id', 110))}
{section var=item loop=$items}
<item>
<name><![CDATA[{attribute_view_gui attribute=$item.object.data_map.name}]]></name>
<description><![CDATA[{attribute_view_gui attribute=$item.object.data_map.shortdescription}]]></description>
<path>
{let site_url=ezini('SiteSettings','SiteURL') file_path=$item.data_map.file.content.filepath}
{concat('http://', $site_url, '/', $file_path)}
{/let}
</path>
</item>
{/section}
{/let}
</media>

David Eriksson

Tuesday 26 July 2005 12:26:59 am

Perhaps <i>trim</i> can help you?

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_operators/strings/trim

/David

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:18:07
Script start
Timing: Jan 18 2025 19:18:07
Module start 'layout'
Timing: Jan 18 2025 19:18:07
Module start 'content'
Timing: Jan 18 2025 19:18:07
Module end 'content'
Timing: Jan 18 2025 19:18:07
Script end

Main resources:

Total runtime0.8425 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 589.0391152.6250
Module start 'layout' 0.00610.0038 741.664139.4453
Module start 'content' 0.01000.8309 781.1094486.4844
Module end 'content' 0.84080.0016 1,267.59388.1719
Script end 0.8425  1,275.7656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3907160.0002
Check MTime0.00140.1644160.0001
Mysql Total
Database connection0.00090.105310.0009
Mysqli_queries0.792894.1047540.0147
Looping result0.00070.0784520.0000
Template Total0.803295.320.4016
Template load0.00250.291420.0012
Template processing0.800795.038020.4003
Template load and register function0.00020.023110.0002
states
state_id_array0.00180.218310.0018
state_identifier_array0.00140.165020.0007
Override
Cache load0.00190.2220100.0002
Sytem overhead
Fetch class attribute can translate value0.00060.073920.0003
Fetch class attribute name0.00240.286820.0012
XML
Image XML parsing0.00040.047420.0002
class_abstraction
Instantiating content class attribute0.00000.001220.0000
General
dbfile0.00060.0684100.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs