Uploaded image for project: 'XalanC'
  1. XalanC
  2. XALANC-654

Xalan generates invalid output

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP SP2

      Description

      Xalan-C++ generates invalid XML
      output. Xalan-J works ok so it seems this is a bug in Xalan-C++.
      The XML file generated with the transformation is not valid:

      Before:

      <map xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/"
      title="MakeDoc's example demo/BE"
      ditaarch:DITAArchVersion="1.1"
      domains="(map mapgroup-d) (topic indexing-d)"
      class="- map/map "
      xtrf="c:\Pike\dita_problem\trialBE\dita\trialProjects.ditamap"
      xtrc="map:1">

      After the transformation:

      <map title="MakeDoc's example demo/BE"
      ditaarch:DITAArchVersion="1.1"
      domains="(map mapgroup-d) (topic indexing-d)"
      class="- map/map "
      xtrf="c:\Pike\dita_problem\trialBE\dita\trialProjects.ditamap"
      xtrc="map:1"

      The xmlns definition is omitted and this is the problem because it is
      used (ditaarch:DITAArchVersion). The error is:

      Fatal Error.Occurred at file trialProjects_MERGED.xml, line 1, column
      250. The prefix 'ditaarch' has not been mapped to any URI
      SAXParseException: The prefix 'ditaarch' has not been mapped to any
      URI (trialProjects_MERGED.xml, line 1, column 250)

      I have uploaded the ZIP file with a small test. After unpacking look at those files:

      run_xalanc.bat: generates trialProjects_MERGED_C.xml that is not
      VALID. The batch requires to have xalan/xalan.exe in the PATH, you can
      edit it and provide full path for the binary.

      run_xalanj.bat: the same but in Java, generates VALID
      trialProjects_MERGED_J.xml. Edit the batch before executing and change the
      PATH for xalan.jar. The generated file seems to be valid, there is no
      namespace bug there.

      I am including trialProjects_pdf.log from Dita-OT toolkit also with the error
      message above. Please contact me if you need further help, thank you.

        Attachments

        1. stress_test_xalan-dita.zip
          352 kB
          Lukas Zapletal

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lzap Lukas Zapletal
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: