Home
TeamSite
XML Format
dcallaghan
Hi All,
I am currently working on a project for a customer in the states that uses TeamSite. They provide to us .dcr (XML) documents, we process these and pass them back for uploading back into TeamSite. When we pass the documents back they are unable to upload the documents back into TeamSite.
What we do...
We alter the documents using MS XML DOM 4.0, update the content and pass them back. When they are passed back the document is in UTF-8 text format. Because we use the MS XML DOM parser and other processes the document tabbing is removed or altered.
Could this be an issue to TeamSite ? I thought at first that it should not matter, because most XML DOMs (the ones I have used) do not rely on internal document formatting, just the structure of the XML.
Can anyone confirm this?
Regards,
David Callaghan
Find more posts tagged with
Comments
MattP
What do you mean they can't upload them?
They most likely don't have extended attributes, so it may not be recognized as a dcr, but that shouldn't prevent file upload. The layout of the xml shouldn't matter, as it is configurable in IW.cfg for either single line or "pretty" layout.
Matt
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA
Edited by MattP on 08/11/03 12:48 PM (server time).
dcallaghan
Thanks for the speedy reply, Matt.
You'll have to bear with me, because I don't actually use TeamSite, just the documents it produces. As far as I can ascertain, they clicked to perform the upload, and TeamSite threw an error, with the document. I have checked the document XML format, and it appears to comply with the .dcr format. I have also opened the document up in IE, to confirm the MS parser is happy, and all text displays (UTF-8).
I have spoken to a collegue who has sent documents for upload before, and he suggested it may be the internal document formatting (tabs before tags).
Can you confirm what extended attributes will do when reading in the .dcr document ?
Thanks, David
dcallaghan
IW.cfg.
Where is the IW.cfg file, usually located?
MattP
Extended attributes are used by teamstie to indicate what type of template was used to build the file. The admin will need to re-assign the EAs in order for them to be opened as a templated DCR in teamsite (a simple task). That should NOT prevent a "File -> import". I have changed tabs and spacing before, without issue.
So:
What OS
What version of TS
Has the user tried other machines to upload one of these files? The upload applet has given people issues before, that have been due to the local machine doing the uploading.
Hope this helps
Matt
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA
dcallaghan
Thats an interesting point, about the upload. I can not confirm at this stage the machine, but I do know they have tried from a Unix OS.
I'll enquire further, regarding configuration.
Thanks again.
james1
Whitespace shouldn't matter.
Sounds like user error to me.
You might want to have your customer, or whoever owns the license to TeamSite and the support contract, to get in touch with Tech Support. At this point, the problem description is too vague. Tech Support can drill down and get the pertinent details and work the problem.
-- James
--
James H Koh
Interwoven Engineering
dcallaghan
Thanks.
I'll make recommendations and enquire further about the problem / error codes regarding the upload, with our customer.
dcallaghan
The error which was recieved :
Templating Error Page
An exception was thrown: com.interwoven.clientutils100.TReadException: Error reading Data
Content Record test1: Content mismatch between data capture object "header/0/breadcrumbs"
and DCR object "header/0/breadcrumbs".
MattP
So it seems like that error would show up after inporting the file and the user tries to edit it. I have seen that when the datacapture.cfg (your template) doesn't match the data in the template. So if your template is <item name='foo'><text/></item> and your DCR that you imported is <bar><value>123</value></bar> you would probably get an error like that. I believe it is also case sensitive.
Matt
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA
dcallaghan
Cheers again Matt.
We don't have access to the customer document templates or configs. I'll pop this in an email and ask to verify content matches config.
dcallaghan
Just having a look through the XML we pass, we have the following change to the XML:
In
<item name="x"/>
Out
<item name="x"><value/></item>
Do you think this kind of translation could upset the file upload?
Michael
In my experience with TeamSite 5.5.2 Templating and using XML:
OM to manipulate the XML (DCR) we received similar errors when trying to edit the updated DCR. It appears that the TeamSite XML parser is quite sensitive when validating the DCR against its own rules and the DCT.
dcallaghan
Were the errors caused by formatting of the document content?
Michael
It was a little white back but I recall that the errors were in relation to value tags. Similar to your example; if you have no value should there be:
nothing OR
<value/> OR
<value></value>
I think TeamSIte was picky on things like that when you modified its DCRs.
I don't believe however that it was too sensitive on formatting issues such as white space.
I don't know if you had the same issue with Microsoft DOM but the parser I was using found additional elements in the whitespace generated by TeamSite. -- but I don't think that is relevant to your issue here.
dcallaghan
Thanks Michael,
I think its worth a try. I'll re-code the app to close or remove the <value> if empty and try again.
james1
There is a *big* difference between
<item name="x"/>
and
<item name="x"><value/></item>
Any XML document should notice the presence or absence of an element. Templating very definitely draws a distinction between the presence and absence of the <value> element.
-- James
--
James H Koh
Interwoven Engineering
rwinterpacht
What is the setting for the iw.cfg to make it "pretty" layout instead of the bogus one-line dcr? Our developers are always complaining about that when trying to tweak a dcr...
Migrateduser
http://devnet.interwoven.com/forums/cgi-bin/showthreaded.pl?Cat=&Board=PRODUCTS_TEMPLATING&Number=19908&Search=true&Forum=All_Forums&Words=pretty_print&Match=Entire%20Phrase&Searchpage=0&Limit=25&Old=allposts&Main=19908
Again, it should be the default. The lame format just causes all sorts of problems. Once you iwreset -ui you can fix the DCRs by editing them with DCT. I think XMLSpy can fix the lame DCRs - you might suggest your developers try that.
MattP
Data content records are normally written so that all content appears on a single line. You have the
option to print so that each new XML element in a data content record start on a new line, indented.
To enable this type of printing, include the following line in the /etc/iw.cfg file.
[teamsite_templating]
pretty_print_dcrs=true
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA