0

I would like to read and manipulate Adobe inDesign IDML Files and really would like to generate objects in PHP with the help of the xsd files.

The source XML Files link to the xsd files located here:

 http://ns.adobe.com/AdobeInDesign/idml/1.0

Unfortunately this url is broken and I could not find a new URL. Does anybody know where to finde the .xsd files for IDML InDesign?

Here is an example of the Preferences.xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<idPkg:Preferences xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="14.0">
    <ButtonPreference Name="" />

I would use this lib to generate PHP classes from https://github.com/goetas-webservices/xsd2php

Sebastian Viereck
  • 5,455
  • 53
  • 53
  • The namespace in XML has no meaning, it is just an identifier. Some companies do put a URL link to an xsd file in namespace definition, but that would have .xsd extension. This is not a standard, not a requirement and happens quite rare. – Nicolai Kant Mar 22 '21 at 21:01

2 Answers2

0

A dirty workaround could be to generate the xsd from xml file, explained here: Any tools to generate an XSD schema from an XML instance document?

I tried out trang, which worked for me: https://relaxng.org/jclark/trang.html

Sebastian Viereck
  • 5,455
  • 53
  • 53
0

I ended up using using PHPs SimpleXml and having no real objet mapping, example:

    $desinMap= simplexml_load_string(file_get_contents("designmap.xml"));
    foreach ($designMap->Spread as $spread) {
        $result[] = $spread->attributes()->src;
    }
Sebastian Viereck
  • 5,455
  • 53
  • 53