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
852d50c087
Add get_operands() instance method to XPathToken class
2019-08-08 09:34:55 +02:00
Davide Brunato
5ae6d0f0ff
Fix function conversion rules in XPathToken.get_argument()
...
- Added type proxy classes for XSD numeric and datetime data
- Added tests for 'mod' operator token
2019-08-08 06:55:22 +02:00
Davide Brunato
9994139e17
Fix xs:decimal based datatypes validation and function converion rules
2019-08-05 17:51:33 +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
9bfdedc831
Raise a more specific error for wrong number of arguments
...
- Applied to functions and constructors
- Raises a TypeError instead of a generic SyntaxError
- Added tests for execptions in test_helpers.py
2019-05-20 11:08:49 +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
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
7539b5b0e1
Add tests for value comparison operators
...
- Remove the usage of boolean_value() helper from package, replaced
by XPathToken.boolean() helper
- Update the changelog
2019-02-21 16:06:54 +01:00
Davide Brunato
8139f86807
Fix XPath 2.0 value comparison operators
2019-02-21 12:40:17 +01:00
Davide Brunato
7d19a84c7f
Fix XSD type matching
...
- XPathToken.match_xsd_type() now returns only the type or None
- '(name)' token behaves like as a dynamic context case, returning
values only if the context item is an XSD attribute
- Code cleaning of datatypes and schema_proxy modules
2019-02-21 09:44:42 +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
1b2aaed6c0
Add schema typing to tokens
...
- Added class attribute xsd_type=None to XPathToken
- Added to '(name)' token select method (xpath1_parser.py)
2019-02-17 09:16:29 +01:00
Davide Brunato
1d72fe052d
Check and fix XPath 1.0/2.0 functions
2019-02-06 18:21:23 +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
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
1d68842d65
Close the new release v1.1.2
2019-01-30 17:01:50 +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
d94824167f
Rewrite AbstractDateTime for supporting years > 9999
2019-01-04 19:08:55 +01:00
Davide Brunato
c1478df580
Code cleaning on error management and constructors
2018-12-23 02:06:29 +01:00
Davide Brunato
3c286e9c83
Add cast method to constructors and revise error generation
...
- Add xpath_error helper method to exceptions module
2018-12-23 00:08:15 +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
Davide Brunato
44b06dddc0
Add fn:avg, fn:max and fn:min functions
2018-12-21 19:15:12 +01:00
Davide Brunato
390c854afc
Implement fn:compare (partially) and fn:codepoint-equal
2018-12-20 07:19:12 +01:00
Davide Brunato
8d6541289f
Complete adjust time/date functions
...
- Code refactoring for some XPathToken helper methods
2018-12-10 22:55:51 +01:00
Davide Brunato
2ecd30f6b3
Fix constructor decoding
...
- Added 'cls' argument to XPathToken.get_argument() to check
decoded value types.
- Avoiding token aggregation.
2018-12-06 14:46:05 +01:00
Davide Brunato
3233520e5b
Add AbstractDateTime class and subclasses for XSD date/time values
2018-12-05 22:03:39 +01:00
Davide Brunato
97076c10bd
Add functions for extracting properties from xs:dateTime/date/time
2018-12-04 19:43:33 +01:00
Davide Brunato
bf382bf530
Add tzinfo implementation for XSD timezones
2018-12-02 10:05:03 +01:00
Davide Brunato
229d373a9b
Add xs:dateTime and similar tokens
2018-11-19 22:47:33 +01:00
Davide Brunato
0d359b6ada
Add XPathTokenTest class to tests
2018-11-17 16:30:33 +01:00
Davide Brunato
ea79f99972
Add 'datetime' method to XPathToken
2018-11-17 10:11:34 +01:00
Davide Brunato
29dbec0d81
Implement QName related functions
...
- XPathToken.error method now return an error instance
2018-11-15 08:53:17 +01:00
Davide Brunato
bee09becf0
Define fn:error function
2018-11-14 07:20:07 +01:00
Davide Brunato
39c5997bff
Added XSD numerical builtin types
2018-11-13 16:58:31 +01:00
Davide Brunato
b7ccdc1439
Improve error management
...
- ElementPathError extended with three arguments, for managing
of simple errors and also of token generated errors.
- Add error helper method to XPathToken class.
2018-11-13 14:06:39 +01:00
Davide Brunato
9c3c5e96cc
Add ElementPathMissingContextError exception
...
- Added fn:string-join()
- Other string functions added but not implemented
2018-03-31 13:52:43 +02:00
Davide Brunato
38c65b076e
Refactor XPathToken.get_argument() and add fn:encode-for-uri()
2018-03-31 09:18:43 +02:00
Davide Brunato
046e6d5c2f
Fix README.rst headers and add 2 functions
...
- Substituted # with * in the main header of README.rst
- Implemented 'codepoints-to-string' and 'string-to-codepoints'
2018-03-30 21:58:52 +02:00
Davide Brunato
df8582f3a6
Add QName parsing extension enabled by an additional parser's argument
2018-03-27 17:19:28 +02:00
Davide Brunato
0946df51f1
Fix attribute() node kind selector
2018-03-26 07:24:13 +02:00
Davide Brunato
209257ceaf
Start context rewrite in order to fix default axis handling
2018-03-24 07:07:12 +01:00
Davide Brunato
0b27073f9b
Implement 'treat as'
2018-03-23 10:47:17 +01:00
Davide Brunato
9c21e279bd
Modify Token tree representation
2018-03-23 07:13:54 +01:00
Davide Brunato
2151fcc329
Add source property to Token class
2018-03-23 05:57:52 +01:00
Davide Brunato
97c0a520f1
Add XML Schema bindings
...
- schema-attribute() added
- schema-element() added
- tests for "to" range
2018-03-22 13:24:06 +01:00
Davide Brunato
9f3a4757d9
Change select's context argument to optional with None as default
2018-03-22 06:43:02 +01:00
Davide Brunato
6f697433d7
Implement namespace axis tests
...
- Added DEFAULT_NAMESPACES to XPath1Parser and XPath2Parser
2018-03-20 17:59:22 +01:00
Davide Brunato
c0d853eee2
Implement general comparison
...
- Added iter_comparison_data() to XPathToken class
- Added tests for comparison operators
2018-03-20 14:54:07 +01:00
Davide Brunato
489c59e52f
Implement string and typed value
...
- Added UntypedAtomic class to xpath_token.py
- Renamed function node_value to node_string_value
- Improving tests
- Code cleaning
2018-03-16 11:45:45 +01:00