Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOM2SAX.parse(InputSource) should call DOM2SAX.parse() #83

Closed
wants to merge 19 commits into from
Closed

DOM2SAX.parse(InputSource) should call DOM2SAX.parse() #83

wants to merge 19 commits into from

Conversation

dubinsky
Copy link

For DOM that is not a Document, DOM2SAX.parse(), in addition to calling parse(Node), calls the ContentHandler's startDocument and endDocument, since parse() won't call them in this case; parse(InputSource unused) just calls parse(Node), so the ContentHandler does not gereceive the startDocument and endDocument events, which are mandated by the SAX specification.

This can cause problems; see, for example, scala/scala-xml#694

The simplest way to fix this is to change parse(InputSource unused) to call parse() instead of parse(Node) - and this is what this pull request does.

Steven J. Hathaway and others added 19 commits September 10, 2012 19:45
are required to compile Xalan sources. committing these files on
'master' as well
…er. this makes it little bit easier to view xalanj xslt transformation result. doing this xalanj codebase change on 'master' branch. the previous commit, did this codebase change on xalanj branch xalan-j_xslt3.0.
Comments in file.
Revert default indent-amount
…change that was done earlier : movement of the 2.7.3_release test cases to jira directory. also making a minor improvement to error handling within xalanj implementation codebase, when variables were not been resolved within an xslt 1.0 stylesheet.
committing minor changes to xalanj README file, as per the following change that was done earlier : movement of the 2.7.3_release test cases to jira directory. also making a minor improvement to error handling within xalanj implementation codebase, when variables were not been resolved within an xslt 1.0 stylesheet.
…alling `parse(Node)`, calls the `ContentHandler`'s `startDocument` and `endDocument`, since `parse()` won't call them in this case; `parse(InputSource unused)` just calls `parse(Node)`, so the `ContentHandler` does not gereceive the `startDocument` and `endDocument` events, which are mandated by the SAX specification.

This can cause problems; see, for example, scala/scala-xml#694

The simplest way to fix this is to change `parse(InputSource unused)` to call `parse()` instead of `parse(Node)` - and this is what this pull request does.
@jkesselm
Copy link
Contributor

Sorry for the delay in processing this. With all the changes made since then, the simplest and safest way to apply this seemed to be to cherry-pick the one file you altered rather than updating/reconciling/merging. I've done so. As I understand it, Git should have retained your credit on the change.

Good catch, simple solution. Thanks!

@jkesselm jkesselm closed this Nov 27, 2023
jkesselm pushed a commit that referenced this pull request Nov 27, 2023
@dubinsky
Copy link
Author

Thank you @jkesselm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants