Axis2
  1. Axis2
  2. AXIS2-135

Comments handling in saaj.TextImpl

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: om
    • Labels:
      None

      Description

      org.apache.axis2.saaj.TextImpl - Line 83. What if the text contains something like "<!--some comment --> some other text". Will this be considered as a comment or simple text ?

        Activity

        Hide
        Ashutosh Shahi added a comment -

        Well, obviously currently it is not. But what is the expected behaviour? I think it should not be taken as comment.
        I'll anyway add a test acse for the same depending on what the expected behaviour is.
        Ashutosh

        Show
        Ashutosh Shahi added a comment - Well, obviously currently it is not. But what is the expected behaviour? I think it should not be taken as comment. I'll anyway add a test acse for the same depending on what the expected behaviour is. Ashutosh
        Hide
        Eran Chinthaka added a comment -

        I think if we have something like

        <foo>this is some text <!-- This is a comment --> this is some other text</foo>

        this should be considered as element foo having three chidlren, OMText, OMComment and OMText respectively.

        Show
        Eran Chinthaka added a comment - I think if we have something like <foo>this is some text <!-- This is a comment --> this is some other text</foo> this should be considered as element foo having three chidlren, OMText, OMComment and OMText respectively.
        Hide
        Ashutosh Shahi added a comment -

        OK, its already working that way. I'll add a test case to show that.
        Ashutosh

        Show
        Ashutosh Shahi added a comment - OK, its already working that way. I'll add a test case to show that. Ashutosh
        Hide
        Venkat Reddy added a comment -

        Isn't this decomposition to be handled by the XML parser? Or may be by Model builder? I think SAAJ Text object should not have to parse its content again looking for such compelx possiblities. If its content begins and ends with comment delimiters, its a comment node.

        • venkat
        Show
        Venkat Reddy added a comment - Isn't this decomposition to be handled by the XML parser? Or may be by Model builder? I think SAAJ Text object should not have to parse its content again looking for such compelx possiblities. If its content begins and ends with comment delimiters, its a comment node. venkat
        Hide
        Eran Chinthaka added a comment -

        Sorry, I misunderstood the thing. By the time it gets to SAAJ, OM text only contains a comment within it .

        Show
        Eran Chinthaka added a comment - Sorry, I misunderstood the thing. By the time it gets to SAAJ, OM text only contains a comment within it .

          People

          • Assignee:
            Ashutosh Shahi
            Reporter:
            Eran Chinthaka
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development