Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
DCR syntax is different in 6.5?
jwl
Hi,
We have upgraded from TS5.5.2 to TS6.5 SP1 on Solaris.
For one of our datatypes, in 5.5.2 the DCR was saved such that blank fields are simply <value></value>, eg
...ntment Actions</value></item><item name="releaseNo"><value></value></item><item name="details"><value>The Code of Co...
After upgrading to 6.5 (SP1), the blank field is now saved as <value/>, eg
...ntment Actions</value></item><item name="releaseNo"><value/></item><item name="details"><value>The Code of Co...
This causes one of our scripts to fail. The script (written by a former consultant well versed in regex) performs this substitution:
$dcrContent =~ s{ (name=\"releaseNo\">\<value>)( (?: (?!<\/value>). )* ) (<\/value>) }{$1$releaseNumber$3}sx;
ie something like <item name="releaseNo"><value></value></item>
would be replaced with something like <item name="releaseNo"><value>2005-010</value></item>
Unfortunately this script doesn't pick up <value/> in the new DCR format in 6.5
Would really appreciate help in modifying the regex string to change
<item name="releaseNo"><value/></item>
to something like <item name="releaseNo"><value>2005-010</value></item>
Thanks in advance!
John
Find more posts tagged with
Comments
jwl
Don't worry about it. The complexity of the original code threw me off. I resolved it with a simple
$dcrContent =~ s{name=\"releaseNo\">\<value\/>}{name=\"releaseNo\">\<value>$releaseNumber<\/value>}sx;
John