Commit Graph

24 Commits

Author SHA1 Message Date
Davide Brunato bc78682fe8 Extend fn:string() to schema nodes
- Removed node_string_value(), replaced entirely by the method
    string_value() of the class XPathToken.
2019-08-13 18:06:49 +02:00
Davide Brunato aeba3aab05 Split xpath_helpers module in two parts
- Datatype conversion helpers moved fo token class
  - Node helpers moved to a new module
  - Kept boolean_value() for backward compatibility
2019-08-03 22:53:37 +02:00
Davide Brunato 46ac3a6a1c Raise err:XPST0081 for a prefix associated to no namespace 2019-05-20 13:56:02 +02:00
Davide Brunato cface8447b Fix issue #4
- Added a context manager method use_locale() to XPathToken class
  - Added an exception class ElementPathLocaleError
2019-05-19 16:24:19 +02:00
Davide Brunato 12f94db836 Update to release v1.1.7 and fix for max()/min() functions
- Fix fn:max() and fn:min() error in case of an empty sequence: now
    the error is intercepted and the functions return an empty list.
2019-04-25 16:18:34 +02:00
Davide Brunato a1506e8334 Hotfix release v1.1.5
- Fix issue #3 splitting xs:gYear type, creating an unordered base
    type XPathGregorianYear and then deriving GregorianYear10 also from
    OrderedDateTime to implement comparison operators.
  - Rewritten in the same way the remaining gregorian types, inverting
    the bases (put XSD 1.0 only types as the base).
2019-02-23 22:25:14 +01:00
Davide Brunato 808d0ef75d Closing the release v1.1.4
- Add get_primitive_type() to XMLSchemaProxy
  - Restore boolean_value() usage with an additional token=None argument
    to preserve compatibility with xmlschema v1.0.9
  - Remove XPathToken.boolean()
  - XSD_BUILTIN_TYPES sample values completed
2019-02-21 19:46:17 +01:00
Davide Brunato 5947ab6181 Rewrite schema interfaces
- Removed AbstractSchemaContext and XMLSchemaContext classes
  - Added helper method match_xsd_type() to XPathToken
  - Added abstract interfaces for XSD elements, attributes and types,
    for supporting alternative schema proxy implementations
2019-02-20 15:32:13 +01:00
Davide Brunato d7af1ff171 Add AbstractSchemaContext and XMLSchemaContext classes
- Schema context classes are used for static typing phase
  - XMLSchemaContext implement match_schema_type(self, name) method
2019-02-19 06:48:37 +01:00
Davide Brunato dcfa6209f4 Add schema to static analysis phase
- Added XPathSchemaContext class to schema_proxy.py
2019-02-15 18:44:18 +01:00
Davide Brunato b392d7534e Realize a full static analysis 2019-02-15 14:00:49 +01:00
Davide Brunato 162c18084b Merge branch 'master' of github.com:brunato/elementpath 2019-02-06 08:54:37 +01:00
Davide Brunato 9d18e4e135 Other fixes for function processing
- XPathToken.get_arguments() updated
  - compatibility_mode transformed to property
  - Other tests on functions
2019-02-05 23:34:29 +01:00
Ian Moore 153a51392c https://github.com/brunato/elementpath/issues/1 2019-02-05 15:54:27 -05:00
Davide Brunato 806c9096de Add tests/test_selectors.py 2019-02-05 13:26:42 +01:00
Davide Brunato 353b421e80 Fixes for some strings/numerical functions and div operator
- Rewrite div operator for XPath1 with IEEE 754 division by zero
  - fn:substring() rewritten
2019-02-05 11:53:27 +01:00
Davide Brunato a5d93254c5 Add fn:resolve-uri() 2019-02-04 19:22:06 +01:00
Davide Brunato 9d07120460 Add base_uri to XPath2Parser and fn:static-base-uri() 2019-02-04 16:49:28 +01:00
Davide Brunato f561cbcd5b Fix starts-with, concat and contains functions 2019-02-04 07:22:20 +01:00
Davide Brunato 8c2f07eb80 Fix for issue #1
- Add default=None argument do XPathToken.get_argument(), that
    is the default value returned in case of an empty sequence.
  - Modify the evaluate method of end-with token class, adding
    default='' to get_argument() calls.
2019-02-03 21:34:53 +01:00
Davide Brunato c03e88906f Update tests and docs
- Add 2019 to copyright information
  - Update Shphinx docs about XPath 2 status
  - Tests splitted into several modules (all tests are runned as before
    by the script test_elementpath.py or by "python -m unitest")
2019-01-12 10:28:44 +01:00
Davide Brunato bcc3a084bf Rewrite AbstractDateTime to support year > 9999
- fromstring() rewritten: now based on regex patterns
  - Added fromdatetime method to replace old __init__ version
  - __init__ arguments refactored (year, month, day, hour, minute,
    second, microsecond, tzinfo)
2019-01-06 13:36:26 +01:00
Davide Brunato d94824167f Rewrite AbstractDateTime for supporting years > 9999 2019-01-04 19:08:55 +01:00
Davide Brunato 94c991cc02 Code cleaning and documentation updated
- xpath2_parser splitted into three modules
  - Update documentation APIs
2018-12-21 22:58:31 +01:00