            } catch (e) {
                        document.getElementById("parsed-structure").innerHTML =
                          `<div class="text-red-500">Error parsing XML: ${e.message}</div>`;
                      }
                    });
                  </script>
                {% endif %}
              </div>
            </div>

            <!-- Correction Debugging -->
            <div class="p-3 bg-orange-50 rounded border">
              <h4 class="font-semibold mb-2">Correction Debug:</h4>
