Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to keep processing instructions of xml file in SDL Tridion?

I am trying to add a processing instructions to my xml file in the source view of component xml. For example:

<?altova_sps C:\Users\src\sps\2012\spsfile.sps?>
<my_element xmlns="uuid:8d903098-e607-4d96-90a7-14d2d188dab7">
  ...
</my_element>

After I click on Save, Tridion CME automatically removed the processing instruction. Is there a way to change this behavior?

(I want to add the processing instruction so that I can open the xml file with XMLSpy in Authentic View using WebDAV)

like image 642
charles Avatar asked Oct 01 '12 16:10

charles


1 Answers

I have researched this a bit, and I am not convinced this can be done from within the CMS. However you can probably achieve this by creating an HTTPModule or Proxy or some form which transforms the requests and responses made to the /webdav directory of the CME.

Conceptually when a request is made by XMLSpy, the new module would pre-pend the desired instruction to the XML based on the item being a Component and the Schema it is based on. Then when you save (POST) the data back it would need to strip it out again. This would leave the XML structure in the format that SDL Tridion requires.

Hope that helps

Chris

like image 160
Chris Summers Avatar answered Sep 29 '22 15:09

Chris Summers