JBehave
  1. JBehave
  2. JBEHAVE-544

Ignore !-- comments in story meta

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Jenkins barfs when finding !-- during the XSLT transform (xUnit plugin).

      Can we cater for comments amongst meta-tags?
      Either parse and handle them, or fail to parse explicitly

        Activity

        Hide
        Mauro Talevi added a comment -

        How would you see comments working in meta-tags? One would argue that meta properties should be quite self-commenting.

        Show
        Mauro Talevi added a comment - How would you see comments working in meta-tags? One would argue that meta properties should be quite self-commenting.
        Hide
        Paul Hammant added a comment -

        It is up to you whether comments (or commented out meta tags) are ignored while parsing meta-tags. Alternatively it is up to you whether parsing fails with a suitable message at that stage.

        I don't think it should work the way it does presently. Namely consume the comments "!--" as if they were data, populate the model with them, execute the story to some level of completion, then write corrupt XML in the penultimate stage.

        Show
        Paul Hammant added a comment - It is up to you whether comments (or commented out meta tags) are ignored while parsing meta-tags. Alternatively it is up to you whether parsing fails with a suitable message at that stage. I don't think it should work the way it does presently. Namely consume the comments "!--" as if they were data, populate the model with them, execute the story to some level of completion, then write corrupt XML in the penultimate stage.
        Hide
        Mauro Talevi added a comment - - edited

        The syntax of meta do not recognise !-- at the moment, only the separator @. Hence, !-- is as valid as any other char set.

        Meta is not parsed like the rest of the story, it is parsed in isolation. We can support comments but we need to know how to define the syntax.

        Show
        Mauro Talevi added a comment - - edited The syntax of meta do not recognise !-- at the moment, only the separator @. Hence, !-- is as valid as any other char set. Meta is not parsed like the rest of the story, it is parsed in isolation. We can support comments but we need to know how to define the syntax.
        Hide
        Paul Hammant added a comment -

        Should we encode it before it gets spat out to XML then ?

        If we do not, it will break.

        Show
        Paul Hammant added a comment - Should we encode it before it gets spat out to XML then ? If we do not, it will break.
        Hide
        Mauro Talevi added a comment -

        Can you provide an example of an invalid XML and how you would encode it?

        Show
        Mauro Talevi added a comment - Can you provide an example of an invalid XML and how you would encode it?
        Mauro Talevi made changes -
        Field Original Value New Value
        Summary JBehave !-- Comments amongst meta tags causes corrupt XML output Ignore !-- comments in story meta
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Fix Version/s 3.5 [ 17393 ]
        Priority Major [ 3 ] Minor [ 4 ]
        Description Jenkins subsequently barfs because of an XSLT transform (xUnit plugin).

        Can we cater for comments amongst meta-tags?
        Either parse and handle them, or fail to parse explicitly :)

        Jenkins barfs when finding !-- during the XSLT transform (xUnit plugin).

        Can we cater for comments amongst meta-tags?
        Either parse and handle them, or fail to parse explicitly :)

        Hide
        Mauro Talevi added a comment -

        Anything after ignorable keyword (!-- by default) is ignored in meta properties.

        Show
        Mauro Talevi added a comment - Anything after ignorable keyword (!-- by default) is ignored in meta properties.
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Paul Hammant
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: