Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
DCR value to be compatible with XMLoutput
System
I try to use TeamSite Templating to edit/update a XML file, not a HTML file. This idea is to let the presentation-level will be maintained in the XSLT file.
The WEB application will take this XML (generated/deployed by TeamSite Templating/OpenDeploy) and XSLT to be the output to the end-user.
So, I have created a presentation template tpl file with XML-format, so, I used many CDATA tags for displaying XML tag name,
and using iw_iterate, iw_value tags to get the data from DCR.
But I found that although the real text data in the DCR file is using '&' and '<' to represent '&' and '<',
as long as I use iw_value to get value from DCR, The values always be '&' and '<', these two character will be invalid in the output XML.
After I choose 'generate' function in DCR Editing window, the output XML will contain these invalid characters: '&' and '<'.
Does anyone have idea how to real-time transform these two characters: '&' and '<' to '&' and '<' in presentation template file?
Thanks a lot.
--
I am a newer in using Interwoven Products
Find more posts tagged with
Comments
Pommes
Hi,
what is about using regular expression in the PT to convert the charactersthe way you want them?
Migrateduser
Excuse me, if I use regular expression, need I use iw_perl or other tag?
Here is the current sample of my tpl file:
<?xml version="1.0" encoding="big5"?>
<iw_pt name="test"><![CDATA[<?xml version="1.0" encoding="big5"?>
<catagory1>
]]>
<iw_iterate list='dcr.cat1' var='cat1'>
<![CDATA[<hyperlink name="]]>
<iw_value name='cat1.name'/>
<![CDATA[" image="]]>
<iw_value name='cat1.image'/>
<![CDATA[">]]>
<iw_value name='cat1.link'/>
<![CDATA[</hyperlink>]]>
</iw_iterate>
<![CDATA[
</catagory1>
]]>
</iw_pt>
Pommes
Yes, you need the <iw-perl> Tag. If you are somehow familiar with perl I would suggest to open a <iw_perl> at the beginning and close it at the end again. The rest in between can be written in perl. The <iw> Tags are also Perl Modules, so why not use the correct language right from the beginning ;-)