Skip to content

comments stops parsing text string in default case #13

@jmgnc

Description

@jmgnc

If you use the following input:

<root>\"
<!-- &#x8; -->
<!-- &#xc; -->
&#xd;
&#x9;
</root>

and run the following:

java -cp lib/saxon/saxon9.jar net.sf.saxon.Transform t.xml conf/xml-to-json.xsl

You'll get:

{
    "root": [
        "\\\"\n",
        {
            "": null
        },
        {
            "": null
        }
    ]
}

where as if you move the comments to after the character entities, you'll get:

    "root": [
        "\\\"\n\r\n\t\n",
        {
            "": null
        },
        {
            "": null
        }
    ]
}

With the CR and HT both properly in the output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions