VideosConfiguring Automatic Validation in Oxygen XML Git Client

Overview

Duration: 05:03

This video shows how to use scripts from a command-line tool to validate documents.

Transcript

00:00:05The purpose of this video is to show  you how you can take advantage of the  
00:00:09automatic validation features that can be  enabled when using Oxygen's Git Client.  
00:00:15I have a sample project already open in Oxygen's  Project view that I'll use to demonstrate the  
00:00:21validation possibilities. Note that it is  very important that the project be in a Git  
00:00:26repository. My sample project was configured  inside a Git repository ahead of time.  
00:00:33Let's get started. First, there are a few options  that need to be enabled to use the validation  
00:00:38features. So, I'll go to Options, Preferences, and  I'll locate the Git Client preferences page ... 
00:00:46... and I need to select the 'validate  each file before committing' option.  
00:00:52This enables the automatic validation when  using the Git Client to commit changes.  
00:00:58And I also need to select the 'Validate all  files from the project's main files' option.  
00:01:03This option enables the validation of all the  files within your project when pushing commits.  
00:01:09Note that this second option requires  Main files support to be activated  
00:01:13and I will show you how to do that... ... but first, I'll select 'Project Options'  
00:01:18for the storage type for this preferences  page. This allows me to commit and share  
00:01:23these settings with other team members that  work with this repository and project"  
00:01:28Now I'll show you have to  activate Main Files support.  
00:01:33In the Project view, I'll right-click the root  node and I'll select "Enable Main Files". 
00:01:40Then, since this is a DITA project, I'll  right-click my main dita map and I'll select  
00:01:45'Add to main files' to set my dita map as the  main file. Now I want to configure a validation  
00:01:51scenario to create an association between my  dita map and a thorough completeness check...  
00:01:57So, I'll right-click the dita map, select  'Configure Validation Scenario' from the Validate  
00:02:03submenu, and I'll select and apply the 'DITA  map validation and completeness check' scenario.  
00:02:09Now that the association is done, all  the references and structures within  
00:02:14that dita map will be validated whenever I  try to push changes to the repository. 
00:02:20Now, I'll open a topic, I'll change the tags  mode so that you can see full tags along with  
00:02:27attributes, and I'll intentionally break the  image reference by changing the file type. 
00:02:47After saving the change,  I'll go the Git Staging view,  
00:02:54I'll use this toolbar button to stage all changed  files, and I'll try to commit the change ...  
00:03:03and you can see that an error was reported.  I'll cancel because I don't want it to break  
00:03:09my publishing pipeline, and I can double-click  the error in the Results panel to navigate to  
00:03:15the location of the validation error. And I'll go ahead and fix the problem.
00:03:32Then, back in the Git Client, I'll stage  it and commit the change ... and this time  
00:03:38no problem was detected. Now, the next step  would be to push the commit to the repository.  
00:03:44I'll hover over the push button on the toolbar  to show you that it offers information about  
00:03:49the committed files that need to be pushed. Back in the editor, I'll intentionally create  
00:03:56another validation error by changing  the value of an ID. Of course,  
00:04:00there's no warning reported in the context of  this topic, but if there are any references  
00:04:05to that ID from another topic, that broken  reference will result in a validation error. 
00:04:14In the Git Client, I'll  stage the change, commit it,  
00:04:23and again, there's no error reported at this  stage because it doesn't validate all the files  
00:04:27in the project until I push the changes. So, I'll go ahead and try to push them ...  
00:04:34and the expected error was reported  now that all files were validated. 
00:04:45This concludes the demonstration about  the automatic validation features that  
00:04:50are available when working with  Oxygen's Git Client. As always,  
00:04:54thank you for watching and we invite you to please  subscribe to our various social media channels.

Use Oxygen Feedback to ask us anything about this video.