In transformation - Indentation is lost when StAXResult is used to output

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: P3
    • 1.4-pool
    • Affects Version/s: 1.4.0
    • Component/s: xml
    • generic
    • generic

      In case of transformation - when we use StAXResult in the output
      indentation is lost , newline characters are not taken care of ..
      but this works if we use StreamResult instead

      In case of StreamResult , behaviour depends on what we set through
      transformer.setOutputProperty() - whether 'yes' or 'no' !

      but with StAXResult there is no change in behaviour according to
      what we set using transformer.setOutputProperty()


      ------------------- cities101.out with StAXResult -------------------------------------
      <?xml version="1.0" encoding="UTF-8"?><countries><country name="France"><city>Paris</city><city>Nice</city><city>Lyon</city></country><country name="Italia"><city>Roma</city><city>Milano</city><city>Firenze</city><city>Napoli</city></country><country name="Espana"><city>Madrid</city><city>Barcelona</city></country></countries>
      --------------------------- cities108.out with StreamResult ---------------------------
      <?xml version="1.0" encoding="UTF-8"?>
      <countries>
      <country name="France">
      <city>Paris</city>
      <city>Nice</city>
      <city>Lyon</city>
      </country>
      <country name="Italia">
      <city>Roma</city>
      <city>Milano</city>
      <city>Firenze</city>
      <city>Napoli</city>
      </country>
      <country name="Espana">
      <city>Madrid</city>
      <city>Barcelona</city>
      </country>
      </countries>
      ------------------------------------------------------------------------------------------

      Attached testcase - Test3.java will show this behaviour

            Assignee:
            Santiago Pericasgeertsen
            Reporter:
            Sreejith Ak (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: