Skip to content

Releases: haloway13/XmlTransformer

XmlTransformer 1.3.0: Java 17/21 LTS & Saxon 12.10 Upgrade

Choose a tag to compare

@haloway13 haloway13 released this 26 Sep 20:31

[1.3.0] - 2026-09-26

  • Fix: get_message() hardcoded lang = "en" unconditionally, so locale/es.sublime-messages was never actually loaded on any platform despite the 1.2.0 "Localization" entry below — Spanish support was dead code. Sublime Text has no API to query the UI language (confirmed: sublime.locale() does not exist, even on ST4 build 4200), so added an explicit "language" setting ("auto" by default, falls back to the OS locale via Python's locale module; an explicit code like "es" overrides it). An unsupported/missing language code falls back to English cleanly.
  • Fix: enter_param_file and enter_param_value message keys were referenced by XmlTransformer_build.py (manual parameter entry flow) but never existed in either locale/en.sublime-messages or locale/es.sublime-messages, causing an uncaught KeyError crash when a user chose "Enter parameters manually" (TC-05). Added both keys to both locale files.
  • Fix: on_param_value_entered() was called as the manual-entry input panel's callback but was never defined anywhere in XmlTransformerBuildCommand, so entering the first parameter's value crashed with AttributeError instead of advancing to the next prompt. Manual parameter entry (TC-05) never worked on any platform. Implemented the missing handler.
  • Fix: pretty_print_xml() set every leaf <param> element's tail to its own indentation level but never dedented the last child's tail back to the parent's level, so saved parameter files (e.g. custom_params.xml) had the closing </params> tag misindented under the last <param> instead of aligned with the opening tag.
  • Fix: Escaping out of the manual-parameter-value or save-filename input panels gave no feedback at all (the on_cancel callback was None), unlike every quick-panel cancellation elsewhere in the plugin. Added a status bar message on cancel for both input panels.
  • Improvement: The active XML file was only validated deep inside run_transformation(), after the user had already picked an XSL stylesheet and a parameter option. Pressing Ctrl+B on a malformed XML file would walk you through both of those prompts before finally showing the "invalid XML" error. Now validated immediately on Ctrl+B.
  • Fix: The "Java missing" and "JARs missing" dialogs shown by run() called get_message() with no arguments, so the platform-specific install command / setup script path computed in plugin_loaded() was silently dropped — TC-03 requires the JARs dialog to show the setup script path, which it never did. Extracted get_java_install_hint() / get_setup_script_name() helpers, wired real arguments into both dialogs, and updated the locale strings to actually use them.
  • Fix (macOS): get_java_bin() only checked hardcoded Homebrew paths, so JDKs installed as .pkg/casks under /Library/Java/JavaVirtualMachines (Temurin, Zulu, Oracle) were ignored whenever an older Homebrew openjdk@11 existed — the plugin kept running Java 11 with Java 17 installed. Now asks /usr/libexec/java_home for the newest JDK first and uses it when it is Java 17+ (version read from the JDK's release file, since java_home -v 17+ silently returns the default JDK when nothing matches), falling back to the Homebrew paths. The macOS "Java missing" hint now suggests brew install --cask temurin@17.
  • Fix (macOS): setup_XmlTransformer_macos.sh installed Java via the openjdk@17 formula, which has no prebuilt bottle on older macOS/Intel and fails to build from source without full Xcode (metal); under set -e the script then exited before downloading the JARs. It now installs the prebuilt temurin@17 cask first, falls back to the formula, and continues to the JAR step if Java installation fails. It also accepted any java on PATH (e.g. Java 11) as satisfying the Java 17+ requirement; it now checks the major version. The script is now committed as executable (was mode 644).
  • Fix: run_transformation() re-checks the JAR directory before invoking Saxon but called get_message("jars_missing") without its path/setup-script arguments, raising IndexError (no dialog shown) if JARs were removed while Sublime Text was running.
  • Fix: After launching Java, XmlTransformer_exec checked for the output file after 500ms. When output from a previous run existed, it was opened while Saxon was still running and error handling was skipped — a failed transformation looked like a success showing stale output, and the xml_transformer_errors panel never appeared. Also failed to recognize completion on non-zero exits (Sublime appends [cmd:]/[dir:]/[path:] after [Finished ...]) and did not match Saxon 12's error position format. Now waits for the build to finish, decides on the exit code, opens output only on success, and on failure shows the error panel and jumps to the error position in the XSL.
  • Fix (Windows): On Windows, Sublime Text's build system sometimes reports [Finished in ...ms] without an explicit exit code on process termination. Updated error detection to inspect output content for Saxon compiler errors and exceptions. Fixed an AttributeError on self.xsl_path in XmlTransformer_exec.py, ensured existing output files on disk are never prematurely deleted prior to build completion, and wrapped debug logging behind the debug setting.
  • Fix (Windows): In setup_XmlTransformer_windows.bat, replaced %ERRORLEVEL% with delayed expansion !ERRORLEVEL! inside parenthesized blocks so curl failure detection correctly validates downloads.

XmlTransformer v1.0.3

Choose a tag to compare

@haloway13 haloway13 released this 17 Oct 19:55
c371d2c

XmlTransformer v1.0.3

  • Fixed platform.system() to sublime.platform() for platform detection.
  • Centralized settings load with debug getter in XmlTransformer_build.py

XmlTransformer v1.0.1

Choose a tag to compare

@haloway13 haloway13 released this 16 Oct 16:16
8f7b785

XmlTransformer v1.0.1

  • Simplified Package Control entry (x.json).
  • Removed Context.sublime-menu.
  • Added debug setting to gate prints.
  • Added "Run without parameters" option.
  • Added messages/install.txt for setup instructions.
  • Added Main.sublime-menu for settings access.
  • Removed dependencies.json, updated README.md with setup steps.

XmlTransformer v1.0.2

Choose a tag to compare

@haloway13 haloway13 released this 17 Oct 14:31
6381e38

XmlTransformer v1.0.2

  • Added messages.json to enable post-install setup instructions.

XMLTransformer localization

Choose a tag to compare

@haloway13 haloway13 released this 22 Oct 03:00

XmlTransformer v1.1.1

  • Added localization support for English and Spanish (locale/en.sublime-messages, locale/es.sublime-messages).
  • Updated XmlTransformer_build.py to use localized strings.
  • Updated messages/install.txt and Default.sublime-commands for localization.
  • Added Spanish README.es.md for improved accessibility.