tx
14 years agoFixed filename for tx-prompt in MANIFEST master
Frédéric Jolliton [Wed, 12 Apr 2006 20:48:29 +0000 (22:48 +0200)]
Fixed filename for tx-prompt in MANIFEST

14 years agoSwitched to distutils.
Frédéric Jolliton [Wed, 12 Apr 2006 17:56:58 +0000 (19:56 +0200)]
Switched to distutils.

14 years agoFixed / overloading when enabling true division. frederic@jolliton.com--2005-main,tx--main--0.1
Frederic Jolliton [Wed, 1 Mar 2006 08:32:37 +0000 (08:32 +0000)]
Fixed / overloading when enabling true division.

 * When importing division from __future__ the / operator become
   __truediv__ instead of __div__. Node now handle both of them. This
   operator is overloaded to provide a "nicer" XPath access.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-52

14 years agoUpdated documentation. Added restrictions when setting $current in tx-prompt.
Frederic Jolliton [Wed, 1 Mar 2006 08:11:59 +0000 (08:11 +0000)]
Updated documentation. Added restrictions when setting $current in tx-prompt.

 * Updated documentation

 * Added restrictions when setting $current to ensure that the variable
   is a sequence of only 1 item in tx-prompt.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-51

14 years agoDisabled a XPath optimization. Removed bad debug code.
Frederic Jolliton [Mon, 14 Nov 2005 04:50:01 +0000 (04:50 +0000)]
Disabled a XPath optimization. Removed bad debug code.

 * Disabled the following XPath optimization:
     child::<TEST>/descendant::<TEST>[<PRED>] -> descendant::<TEST>[<PRED>]
   (which is wrong for PRED := "1" for example.)

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-50

14 years agoAdded Node.valueOf. Added deferred function inside XML tree. Fixed quotes bug.
Frederic Jolliton [Mon, 14 Nov 2005 04:16:59 +0000 (04:16 +0000)]
Added Node.valueOf. Added deferred function inside XML tree. Fixed quotes bug.

 * Added Node.valueOf which return the first item of the sequence
 returned by the xpath expression as a string.

 * Added deferred function, which is a ProcessingInstruction node that
 call a function at serialization time. This function take no parameters,
 and should return a valid XML tree fragment.

 * reCharacterToQuoteForText was defined 2 times with different values,
 causing streamXmlQuoteText to work incorrectly (suppressing ' and " from
 text string.)
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-49

14 years agoFixed -inf/+inf related tests.
Frederic Jolliton [Tue, 4 Oct 2005 08:05:58 +0000 (08:05 +0000)]
Fixed -inf/+inf related tests.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-48

14 years agoFixed <option> category (not an empty element !)
Frederic Jolliton [Tue, 4 Oct 2005 08:05:31 +0000 (08:05 +0000)]
Fixed <option> category (not an empty element !)

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-47

14 years agoAdded documentation.
Frederic Jolliton [Tue, 13 Sep 2005 07:59:02 +0000 (07:59 +0000)]
Added documentation.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-46

14 years agoUpdated install_conf for XSLT pattern new modules.
Frederic Jolliton [Tue, 13 Sep 2005 07:27:33 +0000 (07:27 +0000)]
Updated install_conf for XSLT pattern new modules.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-45

14 years agoAdded support for XSLT patterns.
Frederic Jolliton [Tue, 13 Sep 2005 07:23:40 +0000 (07:23 +0000)]
Added support for XSLT patterns.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-44

14 years agoMoved all the stuff inside xpath function to outer level.
Frederic Jolliton [Tue, 13 Sep 2005 07:18:03 +0000 (07:18 +0000)]
Moved all the stuff inside xpath function to outer level.

 * Moved all XPath grammar definitions outside xpath function to allow
   other module to access it.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-43

14 years agoClone attributes as needed. Added Node.xpath, Node.match.
Frederic Jolliton [Tue, 13 Sep 2005 07:11:21 +0000 (07:11 +0000)]
Clone attributes as needed. Added Node.xpath, Node.match.

 * Attributes are cloned when inserted in a tree if they're already part
   of another tree.

 * Added Node.xpath as canonical name to query a tree with a XPath
   expression (and with [] and / operator overloaded to call it.)

 * Added Node.match to test node against a XSLT pattern.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-42

14 years agoAdded Sequence.__contains__ so that we test nodes by identity rather than by value.
Frederic Jolliton [Tue, 13 Sep 2005 07:06:02 +0000 (07:06 +0000)]
Added Sequence.__contains__ so that we test nodes by identity rather than by value.

 * Added Sequence.__contains__ such that 'node in someSequence' return
   True if node is part of someSequence, while previously True was
   returned if a node had the same *value* (different node with same
   dmStringValue.)
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-41

14 years agoUpdated axis list to support child-or-top and attribute-or-top. Added document-node...
Frederic Jolliton [Tue, 13 Sep 2005 06:35:36 +0000 (06:35 +0000)]
Updated axis list to support child-or-top and attribute-or-top. Added document-node() test.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-40

14 years agoAdded ext:filter-by-id function.
Frederic Jolliton [Tue, 13 Sep 2005 06:27:36 +0000 (06:27 +0000)]
Added ext:filter-by-id function.

 * Added ext:filter-by-id which is equivalent to .[@id=ARG]
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-39

14 years agoDiscard None items when constructing element.
Frederic Jolliton [Tue, 13 Sep 2005 06:19:35 +0000 (06:19 +0000)]
Discard None items when constructing element.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-38

14 years agoFixed position extraction when throwing an error in parser.
Frederic Jolliton [Tue, 13 Sep 2005 06:16:14 +0000 (06:16 +0000)]
Fixed position extraction when throwing an error in parser.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-37

14 years agoAdded preserveCase keyword argument to htmltree.Parser
Frederic Jolliton [Tue, 13 Sep 2005 06:12:27 +0000 (06:12 +0000)]
Added preserveCase keyword argument to htmltree.Parser

 * Added preserveCase keyword argument to htmltree.Parser. By default,
   all element and attribute names are translated to lower case. Setting
   this keyword to True preserve cases of the names (useful for XML
   mainly.)
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-36

14 years agoUpdated HTMLParser to recognize XML element name and attribute name.
Frederic Jolliton [Tue, 13 Sep 2005 06:09:05 +0000 (06:09 +0000)]
Updated HTMLParser to recognize XML element name and attribute name.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-35

14 years agoAdded two iterators (iterChildOrTop and iterAttributeOrTop) for XSLT support.
Frederic Jolliton [Tue, 13 Sep 2005 05:57:27 +0000 (05:57 +0000)]
Added two iterators (iterChildOrTop and iterAttributeOrTop) for XSLT support.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-34

14 years agoDiscard duplicate matches. (Also "tabified" source.)
Frederic Jolliton [Mon, 12 Sep 2005 09:09:23 +0000 (09:09 +0000)]
Discard duplicate matches. (Also "tabified" source.)

 * Updated Base.parse to discard duplicate matches.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-33

14 years agoSmall enhancement to lispy function.
Frederic Jolliton [Mon, 12 Sep 2005 08:43:10 +0000 (08:43 +0000)]
Small enhancement to lispy function.

 * lispy now drop the 'u' prefix of unicode strings representation.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-32

14 years agoFixed several functions (see details.)
Frederic Jolliton [Mon, 12 Sep 2005 08:40:38 +0000 (08:40 +0000)]
Fixed several functions (see details.)

 * Updated registerFast to check return value of functions in debug mode
   (to test if they are correctly returning a Sequence.)

 * Fixed register which was creating a wrapper that was not forwarding
   parameters correctly.

 * Updated op:union (small optimization.)

 * Fixed op:intersect and op:except. They were returning wrong result
   in some cases.

 * Updated various functions to correctly return a Sequence instead of an
   item.

 * Removed some call to zeroOrMoreItem, since this was a no-op.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-31

14 years agoUpdated XPath parser to allow spaces around unary + and -.
Frederic Jolliton [Mon, 12 Sep 2005 08:03:55 +0000 (08:03 +0000)]
Updated XPath parser to allow spaces around unary + and -.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-30

14 years agoCatch AmbiguousMatch when printing syntax tree of an XPath expression.
Frederic Jolliton [Mon, 12 Sep 2005 08:01:50 +0000 (08:01 +0000)]
Catch AmbiguousMatch when printing syntax tree of an XPath expression.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-29

14 years agoUpdated XPath parser. Fixed fn:number and op:minus. Added fn:document-uri, fn:data...
Frederic Jolliton [Mon, 12 Sep 2005 04:57:30 +0000 (04:57 +0000)]
Updated XPath parser. Fixed fn:number and op:minus. Added fn:document-uri, fn:data and op:plus.

 * Update XPath parser to correctly handle op:plus (+X was same as X,
 instead of ensuring X was cast to a number.) Added fn:plus accordingly.

 * Fixed op:minus to atomize its argument as needed.

 * Fixed fn:number to return a Sequence.

 * Added fn:document-uri and fn:data.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-28

14 years agoFixed Document.dmDocumentUri()
Frederic Jolliton [Mon, 12 Sep 2005 04:53:33 +0000 (04:53 +0000)]
Fixed Document.dmDocumentUri()

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-27

14 years agoFixed one optimization.
Frederic Jolliton [Mon, 12 Sep 2005 03:23:16 +0000 (03:23 +0000)]
Fixed one optimization.

 * Fixed optimization to find descendant attributes with a predicate.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-26

14 years agoCommented out two optimizations that break predicate tests.
Frederic Jolliton [Mon, 12 Sep 2005 03:14:19 +0000 (03:14 +0000)]
Commented out two optimizations that break predicate tests.

 * Commented out two optimizations that were breaking predicate tests
   based on position():

   - descendant-or-self::node()/child::<TEST>[<PRED>] -> descendant::<TEST>[<PRED>]

   - descendant-or-self::node()/attribute::<NAME>[<PRED>] -> ext:descendant-attribute(<NAME>)[PRED]
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-25

14 years agoUpdated Node.__cmp__ to work with other types.
Frederic Jolliton [Mon, 12 Sep 2005 03:08:03 +0000 (03:08 +0000)]
Updated Node.__cmp__ to work with other types.

 * Update Node.__cmp__ to work when compared with other type.
   In such case, comparison is done according to type of both
   object, instead of comparing values.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-24

14 years agoUpdated fn:contains.
Frederic Jolliton [Mon, 12 Sep 2005 03:05:25 +0000 (03:05 +0000)]
Updated fn:contains.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-23

14 years agoAdded sort function. Added '_' variable to keep last result.
Frederic Jolliton [Mon, 12 Sep 2005 02:59:09 +0000 (02:59 +0000)]
Added sort function. Added '_' variable to keep last result.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-22

14 years agoAdded more XPath functions.
Frederic Jolliton [Sun, 11 Sep 2005 06:13:41 +0000 (06:13 +0000)]
Added more XPath functions.

 * Added support for special floats (nan, -inf, +inf)

 * Added optimization to prevent building full string representation of a
   node (using string iterator instead of dmStringValue.)

 * Several new functions.

 * Updated some functions to follow standard more closely.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-21

14 years agoAdded functions for special floats numbers. Added functions for working on string...
Frederic Jolliton [Sun, 11 Sep 2005 05:49:25 +0000 (05:49 +0000)]
Added functions for special floats numbers. Added functions for working on string iterator.

 * Added functions to test special floats numbers (NaN, +inf, -inf)
   (isNotANumber, isInfinity, isPositiveInfinity, isNegativeInfinity,
   isSpecialFloat)

 * Added some functions that can work on string and also on iterator of
   strings to:

   - compute the total length,

   - test if a string starts with another string,

   - test if two strings are equals.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-20

14 years agoClone nodes as needed. Added __cmp__ to Node. Removed dead function _getEncoder.
Frederic Jolliton [Sun, 11 Sep 2005 05:43:30 +0000 (05:43 +0000)]
Clone nodes as needed. Added __cmp__ to Node. Removed dead function _getEncoder.

 * Nodes are cloned when inserted in a tree if they're already part of
   another tree.

 * Added __cmp__ operator, which compare nodes based on string values.

 * Removed dead function _getEncoder.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-19

14 years agoBetter function arity checking. Fixed a raise statement.
Frederic Jolliton [Sun, 11 Sep 2005 05:39:30 +0000 (05:39 +0000)]
Better function arity checking. Fixed a raise statement.

 * Enhanced functionArity to return None as maximum number of parameters
   in case where the function is declared with a *args style argument.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-18

14 years agoMissing Decimal import.
Frederic Jolliton [Sat, 10 Sep 2005 23:41:19 +0000 (23:41 +0000)]
Missing Decimal import.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-17

14 years agoSequence can now be compared with a single item.
Frederic Jolliton [Sat, 10 Sep 2005 23:40:22 +0000 (23:40 +0000)]
Sequence can now be compared with a single item.

 * Update Sequence's __eq__ operator to allow comparison with a single
   item (in which case, True is returned if Sequence is of length 1 and
   its only item is equal to the specified item.)
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-16

14 years agoAdded 'parse' function to XPath prompt.
Frederic Jolliton [Sat, 10 Sep 2005 23:28:27 +0000 (23:28 +0000)]
Added 'parse' function to XPath prompt.

 * Added 'parse' function that can parse a HTML (or XML) document and
   return the corresponding document.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-15

14 years agoTags now allow nested tuple/list, including iterators, to create nodes.
Frederic Jolliton [Sat, 10 Sep 2005 23:26:48 +0000 (23:26 +0000)]
Tags now allow nested tuple/list, including iterators, to create nodes.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-14

14 years agoEnhanced encoding detection when parsing HTML (or XML) document.
Frederic Jolliton [Thu, 8 Sep 2005 03:16:59 +0000 (03:16 +0000)]
Enhanced encoding detection when parsing HTML (or XML) document.

 * Enchanced encoding detection algorithm, to check BOM, XML declaration
   and "http-equiv" meta element. Moved to misc module.

 * Fixed bug in guessXmlCharacterEncoding when passing an Unicode string
   (skip offset was missing from the return value.)
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-13

14 years agoEnsure wrappers function name are set with a non-unicode string.
Frederic Jolliton [Wed, 7 Sep 2005 23:25:14 +0000 (23:25 +0000)]
Ensure wrappers function name are set with a non-unicode string.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-12

14 years agoFixed prompt to correctly handle 8bits input.
Frederic Jolliton [Wed, 7 Sep 2005 23:22:47 +0000 (23:22 +0000)]
Fixed prompt to correctly handle 8bits input.

 * Fixed prompt to correctly handle 8bits input, such as when using
   Unicode terminal.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-11

14 years agoAdded fn:contains and fn:ends-with. Optimized fn:starts-with.
Frederic Jolliton [Wed, 7 Sep 2005 23:20:23 +0000 (23:20 +0000)]
Added fn:contains and fn:ends-with. Optimized fn:starts-with.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-10

14 years agoAdded fn:starts-with function.
Frederic Jolliton [Wed, 7 Sep 2005 21:45:23 +0000 (21:45 +0000)]
Added fn:starts-with function.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-9

14 years agoFixed attribute parsing to tolerate more bad stuff (from Google..)
Frederic Jolliton [Wed, 7 Sep 2005 21:44:20 +0000 (21:44 +0000)]
Fixed attribute parsing to tolerate more bad stuff (from Google..)

 * Fixed attribute parsing to tolerate some bad formated value
   (such as those who contains '=' character without even being
   quoted properly.)

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-8

14 years agoHandle ^C from prompt.
Frederic Jolliton [Wed, 7 Sep 2005 16:31:10 +0000 (16:31 +0000)]
Handle ^C from prompt.

git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-7

14 years agoFixed <script>/<style> element parsing.
Frederic Jolliton [Wed, 7 Sep 2005 16:27:51 +0000 (16:27 +0000)]
Fixed <script>/<style> element parsing.

 * Fixed HTML parser to wait correct ending tag for <script> and <style>
   element (previously we were stopping at the first "</" found.)
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-6

14 years agotx-prompt: Fake UserAgent by default + allow to change UserAgent at runtime.
Frederic Jolliton [Wed, 7 Sep 2005 15:53:11 +0000 (15:53 +0000)]
tx-prompt: Fake UserAgent by default + allow to change UserAgent at runtime.

 * Default UserAgent (so that testing with Google and some other sites
   works.)

 * Allow to change UserAgent at runtime by updating $ua variable.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-5

14 years agoUpdated install script to generate symbolic link.
Frederic Jolliton [Wed, 7 Sep 2005 15:46:30 +0000 (15:46 +0000)]
Updated install script to generate symbolic link.

 * Updated install script to generate symbolic link when specified in
   install_conf.py.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-4

14 years agoFixed HTML parsing when several attributes have the same name.
Frederic Jolliton [Wed, 7 Sep 2005 15:45:19 +0000 (15:45 +0000)]
Fixed HTML parsing when several attributes have the same name.

 * Fixed HTML parsing by allowing several attributes with same name.
   Only the first of such set is kept.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-3

14 years agoFix attributes with no value following '='.
Frederic Jolliton [Wed, 7 Sep 2005 15:43:05 +0000 (15:43 +0000)]
Fix attributes with no value following '='.

 * Fixed attributes parsing by allowing empty value after =.
   We return '' (empty string) instead of None previously.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-2

14 years agoFix optimization when looking for attributes with any name ('*').
Frederic Jolliton [Wed, 7 Sep 2005 13:52:06 +0000 (13:52 +0000)]
Fix optimization when looking for attributes with any name ('*').

 * Fixed extDescendantAttribute function to handle correctly attribute
   name '*'.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-1

14 years agoinitial import frederic@jolliton.com--2005-main,tx--main--0.1--base-0
Frederic Jolliton [Wed, 7 Sep 2005 13:23:34 +0000 (13:23 +0000)]
initial import

(automatically generated log message)
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--base-0