[Openstack-docs] validate.py error
Lorin Hochstein
lorin at nimbisservices.com
Wed Aug 7 19:51:31 UTC 2013
Sean:
I'm the original author of the validate.py script, but unfortunately I
can't provide much insight into why the script is failing.
The validation script checks the bk001-ch003-associate-general.xml file
against a RelaxNG DocBook schema. It's basically equivalent to doing the
following on the command-line:
xmllint --relaxng
http://www.oasis-open.org/docbook/xml/5.0b5/rng/docbookxi.rng --noout
doc/src/docbkx/openstack-training/bk001-ch003-associate-general.xml
Which gives similar errors:
doc/src/docbkx/openstack-training/bk001-ch003-associate-general.xml:5:
element chapter: Relax-NG validity error : Expecting element set, got
chapter
doc/src/docbkx/openstack-training/bk001-ch003-associate-general.xml:5:
element chapter: Relax-NG validity error : Did not expect element chapter
there
doc/src/docbkx/openstack-training/bk001-ch003-associate-general.xml:9:
element para: Relax-NG validity error : Did not expect element para there
doc/src/docbkx/openstack-training/bk001-ch003-associate-general.xml:13:
element include: Relax-NG validity error : Element chapter has extra
content: include
doc/src/docbkx/openstack-training/bk001-ch003-associate-general.xml:5:
element chapter: Relax-NG validity error : Expecting element section, got
chapter
doc/src/docbkx/openstack-training/bk001-ch003-associate-general.xml fails
to validate
I'm fine with adding openstack-training to FILE_EXCEPTIONS and removing
from BOOK_EXCEPTIONS, but I don't think we really need individual file
validation anymore, since maven success/failure is really all we care about.
Lorin
On Wed, Aug 7, 2013 at 3:28 PM, Sean Roberts <seanrob at yahoo-inc.com> wrote:
> I would rather as a stop gap just add the file in question to
> FILE_EXCEPTIONS and remove openstack-training from BOOK_EXCEPTIONS until
> someone more familiar with the validate.py code can debug the source of the
> problem.
>
>
>
> Sean Roberts
> Infrastructure Strategy
> seanrob at yahoo-inc.com (925) 980-4729
>
> On Aug 7, 2013, at 12:15 PM, Sean Roberts <seanrob at yahoo-inc.com>
> wrote:
>
> validate.py is excluding openstack-training in build_all_books as well.
> Should I be changing
>
> BOOK_EXCEPTIONS = ['openstack-training']
> to
> BOOK_EXCEPTIONS = []
>
> as well as
>
>
> def main(rootdir):
> validate_individual_files(rootdir, FILE_EXCEPTIONS)
> build_all_books(rootdir, BOOK_EXCEPTIONS)
>
> to
>
> def main(rootdir):
> """ validate_individual_files(rootdir, FILE_EXCEPTIONS) """
> build_all_books(rootdir, BOOK_EXCEPTIONS)
>
>
>
>
>
> Sean Roberts
> Infrastructure Strategy
> seanrob at yahoo-inc.com (925) 980-4729
>
> On Aug 7, 2013, at 11:58 AM, Lorin Hochstein <lorin at nimbisservices.com>
> wrote:
>
> Sean:
>
> If the XML validation is giving a false positive, I suggest we turn it
> off. The validate.py script now uses maven to build all of the books. Just
> remove the call to validate_individual_files in the "main" function.
>
>
> Lorin
>
>
> On Wed, Aug 7, 2013 at 2:38 PM, Sean Roberts <seanrob at yahoo-inc.com>wrote:
>
>> I have a validate.py problem, anyone up for debugging with me?
>> Local maven runs clean
>>
>> jenkins fails
>> http://logs.openstack.org/50/40550/1/check/gate-openstack-manuals-validate/e3d606e/console.html
>>
>> ...
>>
>> + ./tools/validate.py
>> /home/jenkins/workspace/gate-openstack-manuals-validate/doc/src/docbkx/openstack-training/bk001-ch003-associate-general.xml:5:0:ERROR:RELAXNGV:RELAXNG_ERR_ELEMNAME: Expecting element section, got chapter
>> /home/jenkins/workspace/gate-openstack-manuals-validate/doc/src/docbkx/openstack-training/bk001-ch003-associate-general.xml:13:0:ERROR:RELAXNGV:RELAXNG_ERR_EXTRACONTENT: Element chapter has extra content: include
>> /home/jenkins/workspace/gate-openstack-manuals-validate/doc/src/docbkx/openstack-training/bk001-ch003-associate-general.xml:9:0:ERROR:RELAXNGV:RELAXNG_ERR_ELEMWRONG: Did not expect element para there
>> /home/jenkins/workspace/gate-openstack-manuals-validate/doc/src/docbkx/openstack-training/bk001-ch003-associate-general.xml:5:0:ERROR:RELAXNGV:RELAXNG_ERR_ELEMWRONG: Did not expect element chapter there
>> /home/jenkins/workspace/gate-openstack-manuals-validate/doc/src/docbkx/openstack-training/bk001-ch003-associate-general.xml:5:0:ERROR:RELAXNGV:RELAXNG_ERR_ELEMNAME: Expecting element set, got chapter
>> ...
>>
>>
>>
>>
>> Sean Roberts
>> Infrastructure Strategy
>> seanrob at yahoo-inc.com (925) 980-4729
>>
>>
>> _______________________________________________
>> Openstack-docs mailing list
>> Openstack-docs at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>>
>>
>
>
> --
> Lorin Hochstein
> Lead Architect - Cloud Services
> Nimbis Services, Inc.
> www.nimbisservices.com
>
>
> _______________________________________________
> Openstack-docs mailing list
> Openstack-docs at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>
>
>
--
Lorin Hochstein
Lead Architect - Cloud Services
Nimbis Services, Inc.
www.nimbisservices.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20130807/ace42c6a/attachment-0001.html>
More information about the Openstack-docs
mailing list