summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebd <>2005-05-19 16:06:11 (GMT)
committersebd <>2005-05-19 16:06:11 (GMT)
commitf44c7aa2dfb6791227783cc7f19e7ecb460bbc48 (patch)
tree8c78412bb4d71361579a63270d565022f2853bca
parent9310c8306d36820b4f88051ce22a4a6a44cb7b00 (diff)
downloadexpression-f44c7aa2dfb6791227783cc7f19e7ecb460bbc48.zip
expression-f44c7aa2dfb6791227783cc7f19e7ecb460bbc48.tar.gz
expression-f44c7aa2dfb6791227783cc7f19e7ecb460bbc48.tar.bz2
Setting document labels when provided in population file.
-rw-r--r--src/modules/dbxmldatabases.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/modules/dbxmldatabases.py b/src/modules/dbxmldatabases.py
index 02bf67e..52aa4f0 100644
--- a/src/modules/dbxmldatabases.py
+++ b/src/modules/dbxmldatabases.py
@@ -237,7 +237,17 @@ def __init__():
for node in documentNode.xpathEval("*"):
doc = libxml2.newDoc("1.0")
doc.setRootElement(node)
- container.putDocument(documentNode.prop("name"), doc.serialize(), updateContext)
+ document = manager.createDocument()
+ document.setContent(doc.serialize())
+ document.setName(documentNode.prop("name"))
+ label = documentNode.prop("label")
+ if label:
+ document.setMetaData(
+ "http://www.sleepycat.com/2002/dbxml",
+ "label",
+ dbxml.XmlValue(label)
+ )
+ container.putDocument(document, updateContext)
indexSpecification = dbxml.XmlIndexSpecification()
for node in configuration.evaluateXpath(
"""yep:module[@name="%s"]/yep:container[@name="%s"]/yep:index""" % (