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)
issue with iwextattr on xml
JoeS
I'm working on a perl script that will read the extended attributes of an xml file and then write them out to a pdf file. I'm running into trouble with the iwextattr command and no value is getting returned when I search for an attribute.
$command = "/iw-home/Interwoven/TeamSite/bin/iwextattr -g TeamSite/Metadata/ComplianceCodeReason $filepath ";
Also the -l command isn't working either. Thanks for any advice.
Find more posts tagged with
Comments
nipper
how do you mean ? The EA data you are querying is a space according to the XML you posted,
JoeS
Here's the xml without any spaces. Still getting error "sh key: cannot open".
[HTML]
TeamSite/Metadata/ComplianceCodeReasonInstructional
TeamSite/Metadata/Content_Sensitivity1
TeamSite/Metadata/Languagesjapanese
[/HTML]
nipper
Is that only from the script or is that the case from the command line? How are you running the script?
JoeS
I'm running it from the command line:
[HTML]
-bash-3.00$ iwperl read_file_submit.ipl
/default/main/mfs/WORKAREA/mfsemc/files/static/hp/placeholder6.pdf
/default/main/mfs/WORKAREA/mfsemc/files/static/hp/placeholder7.pdf
/default/main/mfs/WORKAREA/mfsemc/files/static/hp/placeholder.pdf
/default/main/mfs/WORKAREA/mfsemc/files/static/hp/placeholder.xml
sh: key: cannot open
[/HTML]
Topic_37229__HTML5 Bar Chart with Simple Moving Average Trendline__cwong.rptdesign
nipper
In your script print out the exact command and run it from the command line.
JoeS
Same result as running the script:
[HTML]
-bash-3.00$ /iw-home/Interwoven/TeamSite/bin/iwextattr -g TeamSite/Metadata/ComplianceCodeReason /iwmnt/default/main/mfs/WORKAREA/mfsemc/files/static/hp/placeholder.xml
EA TeamSite/Metadata/ComplianceCodeReason not found
[/HTML]
nipper
Try without /iwmnt.
Also run iwextattr -l on the same file
Adam Stoller
Also try running /bin/ls -l on the file in question. The "Cannot open" error sounds like it could be either a mis-typed path (file doesn't exist) or a permissions issue.
JoeS
OK - found the problem. It's not returning a value because there are no extended attributes set on the placeholder.xml. It's just a text file. Metadata needs to be stored in the content store and can only be set either via Tagging or by using iwextattr -s. So now I need to parse the contents of the XML file and use that to set EAs. Thanks.