[Openstack-docs] my maven-fu is rusty, help finding validation error.

David Cramer david.cramer at rackspace.com
Tue Jun 24 15:28:38 UTC 2014


Hi Jonathan,

If you've got oXygen or have emacs configured to validate against the
DocBook relaxng schema, then open the temp file indicated in the error
message and validate that (i.e.
/afs/csail.mit.edu/u/j/jon/git/openstack-manuals/doc/image-guide/target//bk-imageguide.xml-invalid.xml)


The problem is that these files are heavily processed with parts being
filtered out and other changes made, so the notion of a line number in
the original source file isn't available when the validation happens. It
usually gives you hints as to what's wrong, but for some reason isn't
here. That temp file is what it validated when it found the error. If
you validate it manually in an editor, then you can generally figure out
where the problem was in the original source.

If you don't have either of those, you can also use xmllint to validate
from the command line:

1. Clone git at github.com:rackerlabs/rackbook.git to a convenient
location. This contains the relaxng schema we use (a variant of the
docbook relaxng schema with a few additions).

2. xmllint --noout --relaxng /path/to/rackbook/5.0/rng/rackbook.rng
/afs/csail.mit.edu/u/j/jon/git/openstack-manuals/doc/image-guide/target/bk-imageguide.xml-invalid.xml

Regards,
David

On 6/24/14, 10:16 AM, Jonathan Proulx wrote:
> Hi All,
> 
> Thanks for the review offers, see https://review.openstack.org/#/c/102265/
> 
> I use emacs for editing and it usually shows me the erros of my ways,
> in this case when looking at the bk-imageguide.xml-invalid.xml it's
> just saying the initial 'book' tag is an unknown element (an no other
> errors) which is not helpful and suggest a bit of misconfig in my
> editor which I'll look into later.
> 
> Thanks,
> -Jon
> 
> On Tue, Jun 24, 2014 at 10:57 AM, Diane Fleming
> <diane.fleming at rackspace.com> wrote:
>> If you open that referenced file in oxygen, and run validate, it will indicate where the error is. Is there a review #? I can figure it out.
>>
>> Sent from my iPhone
>>
>>> On Jun 24, 2014, at 9:37 AM, "Jonathan Proulx" <jon at jonproulx.com> wrote:
>>>
>>> Hi All,
>>>
>>> Maven isn't being as helpful as I'd like.  Telling me my edits are
>>> invalid (which is likely true it's a new page worth of content so
>>> probably screwed up the markup), but I can't see as it's telling me
>>> where that error might be, note the lack of line number after
>>> "lineNumber:" below, debug version pasted at
>>> http://paste.openstack.org/show/84791/ but it doesn't have a line
>>> number specific tag complaints either.
>>>
>>> @@@@@@@@@@@@@@@@@@@@@@
>>> !!!VALIDATION ERRORS!!
>>> !!!!!!!!!!!!!!!!!!!!!!
>>>
>>> Note: Open the temporary file:
>>>
>>> file:/afs/csail.mit.edu/u/j/jon/git/openstack-manuals/doc/image-guide/target//bk-imageguide.xml-invalid.xml
>>>
>>> to see all the errors in context.
>>> You must correct the errors in the original
>>> source DocBook or wadl files however.
>>>
>>> You can control whether build fails or not by
>>> setting failOnValidationError to no in your pom.
>>>
>>> lineNumber:
>>>
>>> !!!!!!!!!!!!!!!!!!!!!!
>>> !!!VALIDATION ERRORS!!
>>> @@@@@@@@@@@@@@@@@@@@@@
>>>
>>> _______________________________________________
>>> Openstack-docs mailing list
>>> Openstack-docs at lists.openstack.org
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
> 
> _______________________________________________
> Openstack-docs mailing list
> Openstack-docs at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
> 




More information about the Openstack-docs mailing list