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)
converting raw XML to DCR
Satan
What tool can I use 1) to view extended attributes of a particular DCR and 2) apply those attributes to a bunch of XML files so that they are recognized as DCRs?
thanks
Find more posts tagged with
Comments
jbonifaci
The iwextattr CLT should give you everything you need. Here's a quick example:
use strict;
use TeamSite::Config;
my $iwhome = TeamSite::Config::iwgethome();
my $iwextattr = "$iwhome/bin/iwextattr";
my $dcrPath = "Y:\\default\\main\\etc\\etc";
my
@newDcrs
= (
"Y:\\default\\main\\etc\\etc1",
"Y:\\default\\main\\etc\\etc2",
"Y:\\default\\main\\etc\\etc3"
);
foreach my $ea (split(/\n/,`$iwextattr -l "$dcrPath"`))
{
foreach my $newDcrPath (
@newDcrs)
{
`$iwextattr -s $ea "$newDcrPath"`;
}
}
nipper
check the clt manual
iwextattr
from the GUI file properties
We imported XML to DCRs but a lot of required fields were not filled in and there were special characters mostly & that should have been converted to the valid XML & (I think) before we did it.
Still for 15K DCRs, it was the only way.
Andy
jbonifaci
And btw, the EA that TS uses to recognize a file as a DCR is TeamSite/Templating/DCR/Type.
Satan
Thanks. I'm new to CLTs -- could you give me the syntax to use from the command prompt for this? For example, if the path of the file whose EA I want to use is:
\\Teamsite1\default\main\basic_training\WORKAREA\dev\templatedata\administrator_demo\article\data\rosetest
and the path of the file I want to receive that EA is:
\\Teamsite1\default\main\basic_training\WORKAREA\dev\templatedata\administrator_demo\article\data\rosetest-new
how do I use the CLT from the command prompt, where the path to the CLT is
\\Teamsite1\iw-home\bin\iwextattr.exe
thanks
nipper
will be something like:
c:\iwhome\bin\iwextattr.exe -s TeamSite/Templating/DCR/Type=administrator_demo\article y:\default\main\basic_training\WORKAREA\dev\templatedata\administrator_demo\article\data\rosetest-new
I don't normally speak DOS so syntax may be off.
Satan
btw, I could swear I saw a reference somewhere to a way to add a "change extended attribute" command to the GUI File menu -- enabling multiple file selections to get the same EA. Sound familiar to anyone?
jbonifaci
This would be simple to write, but the cgi that the menu item would call would be using the CLT mentioned above.
Adam Stoller
c:\iwhome\bin\iwextattr.exe -s TeamSite/Templating/DCR/Type=administrator_demo\article y:\default\main\basic_training\WORKAREA\dev\templatedata\administrator_demo\article\data\rosetest-new
I believe that iwextattr expects a
vpath
not
a
file system path
- so remove the
y:
from the beginning of the path
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
JonathonG
And "flip" the slashes... i.e. turn \ into /
Jonathon
Independent Interwoven Contractor