Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.4
    • Fix Version/s: 1.5.6
    • Component/s: OXM
    • Labels:
      None

      Description

      JiBX does not support SAX natively, so there is written to a buffer first:

      ByteArrayOutputStream os = new ByteArrayOutputStream();
      marshalOutputStream(graph, os);
      ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());

      the character < results in &<; and not in < as expected.

      http://forum.springframework.org/showthread.php?t=55407&highlight=SAXResult

        Issue Links

          Activity

          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Sadly, this seems to be a JiBX bug, and there is very little I can do about it.

          Show
          arjen.poutsma Arjen Poutsma added a comment - Sadly, this seems to be a JiBX bug, and there is very little I can do about it.
          Hide
          mariaaschauer Aschauer Maria added a comment -

          I don't think it's a jibx bug because the following code line

          marshalOutputStream(graph, os);

          writes the correct result to 'os'. later on after the transformation the behavior mentioned above occurs.

          Transformer transformer = transformerFactory.newTransformer();
          SAXResult saxResult = new SAXResult(contentHandler);
          saxResult.setLexicalHandler(lexicalHandler);
          transformer.transform(new StreamSource(is), saxResult);

          maybe it's a transformation problem?

          Show
          mariaaschauer Aschauer Maria added a comment - I don't think it's a jibx bug because the following code line marshalOutputStream(graph, os); writes the correct result to 'os'. later on after the transformation the behavior mentioned above occurs. Transformer transformer = transformerFactory.newTransformer(); SAXResult saxResult = new SAXResult(contentHandler); saxResult.setLexicalHandler(lexicalHandler); transformer.transform(new StreamSource(is), saxResult); maybe it's a transformation problem?
          Hide
          tareq Tareq Abedrabbo added a comment -

          The problem lies in how AxiomHandler processes predefined entity reference. The patch adds a test for those references in the startEntity method.

          Show
          tareq Tareq Abedrabbo added a comment - The problem lies in how AxiomHandler processes predefined entity reference. The patch adds a test for those references in the startEntity method.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Fixed. Thanks for the patch, Tareq!

          Show
          arjen.poutsma Arjen Poutsma added a comment - Fixed. Thanks for the patch, Tareq!
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Closing old issues

          Show
          arjen.poutsma Arjen Poutsma added a comment - Closing old issues

            People

            • Assignee:
              tareq Tareq Abedrabbo
              Reporter:
              mariaaschauer Aschauer Maria
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: