CDSS - CorelDRAW-Style-Sheet - Wow, what the... oh

I just discovered there is the new CDSS file format to export styles, at first glance I thougt ... hey, yesss we've got CSS! A dream comes true!

But then I opened the CDSS file and ... ouch, it's binary. It's binary! Crying

Dear Corel Insiders!
Is there any way to get something CSS-like (I mean readable text) out and into
CorelDRAW? Any way to decompile/recompile the binary format?
This would be so awesome!

[edited by: Juergen Krausz at 4:32 (GMT -5) on Mon, Jun 11 2012]
  • Wait! Wait a moment.

    The file header starts with PK. That's suspicious.
    I've tried something and *hehe* yes!
    CDSS and CDR as well - it's something we all know.

    After a Google search I found out that Brendon Prazner already stumbled upod this fact  here - the fact that the new CorelDRAW file format actually is a ZIP.
    So I dont have to worry about telling a secret when I say:

    CDR and CDSS as well are ZIP-packed archives, containing an internal structure with several files.
    And within this structure there is a directory called styles.
    And within this styles directory there is a file called "document.cdss".

    And THIS cdss file is *drum roll* Text, CSS-like text!

    This is great news!  I now can compose/script CorelDRAW Style Sheets!

    Actually the cdss file syntax seems to be JSON rather than CSS but it's perfectly readable if one knows JSON.
    That means it can be converted easily to XML vice versa. Wow!
      <edit:> Meh! <~artisticmedia~> this is not going to be valid XML. Anyway, this won't stop me ;-) </edit> 

    Thank you Corel! This is awesome!


    I think I the following has to be said at this point:

    Everyone including myself should be aware of the fact that fiddling with the internal components of such a CDR/CDSS/ZIP may break the file - if not crash the whole application when it's loaded. Do that on your own risk! So will I.

    [edited by: Juergen Krausz at 6:18 (GMT -5) on Mon, Jun 11 2012]