Fix XML schema validation failures
With this patch, running the tools/validate.py script will return no DocBook RelaxNG schema validation failures. Once this patch lands, and the equivalent lands in stable/folsom, I will follow up on getting this run automatically by Jenkins so we can see the results when there are new doc patch proposals. There were three XML validation failures that were addressed openstack-compute-admin/rootwrap.xml: rootwrap.xml had to xml:id values that were the same. These have been changed so they are different. It turns out this file was not being included in the documentation at all. I submitted a separate patch to include it: https://review.openstack.org/20551 openstack-compute-admin/computeconfigure.xml: computeconfigure.xml had xi:include elements with an 'os' attribute. This violates the spec, and it doesn't work, either. We had two lines that looked like this: <xi:include os="ubuntu" ...> <xi:include os="rhel;fedora;centos" ...> and both files were being included in the docs. This was changed so that only one file is included, and there's a note that has been added that describes the difference between the two files, which is very minor (just one parameter). openstack-ha/ha-guide-docinfo.xml: This isn't a real XML file, it's a fragment of XML that is used by a non-standard toolchain. The validation script has been configured to just ignore it for now. Change-Id: Ie77218efc56c16b7bf162f5e02fd7a6d99116dc1
This commit is contained in:
parent
44fff29dfd
commit
6d76f4c234
@ -22,6 +22,9 @@ import subprocess
|
||||
import sys
|
||||
import urllib2
|
||||
|
||||
# These are files that are known to not be in DocBook format
|
||||
EXCEPTIONS = ['ha-guide-docinfo.xml']
|
||||
|
||||
|
||||
def get_schema():
|
||||
"""Return the DocBook RELAX NG schema"""
|
||||
@ -68,7 +71,7 @@ def main(rootdir):
|
||||
|
||||
for f in files:
|
||||
# Ignore maven files, which are called pom.xml
|
||||
if f.endswith('.xml') and f != 'pom.xml':
|
||||
if f.endswith('.xml') and f != 'pom.xml' and f not in EXCEPTIONS:
|
||||
try:
|
||||
path = os.path.abspath(os.path.join(root, f))
|
||||
doc = etree.parse(path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user