Setting document labels when provided in population file.

This commit is contained in:
sebd 2005-05-19 16:06:11 +00:00
parent 9310c8306d
commit f44c7aa2df
1 changed files with 11 additions and 1 deletions

View File

@ -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""" % (