Commit Graph

271 Commits

Author SHA1 Message Date
Fabien Chouteau
512a7fc92d Rename shared.gpr into xmlada_shared.gpr
For the same reason as the external variables, shared.gpr can be a
source of conflict between different projects. For instance with AWS.

This change has no impact on the installation since shared.gpr is not
provided in the installation.

Part of T715-030.

Change-Id: Ie0ac01a23c34981b75055fbe8a45db9cc50a581f
2020-08-07 19:30:24 +02:00
Pascal Obry
e5bbafed1e Minor reformatting.
Change-Id: I1d87406224879e4506d9bf8b3f67f8b8b40cfacb
2020-04-24 12:43:32 +02:00
Fedor Rybin
0da85043e9 Hide warnings of overlapping actuals
for T316-004

Change-Id: Ib32e369a50ff7b29514447ec20f761e28f48518f
2020-03-17 20:53:42 +03:00
Dmitriy Anisimkov
ecf9daa284 Fix Is_Valid_Base64Binary routine
S823-015

The character code in base64 encoding preceding the terminating '='
must be a multiple of 4. This change fixes situation where this
character could be any base64 character, which could happen when
one-but-last character code was a multiple of 16.

Change-Id: I9fe4fb266d07e127e9e64be9404571a91b32bcdb
2019-08-24 17:27:59 +02:00
Fedor Rybin
8a4b2bf477 Reduce the SAX parser symbol hash table size
Reduce the SAX parser symbol hash table size
from 65536 entries to 1024.

This comes from the GitHub pull request #6
TN: R215-022

Change-Id: I6790ad5b00dde563833cbe6493c57e68caba0ea3
2018-04-20 16:34:14 +03:00
Fedor Rybin
49bc5b1fb6 make xmlada No_Exception_Registration friendly
for R305-035

Change-Id: Iebc0bb83f54a1b5b39ba053e50eb9bc721bfab85
2018-03-07 01:40:52 +03:00
Stephane Carrez
0b71a29380 Reduce the symbol hash table size from 65536 entries to 1024 to reduce
memory usage of the parser but also to speed up its initialization due
to cache issues.  During Sax parser initialization, the 2Mb hash table
is cleared which fills up the cache for nothing.  By reducing the hash
table to 1024, the hash table is reduced to 32kb hence leaving less
pressure on the cache.
See https://blog.vacs.fr/vacs/blogs/post.html?post=2013/03/02/Optimization-with-Valgrind-Massif-and-Cachegrind
2018-02-04 22:31:35 +01:00
Emmanuel Briot
55770ceb78 Fix handling of minOccurs > 1 on some elements
Q119-022

Change-Id: Id9d3e4da9c644971886a38e34d26a2cf7c4e48e7
2017-01-19 16:34:03 +01:00
Emmanuel Briot
53dc51bf5c Update copyright notices
Change-Id: Iae1283292b460ead48dedc565d6f24259e497e69
2017-01-03 10:02:38 +01:00
Emmanuel Briot
a685dd2dfc Normalize XSD path to avoid duplicate parsing
When a XSD file is referenced via a relative path with symbolic links
or "." and "..", it could be parsed several times, possibly resulting
in errors like duplicate IDs.

P801-022

Change-Id: I7e12b67e3018b3fc3aeeccb5c428c9aea14dfa39
2016-08-17 12:12:44 +02:00
Emmanuel Briot
0d89040fe6 Fix handling of <choice> with elements with maxOccurs
If a <choice> has two or more elements with a maxOccurs property,
they will allow a mix of the elements, when it should only allow a
repeat of one of the elements.

The simple fix to the state machine is in schema-schema_readers.adb.
But this change resulted in a regression in the testsuite, when one
of the elements in the <choice> is a <any>. At this point, we are
trying to replace the states in the state machine, but did not
properly chain them, and therefore some states accessible via
empty transitions were not properly accessible.

The order of suggested elements in error messages was reversed in
some cases, but the error message is still value, so adjust the
baseline.

P621-020

Change-Id: I1cfb58e2fd45cfd0fc1660fa8727ab679543ba5b
2016-06-23 13:50:48 +02:00
Emmanuel Briot
1184d97d88 Add support for unicode 8 names
Contributed by Nicolas Boulenguez (nicolas at debian.org)

Remove the old convert.pl that had been used to import the old list of
names, and replace with a full-Ada importer instead.
Import all names from the Unicode 8 standard.

Change-Id: I03bfa4d0ff769abc8a3b2e23149e1b745f3a8f10
2016-06-02 10:53:20 +02:00
Emmanuel Briot
a56a0902a9 Fix memory leaks while validating invalid XML schemas
L328-026

Change-Id: Ic49c17e2d275861131178506fd55d07bd2d8f412
2016-02-17 18:02:08 +01:00
Emmanuel Briot
1262b6c064 Update copyright headers to 2016
Change-Id: I70135cb5146de304f14587d1a518c94e804a8e6c
2016-02-17 18:02:07 +01:00
Emmanuel Briot
63b47c6599 Reorganize testsuites
Move all the */test/ directories to tests/*
Move all tests that potentially contain customer code or data to tests/adacore
 These will be moved to a separate git repository

Part of O527-038

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@240170 936e1b1b-40f2-da11-902a-00137254ae57
2015-07-09 15:17:03 +02:00
Emmanuel Briot
44bb12c67c The tests can now be run outside of the build directory.
To run the tests, we no longer need to have run "make" first.
Instead, "make test" requires: shared.gpr and the W3C tests, and will
only recompile the sources found in */test/*, not the code of XML/Ada itself.
So will "make run_test".
A new target "run_test_and_setenv" was added for developers who need to
test the local build.

NA17-039

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@233386 936e1b1b-40f2-da11-902a-00137254ae57
2014-10-20 10:03:11 +00:00
Pascal Obry
d214ac70ea Rework the XMLAda build and install procedure.
An aggregate project is now used to build XMLAda. The builder is now
gprbuild and the installation is conducted by gprinstall. This has
permitted a large clean-up of the makefile.

For N403-037.

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@232625 936e1b1b-40f2-da11-902a-00137254ae57
2014-09-24 07:47:03 +00:00
Emmanuel Briot
55e8c289e0 (Create_Attribute_List): fix error where the URI can be null in
some cases when not validating. This is when deriving from the
 Sax.Readers.Reader type.
N109-044

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@221780 936e1b1b-40f2-da11-902a-00137254ae57
2014-01-10 09:55:07 +00:00
Emmanuel Briot
317d5a7903 Fix compiler warnings in Debug mode
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@221777 936e1b1b-40f2-da11-902a-00137254ae57
2014-01-10 09:05:34 +00:00
Emmanuel Briot
67fb7dd10e Update copyright notices to 2014
N103-019

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@221486 936e1b1b-40f2-da11-902a-00137254ae57
2014-01-06 10:27:30 +00:00
Emmanuel Briot
bc073d4bd1 (Parse_Start_Tag): depending on the code generation strategy of the
compiler, it is possible that the variable Parser.Attributes has
 been freed but not updated when the hook returns with an exception.
Fixes error in M903-043

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@217933 936e1b1b-40f2-da11-902a-00137254ae57
2013-10-23 14:23:11 +00:00
Emmanuel Briot
b531cd91e8 (Utf8_Next_Char, Utf8_Length, Utf8_Prev_Char, Utf8_Get_Char,
Utf8_Find_Next_Char): new subprograms
(Is_Valid_Name_Char, Is_Valid_Name_Startchar): minor optimization by
 using lookup tables.
MA08-027 and MA04-050

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@216794 936e1b1b-40f2-da11-902a-00137254ae57
2013-10-08 13:49:30 +00:00
Emmanuel Briot
f0d2f6b9c2 (Allow_Relative_IRI_Feature): new feature
For compatiblity with older XML documents, XML/Ada can now be set up
 to allow relative URI when declaring namespaces.
M916-017

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@215831 936e1b1b-40f2-da11-902a-00137254ae57
2013-09-17 15:03:07 +00:00
Emmanuel Briot
5ab6cd209f Avoid the use of "null" with anonymous access type, which is rejected
by the compiler in some cases
Fixes nightly run on caen:
schema-validators.ads:285:04:instantiation error at sax-state_machines.adb:1934
schema-validators.ads:285:04:null cannot be of an anonymous access type

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@213799 936e1b1b-40f2-da11-902a-00137254ae57
2013-08-07 07:10:12 +00:00
Emmanuel Briot
8c176c38bc Include the value of default attributes in the SAX and DOM events
when they are specified in the XSD file.
M325-034

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@204783 936e1b1b-40f2-da11-902a-00137254ae57
2013-03-26 10:28:13 +00:00