Bug 700673

Summary: Validate individual topics on build
Product: [Community] PressGang CCMS Reporter: Joshua Wulf <jwulf>
Component: Web-UIAssignee: Matthew Casperson <mcaspers>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.xCC: cbredesen, lcarlon, topic-tool-list
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-03 06:06:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 699936    

Description Joshua Wulf 2011-04-28 23:13:56 UTC
This command returns 0 on successful validation, 1 on an error:

xmllint --xinclude --noout --dtdvalid http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd <Topicfile>

It validates Docbook, but doesn't validate that a topic follows the schema that we need (ie: it is a section).

We can extend this test in the future, by using a customized DTD that will only validate a Docbook section as the root node.

In the short term, we need to validate each topic on build, and substitute the following for a failed topic:

<section>
  <title>Topic.Title</title>

  <xi:include href="Topic exists but failed validation notice"/>

  Topic.Description
</section>

Comment 1 Matthew Casperson 2011-05-03 06:06:20 UTC
Tool now validates XML, checks to make sure the root node is a section, and checks to makes sure the section has an id. Build errors are appended to the book as Errors.xml.