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).

7397 01/31/2013 08:52 AM Aaron Marcuse-Kubitza

xml_dom.py: replace_with_text(): Added support for all scalar (non-Node) types, which will be stringified using strings.ustr()

7116 01/08/2013 08:33 PM Aaron Marcuse-Kubitza

xml_dom.py: replace_with_text(): Fixed bug where need to use scalar.is_nonnull_scalar() instead of is_scalar() to avoid converting None values to the string 'None'

7106 01/07/2013 07:03 PM Aaron Marcuse-Kubitza

xml_dom.py: replace_with_text(): Support any scalar type recognized by scalar.is_scalar()

6356 11/21/2012 09:00 PM Aaron Marcuse-Kubitza

xml_dom.py: Added prune_parent()

4758 09/17/2012 03:37 PM Aaron Marcuse-Kubitza

xml_dom.py: replace_with_text(): Support ints and floats

4757 09/17/2012 03:36 PM Aaron Marcuse-Kubitza

xml_dom.py: replace_with_text(): Support ints and floats

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

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

4332 08/29/2012 07:32 PM Aaron Marcuse-Kubitza

xml_dom.py: NodeEntryIter: Support entries with multiple children

4331 08/29/2012 07:20 PM Aaron Marcuse-Kubitza

xml_dom.py: replace(): Support a list of new nodes to replace the old node with

4330 08/29/2012 07:01 PM Aaron Marcuse-Kubitza

xml_dom.py: Moved only_child() near related method has_one_child()

4329 08/29/2012 07:00 PM Aaron Marcuse-Kubitza

xml_dom.py: only_child(): Raise exception instead of failing assertion. Include invalid node in exception message for easier debugging.

4328 08/29/2012 06:57 PM Aaron Marcuse-Kubitza

xml_dom.py: Added only_child() and use it where its definition was used

4321 08/29/2012 05:55 PM Aaron Marcuse-Kubitza

xml_dom.py: Added prune()

4318 08/29/2012 05:51 PM Aaron Marcuse-Kubitza

xml_dom.py: Added prune_empty() and prune_children()

4238 08/27/2012 10:06 PM Aaron Marcuse-Kubitza

xml_dom.py: Added NodeEntryIter

4235 08/27/2012 09:19 PM Aaron Marcuse-Kubitza

xml_dom.py: replace_with_text(): Use new bool2str() so that False causes the node to be removed instead of replaced with the empty string

4234 08/27/2012 09:18 PM Aaron Marcuse-Kubitza

xml_dom.py: Added bool2str()

4138 08/21/2012 05:29 AM Aaron Marcuse-Kubitza

xml_dom.py: replace_with_text(): Support bool `new` values

4038 08/15/2012 05:41 AM Aaron Marcuse-Kubitza

xml_dom.py: is_empty(): Treat whitespace-only text nodes (including text nodes containing empty strings) as empty. This will also support None equivalents in text nodes, because they are isspace_none_str, which is considered whitespace.

4034 08/15/2012 05:08 AM Aaron Marcuse-Kubitza

xml_dom.py: value(), set_value(): Use new strings.isspace_none_str as sentinel None equivalent, to support cloning text nodes containing a sentinel None

4033 08/15/2012 05:06 AM Aaron Marcuse-Kubitza

xml_dom.py: value(), set_value(): Use new strings.isspace_none_str as sentinel None equivalent, to support cloning text nodes containing a sentinel None

4031 08/15/2012 04:51 AM Aaron Marcuse-Kubitza

xml_dom.py: is_whitespace(): Also consider empty text nodes to be whitespace

4030 08/15/2012 04:47 AM Aaron Marcuse-Kubitza

xml_dom.py: is_whitespace(): Support text nodes whose value() is None by using .nodeValue instead

4029 08/15/2012 04:44 AM Aaron Marcuse-Kubitza

xml_dom.py: set_value(): Don't set the value of a text node to None by removing it, because this prevents the node from being reused. Instead use a sentinel string value to denote None, and map to and from it.

4027 08/15/2012 04:19 AM Aaron Marcuse-Kubitza

xml_dom.py: set_value(): Support setting the value of a text node to None, by removing it

3632 07/26/2012 09:51 PM Aaron Marcuse-Kubitza

xml_dom.py: NodeTextEntryIter: Allow empty values through as None, and instead filter them out in TextEntryOnlyIter using new helper function non_empty(). This allows XML functions to decide for themselves whether empty values should be filtered out, because process() will now no longer automatically remove them. This will enable process() to work with SQL functions, which must not have empty values filtered out because this will remove required, but nullable, arguments.

3334 07/11/2012 07:44 PM Aaron Marcuse-Kubitza

xml_dom.py: Removed no longer used merge_same_name()

3331 07/11/2012 07:33 PM Aaron Marcuse-Kubitza

xml_dom.py: Moved merge_adjacent() recursion and name checking into merge() so that other callers of merge() can take advantage of it, too. Added merge_by_name() and use it in merge_same_name(). Removed now-unused merge_adjacent().

3329 07/11/2012 07:01 PM Aaron Marcuse-Kubitza

xml_dom.py: replace(): Assert that old node not removed from parent tree

3325 07/11/2012 05:30 PM Aaron Marcuse-Kubitza

xml_dom.py: Added merge_same_name()

3226 07/05/2012 02:09 PM Aaron Marcuse-Kubitza

xml_dom.py: Added merge() and merge_adjacent()

3225 07/05/2012 02:08 PM Aaron Marcuse-Kubitza

xml_dom.py: replace_with_text(): Return the new node

2431 05/25/2012 02:44 PM Aaron Marcuse-Kubitza

xml_dom.py: Added is_node()

2009 04/30/2012 01:10 AM Aaron Marcuse-Kubitza

xml_dom.py: set_value(): If value is None and node is Element, remove value node entirely instead of setting node's value to None

2008 04/30/2012 01:02 AM Aaron Marcuse-Kubitza

xml_dom.py: Added value_node(). Use new value_node() in value() and set_value(). set_value(): If the node already has a value node, reuse it instead of appending a new value node.

1836 04/10/2012 04:33 PM Aaron Marcuse-Kubitza

xml_dom.py: get_id(): If the node doesn't have an ID, assumes the node itself is the ID. This enables backward (child-to-parent) pointers whose target is a text element containing an ID, rather than a regular element with an ID attribute.

1832 04/10/2012 03:11 PM Aaron Marcuse-Kubitza

xml_dom.py: value(): Skip comment nodes. This fixes a bug where comments inside text elements would prevent the value from being retrieved.

1814 04/09/2012 05:32 PM Aaron Marcuse-Kubitza

xml_dom.py: Comments: Added clean_comment() and mk_comment(). Searching child nodes: by_tag_name(): Added ignore_namespace option to ignore namespace of node name.

1809 04/09/2012 12:40 PM Aaron Marcuse-Kubitza

xml_dom.py: Added clean_comment() and mk_comment() to properly sanitize comment contents (comments can't contain '--')

1720 04/02/2012 08:35 AM Aaron Marcuse-Kubitza

xml_dom.py: Don't print whitespace from parsed XML document when pretty-printing XML. minidom modifications section: Added subsection labels for the class each modification applies to.

1709 03/29/2012 10:24 PM Aaron Marcuse-Kubitza

Moved parse_str() from xml_dom.py to xml_parse.py

1688 03/29/2012 06:51 PM Aaron Marcuse-Kubitza

xml_dom.py: Added parse_str()

1563 03/23/2012 02:47 PM Aaron Marcuse-Kubitza

xml_dom.py: minidom modifications: Escape as many text strings as we use directly. This still leaves the tagName used by xml.dom.minidom.Element.writexml: It uses 'writer.write(indent+"<" + self.tagName)' and doesn't escape the tagName.

1176 02/27/2012 03:37 PM Aaron Marcuse-Kubitza

xml_dom.py: NodeTextEntryIter: Filter out empty entries (instead of producing an entry with an explicit None value, which causes problems with XML funcs that can't handle Nones)

1017 02/16/2012 06:07 PM Aaron Marcuse-Kubitza

xml_dom.py: Fixed bug in parent() where it didn't account for NodeParentIter's first element returned being the current node, not its parent. Refactored parent() to use parentNode directly, and NodeParentIter to use parent(), instead of the other way around.

1016 02/16/2012 05:38 PM Aaron Marcuse-Kubitza

xml_dom.py: Fixed bug in parent() where incorrect variable name was used

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

xml_dom.py: Added parent() to get parent node without recursing past the root node to the document object. Documented that NodeParentIter incorporates this sanity check.

964 02/13/2012 01:57 PM Aaron Marcuse-Kubitza

xml_dom.py: NodeTextEntryIter: Convert empty entries (including entries containing error comments) to None

963 02/13/2012 01:48 PM Aaron Marcuse-Kubitza

xml_dom.py: replace(): Added support for new node that's None (deletes existing node)

891 02/07/2012 04:08 PM Aaron Marcuse-Kubitza

xml_dom.py: minidom.Element.write_opening(): Use new Attr.__str__() method for printing attributes

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

xml_dom.py: by_tag_name(): Iterate forwards over children unless last_only optimization turned on. Added Attr.__str__() and repr() for debug-printing Attrs.

860 02/06/2012 03:20 PM Aaron Marcuse-Kubitza

strings.py: Renamed one_line() to remove_extra_newl() to better reflect what it does

857 02/06/2012 01:57 PM Aaron Marcuse-Kubitza

xml_dom.py: Remove extra newlines from single-line strings (bin/map doesn't need to do this itself anymore)

840 02/04/2012 05:28 PM Aaron Marcuse-Kubitza

xml_dom.py: Added documentation labels to each section

839 02/04/2012 05:21 PM Aaron Marcuse-Kubitza

xml_dom.py: Fixed bug in NodeTextEntryIter where an entry containing an element instead of a text node would be returned as the whole entry, instead of the value of the entry

796 02/03/2012 12:24 PM Aaron Marcuse-Kubitza

xml_dom.py: Override Node.__repr__ and Element.__repr__ to make sure self.toprettyxml() is used in all cases where a Node is converted to a string

792 02/03/2012 11:49 AM Aaron Marcuse-Kubitza

xml_dom.py: Added TextEntryOnlyIter to check that values returned by NodeTextEntryIter are strings from text nodes

782 01/31/2012 06:44 PM Aaron Marcuse-Kubitza

xml_dom.py: Fixed conversion of minidom.Node to a string to use toprettyxml() again

774 01/31/2012 05:05 PM Aaron Marcuse-Kubitza

xml_dom.py: Print simple XML elements on one line

757 01/30/2012 07:07 PM Aaron Marcuse-Kubitza

xml_dom.py: replace_with_text(): Accept Node inputs for cases where e.g. an XML func with an error has been replaced with a comment

661 01/27/2012 12:39 PM Aaron Marcuse-Kubitza

xml_dom.py: Added is_simple() to determine whether every child recursively has no more than one child. Used is_simple() to print condensed XML when simple nodes are converted to a string.

456 01/10/2012 05:06 PM Aaron Marcuse-Kubitza

xml_dom.py: In NodeTextEntryIter, return non-text children as-is instead of ignoring them so that XML functions can use them

455 01/10/2012 04:46 PM Aaron Marcuse-Kubitza

xml_dom.py: Improved readability by separating into sections

453 01/10/2012 04:41 PM Aaron Marcuse-Kubitza

xml_dom.py: Changed is_empty() to consider nodes with only comments to be empty

450 01/10/2012 04:19 PM Aaron Marcuse-Kubitza

xml_dom.py: Added has_elems() to check if node has Element children

435 01/10/2012 12:48 PM Aaron Marcuse-Kubitza

xml_dom.py: Added remove() function to remove a node

331 12/29/2011 12:59 PM Aaron Marcuse-Kubitza

xml_dom.py: Node.__str__() uses toprettyxml() instead of toxml()

315 12/28/2011 12:04 PM Aaron Marcuse-Kubitza

xml_dom.py: Added Node pop() and clear() methods

306 12/28/2011 10:27 AM Aaron Marcuse-Kubitza

xml_dom.py: Added support for integer indents

305 12/28/2011 10:19 AM Aaron Marcuse-Kubitza

xml_dom.py: Added NodeIter() and Node.__iter__()

304 12/28/2011 10:05 AM Aaron Marcuse-Kubitza

Use new xml_dom.prettyxml_config instead of Node.writeprettyxml because it can be passed as keyword args to any writexml function

303 12/28/2011 10:00 AM Aaron Marcuse-Kubitza

xml_dom.py: Removed no longer needed xml_dom.writexml()

301 12/28/2011 09:57 AM Aaron Marcuse-Kubitza

xml_dom.py: Added minidom.Document write_opening() and write_closing() methods. Changed writexml(writer, node) to use new Node.writeprettyxml() method.

299 12/28/2011 09:24 AM Aaron Marcuse-Kubitza

Import xml.dom.minidom as minidom

298 12/28/2011 09:10 AM Aaron Marcuse-Kubitza

xml_dom.py: Refactored xml.dom.minidom.Element.writexml() to use new write_opening() and write_closing() methods. Use new functions is_elem() and is_text_node() to determine node type. Corrected definition of a text element to be an element that contains a single text node.

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

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

153 12/13/2011 02:59 PM Aaron Marcuse-Kubitza

Added str() method to XML nodes

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

142 12/12/2011 05:35 PM Aaron Marcuse-Kubitza

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

139 12/12/2011 04:27 PM Aaron Marcuse-Kubitza

xml_dom.py: Changed all uses of name_of(node) to node.tagName

138 12/12/2011 04:23 PM Aaron Marcuse-Kubitza

Made XML node names case-sensitive

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

86 12/05/2011 03:11 PM Aaron Marcuse-Kubitza

Added xml_func.py to process mappings whose output needs postprocessing

73 12/02/2011 02:16 PM Aaron Marcuse-Kubitza

map: Fixed bugs to enable mapping straight from CSV to a database. Still need a way to set plot.authorPlotCode for specimens data.

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

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

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

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.

29 11/23/2011 02:23 PM Aaron Marcuse-Kubitza

Removed no longer necessary strip() from node value getter

28 11/23/2011 02:22 PM Aaron Marcuse-Kubitza

Added patch for xml.dom.minidom.Element.writexml to avoid adding extra whitespace around text nodes

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.