Question
Norman W. Freeman · Sep 23, 2020

Where can I download the XSD (XML schema definition) of files exported by Cache Studio ?

When you export entities like classes, routines, globals in Cache Studio, you usually end up with XML files that looks like this : 

<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
    <Class name="base.monitoredpage">
        <Abstract>1</Abstract>
        <Super>%CSP.Page</Super>
        <TimeCreated>63439,41357.461462</TimeCreated>
        <Parameter name="ENCODED">
            <Default>0</Default>
        </Parameter>
        ...

I was wondering if the XSD (schema definition) of those files are available somewhere (eg : in Cache InterSystems website). I searched but could not find anything.

I am asking this because I have a project which is under versioning control (eg: git). Everything is exported/imported using SyncTool which use XML files. The default diff tools (eg : kdiff3) have trouble to merge them properly as they treat them like regular text files. It seems there is diff/merge tools available on the market that are able to deal with XML files, but your need the XSD file that goes along with it to make it work properly.

00
2 0 8 164
Log in or sign up to continue

Replies

There is no xsd. And much better would be to convert sources from xml to udl, and it’s possible to do it even with the history of changes. Our company can help with it, please contact us, info@caretdev.com

I agree udl is much better for versioning than xml. I didn't know it was possible, seems the way to go. 
For globals, is there something better than xml ? 

On the other side, for globals, I don't know any better solution than XML, at the moment.

It’s a binary format, and does not suit for diff

We ship the XSD file as part of the IRIS installation. You can find it under <install dir>/bin/irisexport.xsd. It varies from version to version as new keywords are added, but we use this to validate any XML before importing an XML export.

I found the following XSD file which seems to be what I want :

C:\InterSystems\Cache\bin\cacheexport.xsd

It's much more complex than what I thought. Maybe exporting all cache files as UDL (as Dmitriy suggested) is a better approach. I don't know if SyncTool is able to export cache entities in that format directly. If not, I will need a second pass (that convert xml to udl).