openSUSE / docmanager

Manage DocBook 5 Meta Information
http://opensuse.github.io/docmanager/index.html
GNU General Public License v3.0
6 stars 6 forks source link

Ignoring XML Files in Case Root Element is Wrong #57

Closed tomschr closed 9 years ago

tomschr commented 9 years ago

Current Situation

Running DM with glob syntax like this:

$ docmanager init xml/ha*.xml

initializes all files and adds the dm:docmanager element inside info. So far, so good.

However, if you have an XML file in your list which contains an "invalid" root element (like authorgroup), DM refuses to set the other files and stops. This is unfortunate.

I observed this in the openSUSE/doc-sleha repository with the file ha_authors.xml. This file has an authorgroup as its root element. It is not in the list of valid root elements (see file docmanager/core.py, variable VALIDROOTS). According to the DocBook 5 schema, authorgroup cannot contain an info element.

Preferred Solution

"Faulty" in this section means, it's a valid XML file, but DM found a root element which is not allowed. THe preferred solution should be: