Commit Graph

  • 6c228d29a6 Bump xmlada version to 4.1w Olivier Ramonat 2010-10-14 09:27:54 +00:00
  • 40a5e824ce Bump version to 4.0 xmlada-4.0 Olivier Ramonat 2010-10-14 09:24:54 +00:00
  • 66a567e78a (Process): properly reset the final state Added test that a nested NFA can override events from the superstate J302-043 gprbuild-1.5 gnat-6.4-gcc-41 gnat-6.4 Emmanuel Briot 2010-09-22 14:39:18 +00:00
  • 84021630ab (Dump): review dot output. In particular, nested automata are only displayed once, not once for each node they are nested in. J302-043 Emmanuel Briot 2010-09-22 14:39:16 +00:00
  • bc2879b6d2 (Dump): new subprogram, for a Nested_NFA Emmanuel Briot 2010-09-22 14:39:15 +00:00
  • 600b3b6e15 Added support for state user data (For_Each_Active_State): new subprogram J302-043 Emmanuel Briot 2010-09-22 14:39:13 +00:00
  • bbf5be9cac (Dump): added support for dumping the state machine to "dot" format, so that we can have a graphical representation. Useful for debugging J302-043 Emmanuel Briot 2010-09-22 14:39:12 +00:00
  • 5536bef29b Minor cleanup (Final_Status): new type Emmanuel Briot 2010-09-22 14:39:10 +00:00
  • 09c2fad0f5 (Dump): minor cleanup in the output (more compact now) Emmanuel Briot 2010-09-22 14:39:07 +00:00
  • c1df924552 (Sax.State_Machines): added support for hierarchical state machines For J302-043 Emmanuel Briot 2010-09-20 13:17:41 +00:00
  • 465a18fea5 (Sax.State_Machine): new package Needed for J302-043 (implementation of schema reader and later XPath) Emmanuel Briot 2010-09-20 13:17:39 +00:00
  • 9ca921c90f Added missing file Emmanuel Briot 2010-09-02 06:33:27 +00:00
  • 149a6cbb71 Disable two tests that rely on filesystem case-insensitivity, and therefore resulted on different results on Windows and MacOS J831-006 Emmanuel Briot 2010-09-01 13:07:33 +00:00
  • 189c21d06b Cleanup handling of debug output: all functions that do the output are now shared in schema.ads itself, rather than split in several packages. In particular, this allows all output functions to take into account the indentation, and do colored output in more packages Emmanuel Briot 2010-09-01 13:07:27 +00:00
  • 425050aced (Incomplete_Encoding): new exception J818-003 Emmanuel Briot 2010-08-31 09:46:19 +00:00
  • b639a6f7c0 (Validate_Characters): for a restriction, we need to reset the mask every time, so that we check all facets for all types. Fixes regressions on sparc-solaris J831-006 Emmanuel Briot 2010-08-31 08:59:38 +00:00
  • 7693bb382c Back out the two previous changes, in particular the one that says ``Use Equal instead of "=" ...'', because the "=" is not actually illegal in Ada 2012, and the compiler has been fixed to accept this code. Bob Duff 2010-08-06 15:56:52 +00:00
  • 83f27fccd7 Minor reformatting Bob Duff 2010-08-05 14:11:27 +00:00
  • 557c2345d9 Use Equal instead of "=" in generics, so it is legal in Ada 2012. See AI-123. Bob Duff 2010-08-05 00:40:36 +00:00
  • ae9c3538e1 (Get_Tag_Name): fix improper renaming Emmanuel Briot 2010-07-06 12:33:11 +00:00
  • 4ba4e80c09 Make sure XML/Ada can be compiled with the ravenscar profile J610-021 Emmanuel Briot 2010-06-29 12:42:35 +00:00
  • a059ea01e9 Use the proper symbol for creating Node_Record. Pascal Obry 2010-06-14 16:11:07 +00:00
  • a0925fadd8 (Create_Document): the symbol table parameter is now optional, for backward compatibility. In exchange, a few subprograms (introduced since the last release of XML/Ada) require an additional symbol table parameter, to ensure the table in which Symbols are defined lives at least as long as the document. Without this, the symbols would be allocated in the parser's symbol table, which could be different from the document's, and be freed much earlier, resulting in Storage_Error. Should fix J606-001 Emmanuel Briot 2010-06-10 15:50:46 +00:00
  • 4e98965e99 (Create_Document): Temporarily revert previous checkin, and keep the symbols parameter optional for ease of use. There is a risk that users do not set it to the same value as from the parser, in which case that could result in a Storage_Error if the table from the parser is destroyed first (since we keep some of its symbols in the tree). Need more time to think about the design J606-001 Emmanuel Briot 2010-06-07 08:32:29 +00:00
  • d57ffadde3 (Create_Document): make the symbols parameter mandatory. J606-001 Emmanuel Briot 2010-06-07 08:09:36 +00:00
  • 2c2c64e3b7 Ignore *.dll Pascal Obry 2010-06-06 18:24:47 +00:00
  • 7442255ec7 DOM reader is now based on Sax_Reader than Sax. This removes the need for creating instances of Sax.Attributes.Attributes, thus saving time, memory and calls to malloc() memcpy goes from 8_021_966 down to 6_762_868 No change in malloc Emmanuel Briot 2010-06-03 15:49:22 +00:00
  • 4471e21edf (Shared_Strings): remove support for shared strings in DOM, since they have now been replaced by the use of symbols directly at the SAX level. These symbols are thus shared between all modules (SAX, DOM and Schema) rather than just DOM, and thus we improve efficiency in all cases Emmanuel Briot 2010-06-03 15:49:19 +00:00
  • 115840d464 Minor style fix (renamed entities) Emmanuel Briot 2010-06-03 15:49:17 +00:00
  • 6ef2b6aeb4 Restore previous baselines for the tests: some previous check in (r159312) broke the error messages for errors related to dates, but that went unnoticed Emmanuel Briot 2010-06-03 15:49:15 +00:00
  • 3a44900240 Ignore files generated for the doc Emmanuel Briot 2010-06-03 15:49:13 +00:00
  • 272aaead9d (Reset): new subprogram It is now possible to preserve the schema-for-schema grammar between two uses, thus resulting in major savings in the number of calls to malloc at least in the Schema testsuite, but also potentially for some users. malloc calls go from 20_956_184 to 7_165_6122 on schema testsuite memcpy calls go from 14_414_817 to 10_697_196 Emmanuel Briot 2010-06-03 15:49:10 +00:00
  • e15a9a1aeb (Set_Symbol_Table): will force another lookup of the symbols the next time Initialize_Symbols is called, since they might have different values in the next table. Emmanuel Briot 2010-05-21 08:23:33 +00:00
  • 5068aa8404 Added entry for the optimizations work Emmanuel Briot 2010-05-21 08:23:32 +00:00
  • f58ffa5c93 Use symbols also for enumerations No need for To_QName when validating attributes, the hash table is implemented with symbols instead, which saves calls to memcpy We are now down to 14_414_817 calls to memcpy (from 25_000_000), and to 20_956_184 calls to malloc (from 21_542_000) Emmanuel Briot 2010-05-21 08:23:30 +00:00
  • 78d739f068 Use symbols in the schema validators for efficiency, instead of Byte_Sequence_Access. This removes lots of calls to malloc(), and provides a better basis for using a NFA to do the validation later on On the schematestsuite, we go from 34_026_256 calls to memcpy down to 24_978_092, and from 27_513_699 calls to malloc down to 21_542_705 J302-043 Emmanuel Briot 2010-05-20 16:25:15 +00:00
  • a51b0c8741 (Sax_Reader): new class This class acts as the ancestor of Reader, but provides much more efficient callbacks. In particular, we directly pass symbols rather than strings (so that the user doesn't have to do it too, and that will speed up validation and DOM creation eventually), and we do not create a Sax.Attributes.Attributes list systematically, thus saving on system calls. Emmanuel Briot 2010-05-20 16:25:09 +00:00
  • f51cf661ec J325-027 has been merged in 3.2 branch Olivier Ramonat 2010-05-19 10:14:18 +00:00
  • 73455b3bf7 Bump version number to 3.2.1 xmlada-3.2 Olivier Ramonat 2010-05-19 10:12:32 +00:00
  • 0a74a49a80 Force "gnatmake -p", in case the object and lib directories do not exist in the package we send customers. From J325-027 Olivier Ramonat 2010-05-19 10:12:22 +00:00
  • 95915e9091 Save some calls to Find_Symbols and Get_Symbols, for greater efficiency J302-043 Emmanuel Briot 2010-05-18 14:47:30 +00:00
  • b160cb5f7b (Get_Index): put back a version with only a local_name for backward compatibility. Fixes build failure in GPS Emmanuel Briot 2010-05-18 14:32:14 +00:00
  • 42a2138a70 Use symbols for the value of attributes too, which reduces the number of mallocs (from 481_421 down to 462_180 on the DOM testsuite) Emmanuel Briot 2010-05-18 14:32:12 +00:00
  • c4a87dd1d2 (htables): avoid malloc for the first element in each bucket. In the DOM testsuite, goes down from 489_000 to 481_000 allocations Emmanuel Briot 2010-05-18 13:57:14 +00:00
  • 6891878505 (Htables): now only accepts constrained elements, which limits the number of required calls to malloc (from 501_000 to 489_000 for the dom testsuite) Emmanuel Briot 2010-05-18 13:57:13 +00:00
  • 0c33c48b5f (Tmp_Attribute): now use this new type to store attribute definition from the DTD, and to store attributes temporarily until we are able to resolve the namespaces correctly. This is more efficient (less calls to malloc in particular, and using symbols rather than string_access), does not abuse the Sax.Attributes API (we used to store the prefix as a temporary URI, which was confusing), and gives a place to store the location of the attribute declaration, for more precise error messages. This is also in preparation for using symbols more extensively in the context of attributes, thus reducing the number of memory allocations. (Token_Location): new type In some cases, and because we store instances of these in the temporary attributes, we are able to pinpoint more precisely an error message (on the declaration of the attribute, rather than the end of the start tag) (Fatal_Error, Error): now take a Token_Location as parameter Emmanuel Briot 2010-05-18 13:57:10 +00:00
  • f49e2d8d64 (XML_NS): moved to sax-utils. This is in preparation for two other changes: using symbols for attributes too, and deriving from XML_NS in the schema parser (rather than XML_Grammar_NS) for greater efficiency. Checking for valid IRIs (in particular for namespaces) depends on the version of XML, since 1.0 and 1.1 do not authorize the same character set). J302-043 Emmanuel Briot 2010-05-17 14:46:56 +00:00
  • 4e73dd45dc Use a symbol table to store strings, to avoid string comparisons and speed up the parsing J302-043 Emmanuel Briot 2010-05-17 14:46:53 +00:00
  • ebb76ccdac (Check_URI): fix incorrect test for URI (regression in recent checkins) fixes nightly build failure Emmanuel Briot 2010-05-17 08:21:53 +00:00
  • a6d22e1461 Further optimization: reduce the number of calls to malloc() Remove support for Set_Debug_Name, which requires extra mallocs but is not very useful for debugging purposes now. J302-043 Emmanuel Briot 2010-04-23 09:10:58 +00:00
  • d534296336 (Element): Avoid extra memory allocation for the namespace More efficient J302-043 Emmanuel Briot 2010-04-23 09:10:54 +00:00
  • 0b6d21d92b (Find_NS, Find_NS_URI): remove extra Context parameters, useless in fact J302-043 Emmanuel Briot 2010-04-23 09:10:51 +00:00
  • 8b41190bf5 (Start_Element): avoid comparing strings for Namespace_URI, and use XML_Grammar_NS instead. This is much faster J302-043 Emmanuel Briot 2010-04-23 09:10:47 +00:00
  • ccfb24db7f Error messages upon validation error are no longer reported as part of the exception message (which would limit their length). This also removes a number of cases where two file locations were displayed in the error message (a .xml and a .xsd file). (Get_Error_Message): new subprogram to get the full error message J302-043 Emmanuel Briot 2010-04-23 09:10:42 +00:00
  • 690416c097 (Validation_Error): now requires a Validating_Reader as parameter. This required a significant refactoring, but in particular cleaned up the use of Validation_Context (now removed), where we were using a Unrestricted_Access. This also provides future support for longer error messages (since exception_message is limited to short messages), and to avoid so many exception raises No change to the testsuite J302-043 Emmanuel Briot 2010-04-21 18:09:21 +00:00
  • befd1655da Bump version number to 4.0w, since there are some incompatible changes in the API J302-043 Emmanuel Briot 2010-04-20 14:25:50 +00:00
  • ce5b3ab2b3 (Set_Created_Grammar, Set_Validating_Grammar): merged into Set_Grammar (Get_Created_Grammar): renamed to Get_Grammar J302-043 Emmanuel Briot 2010-04-20 14:20:28 +00:00
  • 1cdeb90e54 Various cleanup in the use of grammars. Setting the XSD version is now done directly on the grammar, not as a feature of the reader J302-043 Emmanuel Briot 2010-04-20 14:20:24 +00:00
  • 7bcde57a9c Flag some invalid attribute combination in the declaration of <attribute> J302-043 Emmanuel Briot 2010-04-19 10:24:05 +00:00
  • 73833d4856 Comparison of enumeration values should be type dependent: a float "1.0" should match a float "1" (and likewise for other simple types) J302-043 Emmanuel Briot 2010-04-19 09:57:19 +00:00
  • 4fc9aab89a Allow a larger range of characters in URI, as per RFC 3987 J302-043 Emmanuel Briot 2010-04-19 09:42:28 +00:00
  • 6b8868f8cf (Check_Replacement): get the "block" attribute either from the element declaration, or, if there is none, from the type itself. J302-043 Emmanuel Briot 2010-04-19 09:42:25 +00:00
  • 10e81eac8b In regexps, \w should include some of the signs, like "`". This is really just to pass additional tests here, since the full set of supported signs depends on Unicode J302-043 Emmanuel Briot 2010-04-16 18:21:58 +00:00
  • 1073f864b5 "fixed" specifies the value of the element or attribute, not its exact string. The interpretation depends on the type of the element or attribute J302-043 Emmanuel Briot 2010-04-16 18:21:53 +00:00
  • ba69e37dce Implement constraint 3.4.6.5 for type substitutions (when a restriction or extension is actually valid) J302-043 Emmanuel Briot 2010-04-16 14:43:05 +00:00
  • 80312be752 Cleanup implementation for "block" When an attribute "block" is specified, even if empty, this overrides the blockDefault of the schema J302-043 Emmanuel Briot 2010-04-16 11:22:31 +00:00
  • b2652994a2 When we have multiple <anyAttribute> in a <complexType>, they must all match J302-043 Emmanuel Briot 2010-04-16 11:22:28 +00:00
  • 97a8d9524c Allow values "list" and "union" for the "final" attribute. In particular, since an extension could extend the number of valid values for an enumeration, we shouldn't check the base's enumeration if the extension also defines one. <import> does not require schemaLocation and namespace, these attributes are in fact optional. J302-043 Emmanuel Briot 2010-04-16 09:40:18 +00:00
  • baf86ddd92 Added declaration of NOTATION type J302-043 Emmanuel Briot 2010-04-16 09:40:14 +00:00
  • 424a579084 Unsupported: regexps with character class difference [...-[..]] J302-043 Emmanuel Briot 2010-04-16 09:40:12 +00:00
  • 44a744a87f Wrap regexps in ^(...)$ (ie add parenthesis) to avoid subtle failures when the regexps is ...|... (or the anchors are only applied to each side of the alternative, not as a whole) J302-043 Emmanuel Briot 2010-04-16 09:40:09 +00:00
  • 8cc3bb9c72 Fix comparison of "-0" and "0" J302-043 Emmanuel Briot 2010-04-16 09:40:06 +00:00
  • d431ef08fd All elements are nillable by default (the default was set incorrectly) J302-043 Emmanuel Briot 2010-04-16 09:40:03 +00:00
  • 182d24bdec A few more cases of regexps with unicode (unsupported) which were not properly detected J302-043 Emmanuel Briot 2010-04-15 16:02:53 +00:00
  • 85728672de Fix parsing of "duration" types when the number of hours is greater than 24 J302-043 Emmanuel Briot 2010-04-15 15:53:30 +00:00
  • 9b5a6a78df Two attributes with same basename, but different namespaces: the second one was never validated J302-043 Emmanuel Briot 2010-04-15 15:29:18 +00:00
  • 85f22d36a7 A "prohibited" attribute might still be accepted through a <anyAttribute> if there is one in the same element J302-043 Emmanuel Briot 2010-04-15 14:39:03 +00:00
  • c728a4e2e4 The "fixed" value for an element must match the type from xsi:type J302-043 Emmanuel Briot 2010-04-15 14:13:32 +00:00
  • 304faa79a3 Should normalize whitespaces in xsi:type (since this is done too late automatically otherwise) J302-043 Emmanuel Briot 2010-04-15 14:13:28 +00:00
  • 2154911b2d An element with no matching <element> in the grammar but with a xsi:type should be valid J302-043 Emmanuel Briot 2010-04-15 11:26:01 +00:00
  • 4280e1ea66 Remove unneeded code J302-043 Emmanuel Briot 2010-04-15 10:37:35 +00:00
  • 16dfedba1d (Create_Facet_Description): Removed, since we can use Get_Facets directly in fact. This is still not the full implementation for facets, though, since facets inherited from the base type in a restriction should still be taken into account. J302-043 Emmanuel Briot 2010-04-14 15:57:11 +00:00
  • eade0084b7 Create the default type using the standard Add_Facet interface This is in preparation for changing the handling of facets J302-043 Emmanuel Briot 2010-04-14 15:50:28 +00:00
  • f600d185c0 Missing whitespace normalization in some cases (in particular with restrictions, where the facets are both from the base and the restriction itself) J302-043 Emmanuel Briot 2010-04-14 15:50:25 +00:00
  • bb120b56f3 Added extra checks for duplicate "fixed" and "default" when declaring an attribute J302-043 Emmanuel Briot 2010-04-14 15:50:22 +00:00
  • 38466f3ff9 Another fix in the handling of <anyAttribute> where they all need to match within <restriction> J302-043 Emmanuel Briot 2010-04-13 20:41:12 +00:00
  • 8b9c9d5653 When inside a <restriction>, all the <anyAttribute> must match (a "and" of them) J302-043 Emmanuel Briot 2010-04-13 20:41:06 +00:00
  • 54faa4151f Elements with a simpleType need to normalize their whitespaces J302-043 Emmanuel Briot 2010-04-13 16:32:02 +00:00
  • dd0f9f5674 Fix error when a sequence contains multiple <any> elements: the first one that failed (for instance because namespace was invalid) did not hand over control to the next J302-043 Emmanuel Briot 2010-04-13 15:49:47 +00:00
  • ac93ee004f Fix handling of targetNamespace in the context of <include>, <import> and <redefine>, where the targetNamespace should sometimes be inherited from the initial XSD Remove support for the old shell-based testsuite, we now always use the W3C XML files Rename schema-schema_grammar.adb to schema-validators-xsd.adb, and keep this as private J302-043 Emmanuel Briot 2010-04-13 15:49:43 +00:00
  • 77b33cd6dc Fix handling of "namespace" for <anyAttribute>, which should be able to specify multiple namespaces. J302-043 Emmanuel Briot 2010-04-12 11:59:10 +00:00
  • 0339ff4592 When terminating a <choice>, make sure that nested sequences or choices are properly terminated. This will properly raise an error when we are missing elements J302-043 Emmanuel Briot 2010-04-12 09:59:45 +00:00
  • 50a44c0c5b When using xsi:type, we still need to check the "fixed" value of the parent type J302-043 Emmanuel Briot 2010-04-12 09:59:42 +00:00
  • 4733238133 Disable <redefine> temporarily, since the implementation resulted in infinite loops in some cases J302-043 Emmanuel Briot 2010-04-12 09:59:36 +00:00
  • 7253b0ac3a Fix various incorrect issues with restrictions and mixed types. In particular, restrictions should never check the base type's elements, since they are supposed to redefine the subset of the elements that they actually accept J302-043 Emmanuel Briot 2010-04-12 09:59:29 +00:00
  • fa2477cf50 "mixed" attribute is not inherited by restrictions J302-043 Emmanuel Briot 2010-04-12 09:59:21 +00:00
  • 190d2ba959 Added handling of "final" for types, ie prevent restrictions or extensions based on the value for this attribute J302-043 Emmanuel Briot 2010-04-08 09:09:35 +00:00
  • 255ca6c4e5 A restriction should not inherit wildcard attributes from its base type Various fixes to the schema grammar, with incorrect uses of restrictions instead of extensions J302-043 Emmanuel Briot 2010-04-08 09:09:30 +00:00
  • bb39c5ed83 Length facets should always match for QName J302-043 Emmanuel Briot 2010-04-07 16:26:41 +00:00
  • 61e2b844b1 Raise XML_Not_Supported exception for various cases of regexp that use unsupported features (in particular unicode) J302-043 Emmanuel Briot 2010-04-07 16:26:36 +00:00