Project

General

Profile

# Date Author Comment
11970 01/20/2014 11:33 AM Aaron Marcuse-Kubitza

moved everything into /trunk/ to create the standard svn layout, for use with tools that require this (eg. git-svn). IMPORTANT: do NOT do an `svn up`. instead, re-use your working copy's existing files with `svn switch` (http://svnbook.red-bean.com/en/1.6/svn.ref.svn.c.switch.html).

4492 09/06/2012 08:42 PM Aaron Marcuse-Kubitza

Replaced repr() with strings.urepr() (or equivalent) everywhere needed, to avoid future UnicodeEncodeErrors

4491 09/06/2012 08:30 PM Aaron Marcuse-Kubitza

Replaced str() with strings.ustr() (or equivalent) everywhere needed, to avoid future UnicodeEncodeErrors

4085 08/16/2012 08:12 PM Aaron Marcuse-Kubitza

xpath.py: parse(): _value(): Support '+' as a word character that doesn't need to be quoted

4040 08/15/2012 05:45 AM Aaron Marcuse-Kubitza

xpath.py: put_obj(): Use new get_values(), so that the returned nodes are not modified by XML tree transformations, such as those performed by xml_func.process()

4039 08/15/2012 05:43 AM Aaron Marcuse-Kubitza

Added get_values()

4026 08/15/2012 03:44 AM Aaron Marcuse-Kubitza

Removed trailing whitespace on non-empty lines

3796 08/06/2012 08:17 PM Aaron Marcuse-Kubitza

xpath.py: get(): reference expansion: Use get_1() and check for None result instead of using get(), which returns multiple nodes when we just want the first

3626 07/26/2012 07:46 PM Aaron Marcuse-Kubitza

xpath.py: path2xml(): Skip to tree created inside root, since that is how callers want to use the returned node

3330 07/11/2012 07:30 PM Aaron Marcuse-Kubitza

xpath.py: get(): Support checking all children when the elem name is '*'

3328 07/11/2012 06:44 PM Aaron Marcuse-Kubitza

xpath.py: Added is_all()

2556 06/01/2012 05:56 PM Aaron Marcuse-Kubitza

xpath.py: get(): Create attrs: Put keys last so that any lookahead assertion's path will be created last as it would have without the assertion. This ensures that any value argument of an XML function will always go last even if a lookahead assertion would otherwise have caused it to be created with the element's keys, which previously were created before the attributes.

2109 05/07/2012 09:56 PM Aaron Marcuse-Kubitza

xpath.py: get(): Create attrs: Fixed bug where attrs were created with last_only on, which caused attrs to get created multiple times if there were multiple attrs of the same name but different values, becase the last_only optimization would only check the last attr of that name

2010 04/30/2012 01:11 AM Aaron Marcuse-Kubitza

xpath.py: Added is_xpath()

2007 04/30/2012 12:35 AM Aaron Marcuse-Kubitza

xpath.py: put_obj(): Return the id_attr_node using get_1() because it should only be one node

2004 04/27/2012 06:16 PM Aaron Marcuse-Kubitza

xpath.py: put_obj(): Return a tuple of the inserted node and the id attr node

2003 04/27/2012 06:13 PM Aaron Marcuse-Kubitza

xpath.py: set_id(): When creating the id_path, use obj() (which deepcopy()s the entire path) because it prevents pointers w/o targets

2002 04/27/2012 06:05 PM Aaron Marcuse-Kubitza

xpath.py: set_id(): When creating the id_path, deepcopy() the id_elem because its keys will change in the main copy

2001 04/27/2012 05:47 PM Aaron Marcuse-Kubitza

xpath.py: set_id(): Return the path to the ID attr, which can be used to change the ID

2000 04/27/2012 05:25 PM Aaron Marcuse-Kubitza

xpath.py: put_obj(): Return the inserted node so it can be used to change the inserted value

1840 04/13/2012 10:44 AM Aaron Marcuse-Kubitza

xpath.py: get(): forward (parent-to-child) pointers: If last target object exists but doesn't have an ID attr (which indicates a bug), recover gracefully by just assuming the ID is 0. (Any bug will be noticeable in the output, which needs to be generated through workarounds like this in order to be able to debug.)

1815 04/09/2012 05:34 PM Aaron Marcuse-Kubitza

xpath.py: get(): Run xml_dom.by_tag_name() with ignore_namespace=False (possibly later set to True)

1689 03/29/2012 06:52 PM Aaron Marcuse-Kubitza

xpath.py: Added get_value() to run get_1() and returns the value of any result node

1577 03/23/2012 04:59 PM Aaron Marcuse-Kubitza

xpath.py: Added append() to recursively append subpath to every leaf of a path tree. parse(): Use append() to fix bug in split path parsing where subpath was not added to every leaf of the tree, only the main leaf of the main branch and the main leaves of the other branches of the last element.

1398 03/13/2012 05:04 PM Aaron Marcuse-Kubitza

xpath.py: parse(): Split paths: Raise a SyntaxException if can't attach a split path because there is no parent element to attach to

1352 03/11/2012 03:14 PM Aaron Marcuse-Kubitza

xpath.py: parse(): _paths(): Remove trailing ","

1350 03/11/2012 02:36 PM Aaron Marcuse-Kubitza

xpath.py: parse() Fixed bug in _paths() where empty lists would be parsed as a list containing a single empty path, instead of as an empty list

1345 03/09/2012 07:41 PM Aaron Marcuse-Kubitza

xpath.py: Import xpath_func after defining XpathElem because xpath_func depends on XpathElem and it hasn't yet been factored into a separate file

1342 03/09/2012 06:44 PM Aaron Marcuse-Kubitza

xpath.py: parse(): Run xpath_func.process() on the parsed XPath

1320 03/09/2012 03:25 PM Aaron Marcuse-Kubitza

xpath.py: Added get_1()

1294 03/06/2012 03:45 PM Aaron Marcuse-Kubitza

xpath.py: Removed unnecessary copy.deepcopy()'s and instead changed set_value() and set_id() to make copies of any elements they change. This should result in up to a 17% speed increase in the import, because deepcopy() was taking a lot of time. Added documentation to set_value() and set_id() that caller must make a shallow copy of the path to prevent modifications from propagating to other copies of the path. (Previously, a deep copy was needed, but there was no comment specifying this.)

1239 03/03/2012 01:27 PM Aaron Marcuse-Kubitza

xpath.py: get(): Added support for lookup-only elements which are not created if they don't exist

1238 03/03/2012 01:25 PM Aaron Marcuse-Kubitza

xpath.py: parse(): Added support for lookup-only elements which are not created if they don't exist

1070 02/21/2012 03:01 PM Aaron Marcuse-Kubitza

xpath.py: Added support for common subpath after split path's {}

1013 02/14/2012 06:57 PM Aaron Marcuse-Kubitza

xpath.py: get(): Fixed bug where it would try to create a node named . or .. if . or .. didn't have matching attributes. Now it will just reuse the current or parent node, but create any needed attrs if create is True.

1011 02/14/2012 06:23 PM Aaron Marcuse-Kubitza

xpath.py: Don't allow rooted attributes (doesn't make sense), in case someone tries to do elem[/rooted_attr]

1009 02/14/2012 05:43 PM Aaron Marcuse-Kubitza

xpath.py: Added get() support for references (different from pointers) to dynamically set the value of an attribute

1005 02/14/2012 04:57 PM Aaron Marcuse-Kubitza

xpath.py: get(): Go to root when empty element is encountered at the beginning of an XPath. Added allow_rooted parameter to turn off this functionality when XPaths with a leading slash should not be considered rooted.

1004 02/14/2012 04:32 PM Aaron Marcuse-Kubitza

xpath.py: Don't consider a path starting with "." to be rooted. Do this by not automatically translating an empty path name to ".".

1003 02/14/2012 04:18 PM Aaron Marcuse-Kubitza

xpath.py: Added is_rooted()

1002 02/14/2012 04:16 PM Aaron Marcuse-Kubitza

xpath.py: Added elem_is_empty()

1001 02/14/2012 04:10 PM Aaron Marcuse-Kubitza

xpath.py: Added documentation labels to each section

1000 02/14/2012 04:04 PM Aaron Marcuse-Kubitza

xpath.py: Added support for getting the parent node when encountering ".."

998 02/14/2012 03:44 PM Aaron Marcuse-Kubitza

xpath.py: get(): Renamed parent to root to better reflect that it's the starting point for the search. Calling it parent will later be confusing when we want to get the parent node using "..".

997 02/14/2012 03:31 PM Aaron Marcuse-Kubitza

xpath.py: Added parser support for attribute values that are references to another part of the XML tree

971 02/13/2012 04:35 PM Aaron Marcuse-Kubitza

xpath.py: Fixed bug where value of XPath (used for copying to other branches) is retrieved after first XPath element is popped rather than before, which can sometimes leave an empty XPath for value() to run on

892 02/07/2012 04:11 PM Aaron Marcuse-Kubitza

Replaced all type(...) == str with util.is_str(...) to properly treat Unicode objects as strings

889 02/07/2012 04:04 PM Aaron Marcuse-Kubitza

xpath.py: get(): Fixed bug where limit was not passed to recursive get() calls

887 02/07/2012 03:10 PM Aaron Marcuse-Kubitza

xpath.py: get(): Turn off last_only optimization when limit > 1

886 02/07/2012 03:07 PM Aaron Marcuse-Kubitza

xpath.py: get(): Added full support for returning multiple matches

885 02/07/2012 02:33 PM Aaron Marcuse-Kubitza

xpath.py: get(): Added basic structure for returning multiple matches. Added limit parameter to select one or many matches.

758 01/30/2012 07:08 PM Aaron Marcuse-Kubitza

xpath.py: set_id(): Deal with XPaths with an

754 01/30/2012 05:05 PM Aaron Marcuse-Kubitza

xpath.py: Allow XPath names to be quoted literals, just like values. Handle : embedded in a name (even without quotes), often indicating a namespace.

268 12/22/2011 06:39 PM Aaron Marcuse-Kubitza

Moved everything in scripts to root. inputs_Makefile: Don't run "all" when installing.

171 12/15/2011 11:31 AM Aaron Marcuse-Kubitza

xpath.py: Changed backward (child-to-parent) pointer ID abbr expansion to happen in get() when source node's tag name is known. This deals with XPath elements that are '.' being used as a pointer source.

170 12/14/2011 05:31 PM Aaron Marcuse-Kubitza

xpath.py: Moved abbr expansion code to separate function

165 12/14/2011 01:13 PM Aaron Marcuse-Kubitza

xpath.py: Changed order that main and other branches are processed in so it is consistent with the order the branches are specified in the XPath

156 12/13/2011 03:51 PM Aaron Marcuse-Kubitza

xpath.py: Allowed empty names in XPaths

155 12/13/2011 03:48 PM Aaron Marcuse-Kubitza

xpath.py: Added automatic conversion of strings to paths where needed.

154 12/13/2011 03:00 PM Aaron Marcuse-Kubitza

xpath.py: Added caching of parsed XPaths. Added automatic conversion of strings to paths where needed.

143 12/12/2011 05:38 PM Aaron Marcuse-Kubitza

Refactored xml_dom.set_value() to avoid needing a doc parameter for the XML document

141 12/12/2011 05:30 PM Aaron Marcuse-Kubitza

xpath.py: Refactored to avoid needing a doc parameter for the XML document

135 12/12/2011 03:34 PM Aaron Marcuse-Kubitza

map: Implemented DB input support for querying a single table

133 12/09/2011 05:35 PM Aaron Marcuse-Kubitza

map: Continued to add DB input support

99 12/06/2011 01:34 PM Aaron Marcuse-Kubitza

xpath.py: Created is_positive() function

97 12/06/2011 01:27 PM Aaron Marcuse-Kubitza

xpath.py: Added support for negative attribute assertions with !

95 12/06/2011 10:53 AM Aaron Marcuse-Kubitza

xpath.py: Fixed creation of attrs so it happens even when node already exists

94 12/06/2011 09:59 AM Aaron Marcuse-Kubitza

xpath.py: Added concept of keys vs attrs in XPath elem

92 12/05/2011 05:24 PM Aaron Marcuse-Kubitza

Now allow empty rows. Added support for select statement limit.

91 12/05/2011 04:17 PM Aaron Marcuse-Kubitza

Added support for quoted values in XPaths

85 12/05/2011 01:53 PM Aaron Marcuse-Kubitza

Changed VegBank mappings to use XML functions (not implemented yet) to calculate averages and ranges

83 12/05/2011 12:53 PM Aaron Marcuse-Kubitza

Changed for loops to use enumerate() where the index is also needed

82 12/05/2011 12:50 PM Aaron Marcuse-Kubitza

Moved XPath prep code (setting ID, value) to xpath.py

81 12/02/2011 05:27 PM Aaron Marcuse-Kubitza

xpath.py: Added deepcopy() before setting value of other branches to traverse

78 12/02/2011 05:10 PM Aaron Marcuse-Kubitza

xpath.py: Added basic support for split paths

77 12/02/2011 04:30 PM Aaron Marcuse-Kubitza

Merged xml_xpath.py into xpath.py in preparation for changing the XPath parse tree to be the XML DOM tree itself

76 12/02/2011 03:58 PM Aaron Marcuse-Kubitza

Refactored xpath.parse() to use a nested function instead of a class extending Parser

70 12/01/2011 01:51 PM Aaron Marcuse-Kubitza

Finished VegX-VegBank mapping and created VegBank joins of mappings to VegX

62 11/30/2011 03:55 PM Aaron Marcuse-Kubitza

Fixed xml_xpath.get() last_only optimization to handle attrs correctly. Turned off stack traces for errors intended for the user to see.

59 11/30/2011 01:25 PM Aaron Marcuse-Kubitza

map: Added support for custom fkeys to parent in db XML trees. Removed extraneous csv reader/writer config because Excel format is default. Improved documentation.

57 11/29/2011 05:33 PM Aaron Marcuse-Kubitza

map: Added more stubs for XML-XML mapping

55 11/29/2011 04:43 PM Aaron Marcuse-Kubitza

Split off xpath.py XML functionality into xml_xpath.py

46 11/29/2011 01:02 PM Aaron Marcuse-Kubitza

Renamed modules to remove _util

42 11/29/2011 12:31 PM Aaron Marcuse-Kubitza

Moved Python modules to shared lib folder

38 11/28/2011 03:16 PM Aaron Marcuse-Kubitza

data2xml: Added syntax for split paths, which map to multiple leaves

36 11/28/2011 01:51 PM Aaron Marcuse-Kubitza

data2xml: Improved syntax for XPath lookahead assertions. Changed XML printing to print multiple text nodes on separate lines.

32 11/23/2011 04:15 PM Aaron Marcuse-Kubitza

data2xml: Added support for * abbrs for backward (child-to-parent) pointers

26 11/22/2011 04:35 PM Aaron Marcuse-Kubitza

In data2xml, fixed pointer handling to deal with pointer targets that are themselves pointers

25 11/22/2011 04:01 PM Aaron Marcuse-Kubitza

In data2xml, added shortcut for lookahead assertion using ! symbol

24 11/22/2011 02:32 PM Aaron Marcuse-Kubitza

In data2xml, fixed backward (child-to-parent) pointer handling to get and set attribute values properly

23 11/22/2011 01:52 PM Aaron Marcuse-Kubitza

In data2xml, fixed xpath.get() to do last_only optimization properly for pointer targets

22 11/22/2011 01:32 PM Aaron Marcuse-Kubitza

In data2xml, added support for XPath pointers

21 11/21/2011 05:48 PM Aaron Marcuse-Kubitza

Merged data2xml XPath functionality into xpath.py. Merged data2xml xml_dom.py and xml2db xml_util.py into identical xml_util.py for each script.