Commit Graph

264 Commits

Author SHA1 Message Date
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
Emmanuel Briot
6363ce096b Update copyright notices to 2013
M103-015

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@200406 936e1b1b-40f2-da11-902a-00137254ae57
2013-01-08 10:54:28 +00:00
Emmanuel Briot
9cc116a831 Minor clarification of comments for L923-003
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@195494 936e1b1b-40f2-da11-902a-00137254ae57
2012-09-24 10:14:45 +00:00
Emmanuel Briot
a284c6e02f Fix suffix for shared libraries on darwin and Windows (we were
hard-coding .so)

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@192267 936e1b1b-40f2-da11-902a-00137254ae57
2012-07-13 13:48:54 +00:00
Emmanuel Briot
8036117c11 Add entry in features about the license change.
Update all copyright headers to 2012, since the change of the license
 is considered as significant for the files.
KC20-003

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@183039 936e1b1b-40f2-da11-902a-00137254ae57
2012-01-03 15:07:56 +00:00
Emmanuel Briot
5befffea2b Change header to use GPL version 3
KC20-003

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@182682 936e1b1b-40f2-da11-902a-00137254ae57
2011-12-20 09:09:12 +00:00
Emmanuel Briot
d51fed727f Change the way we create the FSM for <all>.
The previous construction was creating states for all possible
 combinations of the children nodes, resulting in an explosion
 in the number of states. Through additional capabilities added
 to Sax.State_Machines, we now have data associated with each
 active state. In particular, for <all> states this is used to
 memorize which children have already been visited.
for K518-020 and KC01-028

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@182156 936e1b1b-40f2-da11-902a-00137254ae57
2011-12-08 13:31:17 +00:00
Emmanuel Briot
926409ec8d Add support for compiling with coverage information.
This is in preparation for K929-014

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@179466 936e1b1b-40f2-da11-902a-00137254ae57
2011-09-29 10:42:25 +00:00