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

Update SIXX to use latest stable XMLParser #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

marianopeck
Copy link
Contributor

I have kindly asked Martin if he could implement that.

Below is his original answer to me:

=========
This should work (same test results as before), though the character and string formats have changed a little, so you might not be able to read existing serialized objects. The old format Dale chose for encoding non-byte chars violated the XML spec. And I removed the #encodeAsUTF8 stuff. This needs to be done at the entity level (ie, document-wide), not at the element level.

SIXX should now handle decoding automatically when reading, but don't use encodings other than UTF-8, since SIXX generates xml declarations with 'encoding="utf-8"' attributes.

To encode SIXX output, you need to wrap the write stream you're using with an XMLEncodingWriteStreamAdapter and a XMLStreamConverter. The latest XMLParser has an #encodingOn: convenience method for this:

    (XMLUTF8StreamConverter encodingOn: stream). "returns a wrapped stream"

same thing:

    ('utf-8' asXMLStreamConverter encodingOn: stream).

GsFiles are supported too.

Update the ConfigurationOf to depend on #stable smalltalkhub.com PharoExtras/XMLParser.

========

I very much agree with what he did. And even if it might break materialization of existing files, I believe its totally worth. Until now, SIXX was using an INCREDIBLE OLD GemStone-specific XMLSupport package that nobody maintained. XML has evolved other the years and Pharo code is a million years ahead. With these changes, SIXX can now use the Pharo's up to date XMLParser, which is super cool.

dalehenrich added a commit that referenced this pull request Sep 23, 2020
patch a compile error and update to use smalltalkCI for travis ... expected set of failures to be addressed when work on PR #4 resumes ... shortly?
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.

1 participant