Bug 700673 - Validate individual topics on build
Summary: Validate individual topics on build
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: Web-UI
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Matthew Casperson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 699936
TreeView+ depends on / blocked
 
Reported: 2011-04-28 23:13 UTC by Joshua Wulf
Modified: 2014-10-19 22:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-03 06:06:20 UTC


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.