polyxml 0.41.0__tar.gz → 0.41.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. {polyxml-0.41.0 → polyxml-0.41.1}/Cargo.lock +6 -6
  2. {polyxml-0.41.0 → polyxml-0.41.1}/Cargo.toml +1 -1
  3. {polyxml-0.41.0 → polyxml-0.41.1}/PKG-INFO +1 -1
  4. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_core.rs +1 -1
  5. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_csharp_codegen.rs +13 -11
  6. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_default_literal_codegen.rs +1 -1
  7. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_enum_literal_codegen.rs +1 -1
  8. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_go_codegen.rs +11 -11
  9. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_inherited_simple_content.rs +2 -1
  10. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_inherited_text_codegen.rs +1 -1
  11. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_lexical_lists.rs +2 -2
  12. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_qualified_attributes.rs +2 -2
  13. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_schema_attribute_entities.rs +2 -1
  14. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_temporal_union.rs +1 -1
  15. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_upa.rs +1 -1
  16. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_value_constraints.rs +4 -2
  17. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-python/tests/test_generated_models.py +19 -13
  18. {polyxml-0.41.0 → polyxml-0.41.1}/pyproject.toml +1 -1
  19. {polyxml-0.41.0 → polyxml-0.41.1}/README.md +0 -0
  20. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/Cargo.toml +0 -0
  21. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/README.md +0 -0
  22. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/benches/core_benchmarks.rs +0 -0
  23. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/benches/support/tag_dispatch_fixtures.rs +0 -0
  24. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/benches/tag_dispatch.rs +0 -0
  25. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/codegen/cpp/codec.rs +0 -0
  26. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/codegen/cpp/mod.rs +0 -0
  27. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/codegen/csharp/mod.rs +0 -0
  28. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/codegen/go/mod.rs +0 -0
  29. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/codegen/java/codec.rs +0 -0
  30. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/codegen/java/mod.rs +0 -0
  31. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/codegen/java/models.rs +0 -0
  32. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/codegen/mod.rs +0 -0
  33. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/codegen/python/aot.rs +0 -0
  34. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/codegen/python/mod.rs +0 -0
  35. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/codegen/rust/mod.rs +0 -0
  36. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/codegen/typescript/codec.rs +0 -0
  37. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/codegen/typescript/mod.rs +0 -0
  38. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/converters.rs +0 -0
  39. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/error.rs +0 -0
  40. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/integer.rs +0 -0
  41. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/ir/chunker.rs +0 -0
  42. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/ir/mod.rs +0 -0
  43. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/ir/particle.rs +0 -0
  44. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/ir/tarjan.rs +0 -0
  45. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/json.rs +0 -0
  46. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/lib.rs +0 -0
  47. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/parser.rs +0 -0
  48. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/pattern.rs +0 -0
  49. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/schema.rs +0 -0
  50. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/schema_parser/mod.rs +0 -0
  51. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/schema_parser/upa.rs +0 -0
  52. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/serializer.rs +0 -0
  53. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/transcoder.rs +0 -0
  54. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/src/value.rs +0 -0
  55. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/fixtures/lexical_union.xsd +0 -0
  56. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/fixtures/mixed_content.xsd +0 -0
  57. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/fixtures/ts_mixed_content_inheritance.xsd +0 -0
  58. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_adversarial_identifiers.rs +0 -0
  59. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_any_attribute.rs +0 -0
  60. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_any_element.rs +0 -0
  61. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_conformance.rs +0 -0
  62. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_corpus_regressions.rs +0 -0
  63. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_cpp_codegen.rs +0 -0
  64. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_issue_162.rs +0 -0
  65. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_java_codegen.rs +0 -0
  66. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_json.rs +0 -0
  67. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_lexical_union_codegen.rs +0 -0
  68. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_mixed_branch_lookup.rs +0 -0
  69. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_mixed_content.rs +0 -0
  70. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_mixed_nil.rs +0 -0
  71. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_namespace_entities.rs +0 -0
  72. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_pattern_codegen.rs +0 -0
  73. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_python_codegen.rs +0 -0
  74. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_runtime_fast_paths.rs +0 -0
  75. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_rust_codecs.rs +0 -0
  76. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_rust_codegen.rs +0 -0
  77. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_schema_audit.rs +0 -0
  78. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_schema_ir.rs +0 -0
  79. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_security.rs +0 -0
  80. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_transcoder.rs +0 -0
  81. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_ts_codegen.rs +0 -0
  82. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_ubl_csharp.rs +0 -0
  83. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_unbounded_choice.rs +0 -0
  84. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_variant_registry.rs +0 -0
  85. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-core/tests/test_xsi_type.rs +0 -0
  86. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-python/Cargo.toml +0 -0
  87. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-python/README.md +0 -0
  88. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-python/benches/aot_vs_dataclass.py +0 -0
  89. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-python/src/lib.rs +0 -0
  90. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-python/tests/test_binary_fields.py +0 -0
  91. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-python/tests/test_conformance.py +0 -0
  92. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-python/tests/test_json.py +0 -0
  93. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-python/tests/test_mixed_content.py +0 -0
  94. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-python/tests/test_polyxml.py +0 -0
  95. {polyxml-0.41.0 → polyxml-0.41.1}/crates/polyxml-python/tests/test_xsi_type.py +0 -0
  96. {polyxml-0.41.0 → polyxml-0.41.1}/python/polyxml/AGENT_GUIDE.md +0 -0
  97. {polyxml-0.41.0 → polyxml-0.41.1}/python/polyxml/__init__.py +0 -0
  98. {polyxml-0.41.0 → polyxml-0.41.1}/python/polyxml/compat/__init__.py +0 -0
  99. {polyxml-0.41.0 → polyxml-0.41.1}/python/polyxml/compat/xsdata.py +0 -0
  100. {polyxml-0.41.0 → polyxml-0.41.1}/python/polyxml/py.typed +0 -0
@@ -610,7 +610,7 @@ dependencies = [
610
610
 
611
611
  [[package]]
612
612
  name = "polyxml"
613
- version = "0.41.0"
613
+ version = "0.41.1"
614
614
  dependencies = [
615
615
  "criterion",
616
616
  "heck",
@@ -631,14 +631,14 @@ dependencies = [
631
631
 
632
632
  [[package]]
633
633
  name = "polyxml-c"
634
- version = "0.41.0"
634
+ version = "0.41.1"
635
635
  dependencies = [
636
636
  "polyxml",
637
637
  ]
638
638
 
639
639
  [[package]]
640
640
  name = "polyxml-cli"
641
- version = "0.41.0"
641
+ version = "0.41.1"
642
642
  dependencies = [
643
643
  "clap",
644
644
  "glob",
@@ -652,7 +652,7 @@ dependencies = [
652
652
 
653
653
  [[package]]
654
654
  name = "polyxml-js"
655
- version = "0.41.0"
655
+ version = "0.41.1"
656
656
  dependencies = [
657
657
  "napi",
658
658
  "napi-build",
@@ -662,7 +662,7 @@ dependencies = [
662
662
 
663
663
  [[package]]
664
664
  name = "polyxml-python"
665
- version = "0.41.0"
665
+ version = "0.41.1"
666
666
  dependencies = [
667
667
  "base64",
668
668
  "hex",
@@ -674,7 +674,7 @@ dependencies = [
674
674
 
675
675
  [[package]]
676
676
  name = "polyxml-wasm"
677
- version = "0.41.0"
677
+ version = "0.41.1"
678
678
  dependencies = [
679
679
  "polyxml",
680
680
  "quick-xml",
@@ -3,7 +3,7 @@ resolver = "2"
3
3
  members = ["crates/polyxml-core", "crates/polyxml-python"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.41.0"
6
+ version = "0.41.1"
7
7
  edition = "2021"
8
8
  rust-version = "1.80"
9
9
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polyxml
3
- Version: 0.41.0
3
+ Version: 0.41.1
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -308,7 +308,7 @@ fn test_roundtrip_serialization_with_indentation() {
308
308
  fn unbounded_integers_round_trip_and_compare_exact_bounds() {
309
309
  let ir = polyxml::schema_parser::XsdParser::new()
310
310
  .parse_str(include_str!(
311
- "../../../research/fixtures/wave5/unbounded_integer.xsd"
311
+ "../../../tests/fixtures/conformance/wave5/unbounded_integer.xsd"
312
312
  ))
313
313
  .unwrap();
314
314
  let schema = ModelSchema::from_ir(&ir, Some("Root")).unwrap();
@@ -83,11 +83,11 @@ fn particle_wire_structure_round_trips() {
83
83
  (r#"<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:complexType name="VehicleType"><xs:simpleContent><xs:extension base="xs:string"/></xs:simpleContent></xs:complexType><xs:complexType name="OtherType"><xs:simpleContent><xs:extension base="xs:string"/></xs:simpleContent></xs:complexType><xs:element name="Root"><xs:complexType mixed="true"><xs:choice minOccurs="0" maxOccurs="unbounded"><xs:element name="Vehicle" type="VehicleType"/><xs:element name="VehicleType" type="OtherType"/></xs:choice></xs:complexType></xs:element></xs:schema>"#, "Root", vec!["<Root><Vehicle>one</Vehicle><VehicleType>two</VehicleType></Root>"]),
84
84
  (r#"<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:simpleType name="Phase"><xs:restriction base="xs:string"><xs:enumeration value="on"/><xs:enumeration value="off"/></xs:restriction></xs:simpleType><xs:complexType name="Base" mixed="true"><xs:choice minOccurs="0" maxOccurs="unbounded"><xs:element name="ItemA" type="xs:string"/><xs:element name="item_a" type="xs:string"/></xs:choice><xs:attribute name="code" type="xs:string"/><xs:attribute name="enabled" type="xs:boolean" use="required"/><xs:attribute name="phase" type="Phase" use="required"/></xs:complexType><xs:complexType name="Derived" mixed="true"><xs:complexContent mixed="true"><xs:extension base="Base"><xs:attribute name="extra" type="xs:string"/></xs:extension></xs:complexContent></xs:complexType><xs:element name="Root" type="Derived"/></xs:schema>"#, "Root", vec![r#"<Root code="base" extra="leaf" enabled="true" phase="on">before<ItemA>A</ItemA>between<item_a>B</item_a>after</Root>"#]),
85
85
  (r#"<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="Query"><xs:complexType><xs:sequence><xs:element name="Equals" type="xs:string"/><xs:element name="EqualsValue" type="xs:string"/><xs:element name="GetHashCode" type="xs:string"/><xs:element name="ToString" type="xs:string"/></xs:sequence></xs:complexType></xs:element></xs:schema>"#, "Query", vec!["<Query><Equals>a</Equals><EqualsValue>b</EqualsValue><GetHashCode>c</GetHashCode><ToString>d</ToString></Query>"]),
86
- (include_str!("../../../research/fixtures/nested_sequence_choice.xsd"), "Root", vec!["<Root><First>A</First><Second>B</Second></Root>", "<Root><Alternative>C</Alternative></Root>"]),
87
- (include_str!("../../../research/fixtures/repeated_sequence.xsd"), "Root", vec!["<Root><First>A1</First><Second>B1</Second><First>A2</First><Second>B2</Second></Root>"]),
88
- (include_str!("../../../research/fixtures/substitution_group.xsd"), "Portfolio", vec!["<Portfolio xmlns='urn:audit:substitution'><Bond>A1</Bond><Equity>B1</Equity><Bond>A2</Bond></Portfolio>"]),
89
- (include_str!("../../../research/fixtures/choice_branch_cardinality.xsd"), "Root", vec!["<Root><Timing>A1</Timing><Timing>A2</Timing></Root>"]),
90
- (include_str!("../../../research/fixtures/wave6/duplicate_choice_branch_name.xsd"), "Person", vec!["<Person><MinAge>18</MinAge><MaxAge>25</MaxAge></Person>", "<Person><MaxAge>25</MaxAge></Person>"]),
86
+ (include_str!("../../../tests/fixtures/conformance/nested_sequence_choice.xsd"), "Root", vec!["<Root><First>A</First><Second>B</Second></Root>", "<Root><Alternative>C</Alternative></Root>"]),
87
+ (include_str!("../../../tests/fixtures/conformance/repeated_sequence.xsd"), "Root", vec!["<Root><First>A1</First><Second>B1</Second><First>A2</First><Second>B2</Second></Root>"]),
88
+ (include_str!("../../../tests/fixtures/conformance/substitution_group.xsd"), "Portfolio", vec!["<Portfolio xmlns='urn:audit:substitution'><Bond>A1</Bond><Equity>B1</Equity><Bond>A2</Bond></Portfolio>"]),
89
+ (include_str!("../../../tests/fixtures/conformance/choice_branch_cardinality.xsd"), "Root", vec!["<Root><Timing>A1</Timing><Timing>A2</Timing></Root>"]),
90
+ (include_str!("../../../tests/fixtures/conformance/wave6/duplicate_choice_branch_name.xsd"), "Person", vec!["<Person><MinAge>18</MinAge><MaxAge>25</MaxAge></Person>", "<Person><MaxAge>25</MaxAge></Person>"]),
91
91
  ] {
92
92
  let ir = polyxml::schema_parser::XsdParser::new().parse_str(schema).unwrap();
93
93
  for use_records in [true, false] {
@@ -119,7 +119,7 @@ foreach (var document in new [] {{ {documents} }}) {{
119
119
  fn lexical_union_attributes_round_trip() {
120
120
  let ir = polyxml::schema_parser::XsdParser::new()
121
121
  .parse_str(include_str!(
122
- "../../../research/fixtures/lexical_union_attribute.xsd"
122
+ "../../../tests/fixtures/conformance/lexical_union_attribute.xsd"
123
123
  ))
124
124
  .unwrap();
125
125
  for use_records in [true, false] {
@@ -163,7 +163,7 @@ try { serializer.Deserialize(new StringReader("<Root count='invalid'/>")); throw
163
163
  fn nillable_enum_collection_round_trips() {
164
164
  let ir = polyxml::schema_parser::XsdParser::new()
165
165
  .parse_str(include_str!(
166
- "../../../research/fixtures/nillable_enum_collection.xsd"
166
+ "../../../tests/fixtures/conformance/nillable_enum_collection.xsd"
167
167
  ))
168
168
  .unwrap();
169
169
  for use_records in [true, false] {
@@ -179,7 +179,7 @@ fn nillable_enum_collection_round_trips() {
179
179
  fs::write(temp.path().join("Models.cs"), code).unwrap();
180
180
  let strict_ir = polyxml::schema_parser::XsdParser::new()
181
181
  .parse_str(
182
- &include_str!("../../../research/fixtures/nillable_enum_collection.xsd")
182
+ &include_str!("../../../tests/fixtures/conformance/nillable_enum_collection.xsd")
183
183
  .replace("nillable=\"true\"", "nillable=\"false\""),
184
184
  )
185
185
  .unwrap();
@@ -1272,7 +1272,7 @@ fn test_csharp_sequence_nested_inside_choice_codegen() {
1272
1272
  fn element_defaults_preserve_absence_and_empty_presence() {
1273
1273
  let ir = polyxml::schema_parser::XsdParser::new()
1274
1274
  .parse_str(include_str!(
1275
- "../../../research/fixtures/element_defaults.xsd"
1275
+ "../../../tests/fixtures/conformance/element_defaults.xsd"
1276
1276
  ))
1277
1277
  .unwrap();
1278
1278
  for use_records in [true, false] {
@@ -1317,7 +1317,9 @@ if(present&&!writer.ToString().Contains("<Flag>false</Flag>"))throw new Exceptio
1317
1317
  #[test]
1318
1318
  fn fixed_values_are_enforced_on_read_and_write() {
1319
1319
  let ir = polyxml::schema_parser::XsdParser::new()
1320
- .parse_str(include_str!("../../../research/fixtures/fixed_values.xsd"))
1320
+ .parse_str(include_str!(
1321
+ "../../../tests/fixtures/conformance/fixed_values.xsd"
1322
+ ))
1321
1323
  .unwrap();
1322
1324
  for use_records in [true, false] {
1323
1325
  let temp = tempdir().unwrap();
@@ -1362,7 +1364,7 @@ try{serializer.Deserialize(new StringReader(xml));throw new Exception("invalid i
1362
1364
  fn unbounded_integer_xml_preserves_digits() {
1363
1365
  let ir = polyxml::schema_parser::XsdParser::new()
1364
1366
  .parse_str(include_str!(
1365
- "../../../research/fixtures/wave5/unbounded_integer.xsd"
1367
+ "../../../tests/fixtures/conformance/wave5/unbounded_integer.xsd"
1366
1368
  ))
1367
1369
  .unwrap();
1368
1370
  for records in [true, false] {
@@ -21,7 +21,7 @@ fn run(directory: &Path, program: &str, args: &[&str]) {
21
21
  fn generated_string_defaults_and_fixed_values_preserve_xml_characters() {
22
22
  let ir = XsdParser::new()
23
23
  .parse_str(include_str!(
24
- "../../../research/fixtures/default_literal_escaping.xsd"
24
+ "../../../tests/fixtures/conformance/default_literal_escaping.xsd"
25
25
  ))
26
26
  .unwrap();
27
27
  let expected = "\"quoted\"\\path\\u000a\t\n\r\u{85}\u{2028}café 😀";
@@ -25,7 +25,7 @@ fn run(directory: &Path, program: &str, args: &[&str]) {
25
25
  fn enum_literals_compile_and_preserve_values_in_all_seven_languages() {
26
26
  let ir = XsdParser::new()
27
27
  .parse_str(include_str!(
28
- "../../../research/fixtures/enum_literal_escaping.xsd"
28
+ "../../../tests/fixtures/conformance/enum_literal_escaping.xsd"
29
29
  ))
30
30
  .unwrap();
31
31
  let TypeDef::Enum(status) = &ir.types[&QName::local("Status")] else {
@@ -15,10 +15,10 @@ use polyxml::schema_parser::XsdParser;
15
15
  #[test]
16
16
  fn ordered_particles_and_choice_branches_round_trip() {
17
17
  for (schema, root, documents) in [
18
- (include_str!("../../../research/fixtures/repeated_sequence.xsd"), "Root", vec!["<Root><First>A1</First><Second>B1</Second><First>A2</First><Second>B2</Second></Root>", "<Root/>"]),
19
- (include_str!("../../../research/fixtures/substitution_group.xsd"), "Portfolio", vec!["<Portfolio xmlns='urn:audit:substitution'><Bond>A1</Bond><Equity>B1</Equity><Bond>A2</Bond></Portfolio>"]),
20
- (include_str!("../../../research/fixtures/choice_branch_cardinality.xsd"), "Root", vec!["<Root><Timing>A1</Timing><Timing>A2</Timing></Root>", "<Root><Drive>B</Drive></Root>"]),
21
- (include_str!("../../../research/fixtures/wave6/duplicate_choice_branch_name.xsd"), "Person", vec!["<Person><MinAge>18</MinAge><MaxAge>25</MaxAge></Person>", "<Person><MaxAge>25</MaxAge></Person>", "<Person/>"]),
18
+ (include_str!("../../../tests/fixtures/conformance/repeated_sequence.xsd"), "Root", vec!["<Root><First>A1</First><Second>B1</Second><First>A2</First><Second>B2</Second></Root>", "<Root/>"]),
19
+ (include_str!("../../../tests/fixtures/conformance/substitution_group.xsd"), "Portfolio", vec!["<Portfolio xmlns='urn:audit:substitution'><Bond>A1</Bond><Equity>B1</Equity><Bond>A2</Bond></Portfolio>"]),
20
+ (include_str!("../../../tests/fixtures/conformance/choice_branch_cardinality.xsd"), "Root", vec!["<Root><Timing>A1</Timing><Timing>A2</Timing></Root>", "<Root><Drive>B</Drive></Root>"]),
21
+ (include_str!("../../../tests/fixtures/conformance/wave6/duplicate_choice_branch_name.xsd"), "Person", vec!["<Person><MinAge>18</MinAge><MaxAge>25</MaxAge></Person>", "<Person><MaxAge>25</MaxAge></Person>", "<Person/>"]),
22
22
  ] {
23
23
  let ir = XsdParser::new().parse_str(schema).unwrap();
24
24
  let dir = tempdir().unwrap();
@@ -90,7 +90,7 @@ func TestTemporal(t *testing.T) {
90
90
  fn roots_and_union_attributes_round_trip() {
91
91
  let ir = XsdParser::new()
92
92
  .parse_str(include_str!(
93
- "../../../research/fixtures/lexical_union_attribute.xsd"
93
+ "../../../tests/fixtures/conformance/lexical_union_attribute.xsd"
94
94
  ))
95
95
  .unwrap();
96
96
  let dir = tempdir().unwrap();
@@ -1201,7 +1201,7 @@ func TestNamespacedElementRef(t *testing.T) {
1201
1201
  fn separate_choices_enforce_each_group() {
1202
1202
  let ir = XsdParser::new()
1203
1203
  .parse_str(include_str!(
1204
- "../../../research/fixtures/wave6/two_choice_groups.xsd"
1204
+ "../../../tests/fixtures/conformance/wave6/two_choice_groups.xsd"
1205
1205
  ))
1206
1206
  .unwrap();
1207
1207
  assert!(ir
@@ -1246,7 +1246,7 @@ var empty Parameters;if _,err:=xml.Marshal(empty);err==nil{t.Fatal("invalid outp
1246
1246
  fn repeated_sequence_groups_enforce_bounds_and_order() {
1247
1247
  let ir = XsdParser::new()
1248
1248
  .parse_str(include_str!(
1249
- "../../../research/fixtures/repeated_sequence.xsd"
1249
+ "../../../tests/fixtures/conformance/repeated_sequence.xsd"
1250
1250
  ))
1251
1251
  .unwrap();
1252
1252
  let temp = tempdir().unwrap();
@@ -1285,7 +1285,7 @@ func TestSequence(t *testing.T){
1285
1285
  fn repeated_choice_branch_rejects_mixed_and_empty_selections() {
1286
1286
  let ir = XsdParser::new()
1287
1287
  .parse_str(include_str!(
1288
- "../../../research/fixtures/choice_branch_cardinality.xsd"
1288
+ "../../../tests/fixtures/conformance/choice_branch_cardinality.xsd"
1289
1289
  ))
1290
1290
  .unwrap();
1291
1291
  let structure = match ir.types.get(&QName::local("RootType")).unwrap() {
@@ -1336,7 +1336,7 @@ var root Root;if err:=xml.Unmarshal([]byte(`<Root><Timing>a</Timing></Root>`),&r
1336
1336
  fn duplicate_choice_names_reject_invalid_branch_shapes() {
1337
1337
  let ir = XsdParser::new()
1338
1338
  .parse_str(include_str!(
1339
- "../../../research/fixtures/wave6/duplicate_choice_branch_name.xsd"
1339
+ "../../../tests/fixtures/conformance/wave6/duplicate_choice_branch_name.xsd"
1340
1340
  ))
1341
1341
  .unwrap();
1342
1342
  let temp = tempdir().unwrap();
@@ -1371,7 +1371,7 @@ for _,body:=range []string{`<MaxAge>25</MaxAge><MaxAge>30</MaxAge>`,`<MinAge>18<
1371
1371
 
1372
1372
  #[test]
1373
1373
  fn abstract_substitution_heads_are_rejected() {
1374
- let schema = include_str!("../../../research/fixtures/substitution_group.xsd");
1374
+ let schema = include_str!("../../../tests/fixtures/conformance/substitution_group.xsd");
1375
1375
  let ir = XsdParser::new().parse_str(schema).unwrap();
1376
1376
  assert!(ir
1377
1377
  .abstract_elements
@@ -1415,7 +1415,7 @@ var root Portfolio;if err:=xml.Unmarshal([]byte(`<Portfolio xmlns="urn:audit:sub
1415
1415
  fn unbounded_integer_xml_preserves_digits() {
1416
1416
  let ir = XsdParser::new()
1417
1417
  .parse_str(include_str!(
1418
- "../../../research/fixtures/wave5/unbounded_integer.xsd"
1418
+ "../../../tests/fixtures/conformance/wave5/unbounded_integer.xsd"
1419
1419
  ))
1420
1420
  .unwrap();
1421
1421
  let dir = tempdir().unwrap();
@@ -4,7 +4,8 @@ use polyxml::schema_parser::XsdParser;
4
4
  use polyxml::{deserialize, serialize, PolyValue};
5
5
  use std::sync::Arc;
6
6
 
7
- const FIXTURE: &str = include_str!("../../../research/fixtures/inherited_simple_content.xsd");
7
+ const FIXTURE: &str =
8
+ include_str!("../../../tests/fixtures/conformance/inherited_simple_content.xsd");
8
9
 
9
10
  #[test]
10
11
  fn inherited_text_resolves_terminal_type_without_losing_struct_bases_or_aliases() {
@@ -22,7 +22,7 @@ fn run(directory: &Path, program: &str, args: &[&str]) {
22
22
  fn inherited_scalar_text_compiles_in_all_seven_languages() {
23
23
  let ir = XsdParser::new()
24
24
  .parse_str(include_str!(
25
- "../../../research/fixtures/inherited_simple_content.xsd"
25
+ "../../../tests/fixtures/conformance/inherited_simple_content.xsd"
26
26
  ))
27
27
  .unwrap();
28
28
  let root = tempfile::tempdir().unwrap();
@@ -11,7 +11,7 @@ use tempfile::tempdir;
11
11
  fn typed_lexical_lists_round_trip_across_codecs() {
12
12
  let ir = XsdParser::new()
13
13
  .parse_str(include_str!(
14
- "../../../research/fixtures/list_simple_types.xsd"
14
+ "../../../tests/fixtures/conformance/list_simple_types.xsd"
15
15
  ))
16
16
  .unwrap();
17
17
  let schema = ModelSchema::from_ir(&ir, Some("Root")).unwrap();
@@ -101,7 +101,7 @@ try{serializer.Deserialize(new StringReader("<Root><Numbers>one two</Numbers><Wo
101
101
  fn named_list_items_enforce_facets_and_enumerations() {
102
102
  let ir = XsdParser::new()
103
103
  .parse_str(include_str!(
104
- "../../../research/fixtures/restricted_list_items.xsd"
104
+ "../../../tests/fixtures/conformance/restricted_list_items.xsd"
105
105
  ))
106
106
  .unwrap();
107
107
  let schema = ModelSchema::from_ir(&ir, Some("Root")).unwrap();
@@ -12,7 +12,7 @@ fn global_attribute_references_round_trip_by_namespace() {
12
12
  let ir = parser
13
13
  .parse_file(concat!(
14
14
  env!("CARGO_MANIFEST_DIR"),
15
- "/../../research/fixtures/wave6/xlink_shared_attribute/root.xsd"
15
+ "/../../tests/fixtures/conformance/wave6/xlink_shared_attribute/root.xsd"
16
16
  ))
17
17
  .unwrap();
18
18
  assert_attribute_round_trip(&ir);
@@ -24,7 +24,7 @@ fn imported_inline_global_attribute_enum_round_trips() {
24
24
  fs::copy(
25
25
  concat!(
26
26
  env!("CARGO_MANIFEST_DIR"),
27
- "/../../research/fixtures/wave6/xlink_shared_attribute/root.xsd"
27
+ "/../../tests/fixtures/conformance/wave6/xlink_shared_attribute/root.xsd"
28
28
  ),
29
29
  fixture.path().join("root.xsd"),
30
30
  )
@@ -5,7 +5,8 @@ use polyxml::schema::ModelSchema;
5
5
  use polyxml::schema_parser::XsdParser;
6
6
  use polyxml::{deserialize, serialize, PolyValue};
7
7
 
8
- const FIXTURE: &str = include_str!("../../../research/fixtures/schema_attribute_entities.xsd");
8
+ const FIXTURE: &str =
9
+ include_str!("../../../tests/fixtures/conformance/schema_attribute_entities.xsd");
9
10
 
10
11
  #[test]
11
12
  fn attribute_entities_reach_enum_facets_and_defaults_in_value_space() {
@@ -4,7 +4,7 @@ use polyxml::schema_parser::XsdParser;
4
4
  use std::{fs, process::Command};
5
5
  use tempfile::tempdir;
6
6
 
7
- const XSD: &str = include_str!("../../../research/fixtures/wave5/date_union.xsd");
7
+ const XSD: &str = include_str!("../../../tests/fixtures/conformance/wave5/date_union.xsd");
8
8
 
9
9
  fn run(command: &mut Command) {
10
10
  let output = command.output().unwrap();
@@ -20,7 +20,7 @@ fn check(content: &str, valid: bool) {
20
20
 
21
21
  #[test]
22
22
  fn optional_siblings_and_choice_lookahead_violate_upa() {
23
- let repro = include_str!("../../../research/fixtures/wave8/30_upa_violation.xsd");
23
+ let repro = include_str!("../../../tests/fixtures/conformance/wave8/30_upa_violation.xsd");
24
24
  assert!(XsdParser::new()
25
25
  .parse_str(repro)
26
26
  .unwrap_err()
@@ -6,7 +6,9 @@ use std::sync::Arc;
6
6
  #[test]
7
7
  fn fixed_constraints_cover_input_and_output_in_value_space() {
8
8
  let ir = XsdParser::new()
9
- .parse_str(include_str!("../../../research/fixtures/fixed_values.xsd"))
9
+ .parse_str(include_str!(
10
+ "../../../tests/fixtures/conformance/fixed_values.xsd"
11
+ ))
10
12
  .unwrap();
11
13
  let schema = ModelSchema::from_ir(&ir, Some("Root")).unwrap();
12
14
  for xml in [
@@ -33,7 +35,7 @@ fn fixed_constraints_cover_input_and_output_in_value_space() {
33
35
  fn repeated_particle_cardinality_belongs_to_the_group() {
34
36
  let ir = XsdParser::new()
35
37
  .parse_str(include_str!(
36
- "../../../research/fixtures/repeated_sequence.xsd"
38
+ "../../../tests/fixtures/conformance/repeated_sequence.xsd"
37
39
  ))
38
40
  .unwrap();
39
41
  let model = &ir.content_models[&polyxml::ir::QName::local("RootType")];
@@ -17,7 +17,7 @@ import polyxml
17
17
  def test_generated_abstract_root_preserves_derived_payload(tmp_path, backend):
18
18
  schema = (
19
19
  pathlib.Path(__file__).resolve().parents[3]
20
- / "research/fixtures/wave6/abstract_derived_xsi.xsd"
20
+ / "tests/fixtures/conformance/wave6/abstract_derived_xsi.xsd"
21
21
  )
22
22
  subprocess.run(
23
23
  [
@@ -121,7 +121,13 @@ def test_roots_with_the_same_local_name_in_distinct_namespaces(tmp_path):
121
121
  ],
122
122
  )
123
123
  def test_particle_codec_regressions(tmp_path, backend, fixture, root_name, documents):
124
- schema = pathlib.Path(__file__).resolve().parents[3] / "research" / "fixtures" / fixture
124
+ schema = (
125
+ pathlib.Path(__file__).resolve().parents[3]
126
+ / "tests"
127
+ / "fixtures"
128
+ / "conformance"
129
+ / fixture
130
+ )
125
131
  subprocess.run(
126
132
  [
127
133
  str(_get_polyxml_bin()),
@@ -585,7 +591,7 @@ def test_codecs_flag_disabled():
585
591
 
586
592
  @pytest.mark.parametrize("backend", ["dataclass", "pydantic"])
587
593
  def test_generated_models_reject_general_entities(tmp_path, backend):
588
- schema = pathlib.Path(__file__).resolve().parents[3] / "research/fixtures/wave7/xxe_text.xsd"
594
+ schema = pathlib.Path(__file__).resolve().parents[3] / "tests/fixtures/conformance/wave7/xxe_text.xsd"
589
595
  subprocess.run(
590
596
  [
591
597
  str(_get_polyxml_bin()),
@@ -619,7 +625,7 @@ def test_generated_models_reject_general_entities(tmp_path, backend):
619
625
 
620
626
  @pytest.mark.parametrize("backend", ["dataclass", "pydantic"])
621
627
  def test_element_defaults_preserve_absence(tmp_path, backend):
622
- schema = pathlib.Path(__file__).resolve().parents[3] / "research/fixtures/element_defaults.xsd"
628
+ schema = pathlib.Path(__file__).resolve().parents[3] / "tests/fixtures/conformance/element_defaults.xsd"
623
629
  subprocess.run(
624
630
  [
625
631
  str(_get_polyxml_bin()),
@@ -652,7 +658,7 @@ def test_element_defaults_preserve_absence(tmp_path, backend):
652
658
 
653
659
  @pytest.mark.parametrize("backend", ["dataclass", "pydantic"])
654
660
  def test_fixed_values_validate_input_and_output(tmp_path, backend):
655
- schema = pathlib.Path(__file__).resolve().parents[3] / "research/fixtures/fixed_values.xsd"
661
+ schema = pathlib.Path(__file__).resolve().parents[3] / "tests/fixtures/conformance/fixed_values.xsd"
656
662
  subprocess.run(
657
663
  [
658
664
  str(_get_polyxml_bin()),
@@ -690,7 +696,7 @@ def test_fixed_values_validate_input_and_output(tmp_path, backend):
690
696
  def test_separate_choice_groups_enforce_constraints(tmp_path, backend):
691
697
  schema = (
692
698
  pathlib.Path(__file__).resolve().parents[3]
693
- / "research/fixtures/wave6/two_choice_groups.xsd"
699
+ / "tests/fixtures/conformance/wave6/two_choice_groups.xsd"
694
700
  )
695
701
  subprocess.run(
696
702
  [
@@ -730,7 +736,7 @@ def test_separate_choice_groups_enforce_constraints(tmp_path, backend):
730
736
 
731
737
  @pytest.mark.parametrize("backend", ["dataclass", "pydantic"])
732
738
  def test_repeated_sequence_constraints(tmp_path, backend):
733
- schema = pathlib.Path(__file__).resolve().parents[3] / "research/fixtures/repeated_sequence.xsd"
739
+ schema = pathlib.Path(__file__).resolve().parents[3] / "tests/fixtures/conformance/repeated_sequence.xsd"
734
740
  subprocess.run(
735
741
  [
736
742
  str(_get_polyxml_bin()),
@@ -767,7 +773,7 @@ def test_repeated_sequence_constraints(tmp_path, backend):
767
773
 
768
774
  @pytest.mark.parametrize("backend", ["dataclass", "pydantic"])
769
775
  def test_typed_lexical_lists(tmp_path, backend):
770
- schema = pathlib.Path(__file__).resolve().parents[3] / "research/fixtures/list_simple_types.xsd"
776
+ schema = pathlib.Path(__file__).resolve().parents[3] / "tests/fixtures/conformance/list_simple_types.xsd"
771
777
  subprocess.run(
772
778
  [
773
779
  str(_get_polyxml_bin()),
@@ -801,7 +807,7 @@ def test_typed_lexical_lists(tmp_path, backend):
801
807
  @pytest.mark.parametrize("backend", ["dataclass", "pydantic"])
802
808
  def test_named_lexical_list_item_constraints(tmp_path, backend):
803
809
  schema = (
804
- pathlib.Path(__file__).resolve().parents[3] / "research/fixtures/restricted_list_items.xsd"
810
+ pathlib.Path(__file__).resolve().parents[3] / "tests/fixtures/conformance/restricted_list_items.xsd"
805
811
  )
806
812
  subprocess.run(
807
813
  [
@@ -839,7 +845,7 @@ def test_named_lexical_list_item_constraints(tmp_path, backend):
839
845
  def test_repeated_choice_branch_boundaries(tmp_path, backend):
840
846
  schema = (
841
847
  pathlib.Path(__file__).resolve().parents[3]
842
- / "research/fixtures/choice_branch_cardinality.xsd"
848
+ / "tests/fixtures/conformance/choice_branch_cardinality.xsd"
843
849
  )
844
850
  subprocess.run(
845
851
  [
@@ -885,7 +891,7 @@ def test_repeated_choice_branch_boundaries(tmp_path, backend):
885
891
  def test_duplicate_choice_names_validate_branch_shapes(tmp_path, backend):
886
892
  schema = (
887
893
  pathlib.Path(__file__).resolve().parents[3]
888
- / "research/fixtures/wave6/duplicate_choice_branch_name.xsd"
894
+ / "tests/fixtures/conformance/wave6/duplicate_choice_branch_name.xsd"
889
895
  )
890
896
  subprocess.run(
891
897
  [
@@ -920,7 +926,7 @@ def test_duplicate_choice_names_validate_branch_shapes(tmp_path, backend):
920
926
  @pytest.mark.parametrize("backend", ["dataclass", "pydantic"])
921
927
  def test_abstract_substitution_head_is_rejected(tmp_path, backend):
922
928
  schema = (
923
- pathlib.Path(__file__).resolve().parents[3] / "research/fixtures/substitution_group.xsd"
929
+ pathlib.Path(__file__).resolve().parents[3] / "tests/fixtures/conformance/substitution_group.xsd"
924
930
  )
925
931
  subprocess.run(
926
932
  [
@@ -958,7 +964,7 @@ def test_abstract_substitution_head_is_rejected(tmp_path, backend):
958
964
  def test_unbounded_integer_round_trip(tmp_path, backend):
959
965
  schema = (
960
966
  pathlib.Path(__file__).resolve().parents[3]
961
- / "research/fixtures/wave5/unbounded_integer.xsd"
967
+ / "tests/fixtures/conformance/wave5/unbounded_integer.xsd"
962
968
  )
963
969
  subprocess.run(
964
970
  [
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "polyxml"
7
- version = "0.41.0"
7
+ version = "0.41.1"
8
8
  description = "High-performance, polyglot XML data-binding engine built in Rust"
9
9
  authors = [
10
10
  { name = "Bailey Nguyen", email = "bailey.tan.nguyen@gmail.com" }
File without changes