Skip to content

Commit c9b04d7

Browse files
authored
Merge pull request #1 from sibill-it/fork
Fork saxy
2 parents cb9bfb3 + d89887c commit c9b04d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1181
-514
lines changed

.formatter.exs

-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
[
33
import_deps: [:stream_data],
44
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
5-
line_length: 130,
65
locals_without_parens: [defhalt: 1, emit_event: 2]
76
]

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ erl_crash.dump
2020
*.ez
2121

2222
# Ignore package tarball (built via "mix hex.build").
23-
saxy-*.tar
23+
sassone-*.tar
2424

2525
# Temporary files for e.g. tests.
26-
/tmp
26+
/tmp

CHANGELOG-saxy.md

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Changelog
2+
3+
## v1.5.0 - 2022-11-09
4+
5+
* Saxy.encode! now supports "UTF-8"/"utf-8" as string in the prolog [#102](https://github.com/qcam/saxy/pull/102).
6+
* Access user state inside partial to allow streaming output [#100](https://github.com/qcam/saxy/pull/100).
7+
* Introduce :never to expand_entity option [#114](https://github.com/qcam/saxy/pull/114).
8+
* Bug fixes around typespecs.
9+
10+
## v1.4.0 - 2021-06-05
11+
12+
* Optimize `Saxy.parse_string` (about 20% faster) [#84](https://github.com/qcam/saxy/pull/84).
13+
Previously this could be achieved with application config, you no longer have
14+
to do that.
15+
* Support custom transformer in `Saxy.Builder` [#87](https://github.com/qcam/saxy/pull/87).
16+
* Miscellaneous fixes [#81](https://github.com/qcam/saxy/pull/81),
17+
[#82](https://github.com/qcam/saxy/pull/82),
18+
[#89](https://github.com/qcam/saxy/pull/89).
19+
20+
## v1.3.0 - 2020-10-18
21+
22+
* Fix Saxy.Builder primitive type implementations.
23+
* Add `:cdata` SAX event type.
24+
* Introduce `:cdata_as_characters` option in parsers.
25+
26+
## v1.2.2 - 2020-10-02
27+
28+
* Bring back accidentally removed XML builders.
29+
30+
## v1.2.1 - 2020-09-27 (retired)
31+
32+
* Fix incorrect type spec.
33+
34+
## v1.2.0 - 2020-06-02
35+
36+
* Fix XML encoding without prolog [#57](https://github.com/qcam/saxy/pull/57).
37+
* Fix integer typespec [#58](https://github.com/qcam/saxy/pull/58).
38+
* Introduce parser halting [#66](https://github.com/qcam/saxy/pull/66).
39+
* Speed up XML builder [#69](https://github.com/qcam/saxy/pull/69).
40+
41+
## v1.1.0 - 2020-02-09
42+
43+
* Introduce `:character_data_max_length` option in stream and partial parsing.
44+
45+
## v1.0.0 - 2019-12-19
46+
47+
* Support Elixir 1.6+.
48+
* Fix white spaces emitting bug in empty elements.
49+
* **BREAKING CHANGES:**
50+
* Leading whitespaces before a tag open will be emitted.
51+
52+
## v0.10.0 - 2019-08-26
53+
54+
* Add support of partial parsing [#42](https://github.com/qcam/saxy/pull/42).
55+
56+
## v0.9.1 - 2019-02-26
57+
58+
* Fix type spec warnings in `Saxy.SimpleForm`.
59+
60+
## v0.9.0 - 2018-10-21
61+
62+
* Allow turning off streaming feature in config [#30](https://github.com/qcam/saxy/pull/30).
63+
* Skip DTD instead of crashing [#33](https://github.com/qcam/saxy/pull/33).
64+
* Minor bug fix on element attributes order [09b90a9b50ea3ffa17ba2736c29ff791ff9859d0](https://github.com/qcam/saxy/commit/09b90a9b50ea3ffa17ba2736c29ff791ff9859d0).
65+
66+
## v0.8.0 - 2018-09-05
67+
68+
* Improve streaming parsing [#23](https://github.com/qcam/saxy/pull/23).
69+
* Improve parser performance [#24](https://github.com/qcam/saxy/pull/24).
70+
* Improve parser error handling [#25](https://github.com/qcam/saxy/pull/25).
71+
72+
## v0.7.0 - 2018-07-14
73+
74+
* Introduce XML encoder [#17](https://github.com/qcam/saxy/pull/17).
75+
* Fix wrong ASCII code point matching [#20](https://github.com/qcam/saxy/pull/20).
76+
* Brought back UTF-8 encoding validation ([#16](https://github.com/qcam/saxy/pull/16)).
77+
78+
## v0.6.0 - 2018-04-08
79+
80+
* Introduce `:expand_entity` option ([#14](https://github.com/qcam/saxy/pull/14)).
81+
* Hard deprecate `Saxy.Handler.handle_entity_reference/1` callback ([#14](https://github.com/qcam/saxy/pull/14)).
82+
* Fix a UTF-8 buffering bug for streaming parsing ([#13](https://github.com/qcam/saxy/pull/13), [#15](https://github.com/qcam/saxy/pull/15)).
83+
* Return only root tag in simple form parsing ([e8c062](https://github.com/qcam/saxy/commit/e8c062e94f91ccea4491cec29c4c7861e7b7163b)).
84+
85+
## v0.5.0 - 2018-03-15
86+
87+
* Introduce Simple Form parsing.
88+
* Parse misc after finishing parsing root element.
89+
90+
## v0.4.0 - 2018-03-12
91+
92+
* Supported Elixir v1.3.
93+
* Increased parsing speed by 22 times.
94+
* Improved returning error.
95+
* Added `handle_entity_reference` callback in `Saxy.Handler`.
96+
97+
**Breaking changes:**
98+
99+
* Required entity reference handling in `Saxy.Handler`.

CHANGELOG.md

+6-96
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,9 @@
11
# Changelog
22

3-
## v1.5.0 - 2022-11-09
3+
## v1.0.0 - 2024-09-16
44

5-
* Saxy.encode! now supports "UTF-8"/"utf-8" as string in the prolog [#102](https://github.com/qcam/saxy/pull/102).
6-
* Access user state inside partial to allow streaming output [#100](https://github.com/qcam/saxy/pull/100).
7-
* Introduce :never to expand_entity option [#114](https://github.com/qcam/saxy/pull/114).
8-
* Bug fixes around typespecs.
9-
10-
## v1.4.0 - 2021-06-05
11-
12-
* Optimize `Saxy.parse_string` (about 20% faster) [#84](https://github.com/qcam/saxy/pull/84).
13-
Previously this could be achieved with application config, you no longer have
14-
to do that.
15-
* Support custom transformer in `Saxy.Builder` [#87](https://github.com/qcam/saxy/pull/87).
16-
* Miscellaneous fixes [#81](https://github.com/qcam/saxy/pull/81),
17-
[#82](https://github.com/qcam/saxy/pull/82),
18-
[#89](https://github.com/qcam/saxy/pull/89).
19-
20-
## v1.3.0 - 2020-10-18
21-
22-
* Fix Saxy.Builder primitive type implementations.
23-
* Add `:cdata` SAX event type.
24-
* Introduce `:cdata_as_characters` option in parsers.
25-
26-
## v1.2.2 - 2020-10-02
27-
28-
* Bring back accidentally removed XML builders.
29-
30-
## v1.2.1 - 2020-09-27 (retired)
31-
32-
* Fix incorrect type spec.
33-
34-
## v1.2.0 - 2020-06-02
35-
36-
* Fix XML encoding without prolog [#57](https://github.com/qcam/saxy/pull/57).
37-
* Fix integer typespec [#58](https://github.com/qcam/saxy/pull/58).
38-
* Introduce parser halting [#66](https://github.com/qcam/saxy/pull/66).
39-
* Speed up XML builder [#69](https://github.com/qcam/saxy/pull/69).
40-
41-
## v1.1.0 - 2020-02-09
42-
43-
* Introduce `:character_data_max_length` option in stream and partial parsing.
44-
45-
## v1.0.0 - 2019-12-19
46-
47-
* Support Elixir 1.6+.
48-
* Fix white spaces emitting bug in empty elements.
49-
* **BREAKING CHANGES:**
50-
* Leading whitespaces before a tag open will be emitted.
51-
52-
## v0.10.0 - 2019-08-26
53-
54-
* Add support of partial parsing [#42](https://github.com/qcam/saxy/pull/42).
55-
56-
## v0.9.1 - 2019-02-26
57-
58-
* Fix type spec warnings in `Saxy.SimpleForm`.
59-
60-
## v0.9.0 - 2018-10-21
61-
62-
* Allow turning off streaming feature in config [#30](https://github.com/qcam/saxy/pull/30).
63-
* Skip DTD instead of crashing [#33](https://github.com/qcam/saxy/pull/33).
64-
* Minor bug fix on element attributes order [09b90a9b50ea3ffa17ba2736c29ff791ff9859d0](https://github.com/qcam/saxy/commit/09b90a9b50ea3ffa17ba2736c29ff791ff9859d0).
65-
66-
## v0.8.0 - 2018-09-05
67-
68-
* Improve streaming parsing [#23](https://github.com/qcam/saxy/pull/23).
69-
* Improve parser performance [#24](https://github.com/qcam/saxy/pull/24).
70-
* Improve parser error handling [#25](https://github.com/qcam/saxy/pull/25).
71-
72-
## v0.7.0 - 2018-07-14
73-
74-
* Introduce XML encoder [#17](https://github.com/qcam/saxy/pull/17).
75-
* Fix wrong ASCII code point matching [#20](https://github.com/qcam/saxy/pull/20).
76-
* Brought back UTF-8 encoding validation ([#16](https://github.com/qcam/saxy/pull/16)).
77-
78-
## v0.6.0 - 2018-04-08
79-
80-
* Introduce `:expand_entity` option ([#14](https://github.com/qcam/saxy/pull/14)).
81-
* Hard deprecate `Saxy.Handler.handle_entity_reference/1` callback ([#14](https://github.com/qcam/saxy/pull/14)).
82-
* Fix a UTF-8 buffering bug for streaming parsing ([#13](https://github.com/qcam/saxy/pull/13), [#15](https://github.com/qcam/saxy/pull/15)).
83-
* Return only root tag in simple form parsing ([e8c062](https://github.com/qcam/saxy/commit/e8c062e94f91ccea4491cec29c4c7861e7b7163b)).
84-
85-
## v0.5.0 - 2018-03-15
86-
87-
* Introduce Simple Form parsing.
88-
* Parse misc after finishing parsing root element.
89-
90-
## v0.4.0 - 2018-03-12
91-
92-
* Supported Elixir v1.3.
93-
* Increased parsing speed by 22 times.
94-
* Improved returning error.
95-
* Added `handle_entity_reference` callback in `Saxy.Handler`.
96-
97-
**Breaking changes:**
98-
99-
* Required entity reference handling in `Saxy.Handler`.
5+
* Add support for `{:cont, handler, state}` as `Saxy.Handler` callbacks return value.
6+
This allows for splitting the parser in multiple handlers.
7+
* Return namespace separately from element name in `Saxy.Handler` callbacks.
8+
This allows pattern matching on element names, which is not possibile if the namespace is
9+
prefixed to it, since you cannot pattern match on a variable length string prefix.

LICENSE.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Copyright (c) 2018 Cẩm Huỳnh
1+
Copyright (c) 2018-2024 Cẩm Huỳnh
2+
Copyright (c) 2024 Luca Corti, sibill.it
23

34
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
45

0 commit comments

Comments
 (0)