Turning off validation

PosterContent
nk4um User
Posts: 39
June 13, 2012 15:24

If I didn't find the hardest, most complicated way of doing everything then my Father would demand a paternity test. Thanks for the simpler method.

Like · Post Reply
nk4um Administrator
Posts: 20
June 13, 2012 12:24

Hi Jeff,

Thanks for sharing your solution with the forum users.

It is, however, possible to override a DXP configuration without modifying command.jar. After loading the built in DXPs, the following locations are searched (in order) for DXPs:

  1. command.jar installation directory
  2. current working directory i.e. the directory where the command is being invoked
  3. user home directory

If a DXP file is encountered with the same id as a DXP already loaded, then it overrides it.

We currently don't document this very thoroughly in the Command-Line Tool ReadMe - we'll look to improve this in a future release.

Cheers,

Chris

Like · Post Reply
nk4um User
Posts: 39
June 5, 2012 18:36

For the sake of those who follow, here's how this is done:

1. Unpack the command.jar file. You can do this in a zillion ways, but I just used 7-Zip, which is the best, free, compression utility on the planet. Thank you, Igor Pavlov.

2. In the unpacked project, locate the dxp folder and add the following lines in front of the <comparatorFeatures> element in every .dxp file that you want to alter:

<parserFeatures>
   <feature name="http://apache.org/xml/features/nonvalidating/load-external-dtd" literalValue="false"/> 
   <feature name="http://xml.org/sax/features/validation" literalValue="false"/>		       
 </parserFeatures>

3. Save your changes and rebuild the .jar file into a runnable .jar file by running this command from within the unpacked command folder:

jar cvfm command.jar META-INF/MANIFEST.MF *

4. Back up your original command.jar file somewhere and replace it with the command.jar file that you just created in the unpacked command folder.

Cheers, Jeff.

Like · Post Reply
nk4um Administrator
Posts: 20
June 2, 2012 09:15

Hi Jeff,

Just a quick response - I'm sure one of my colleagues will respond next week (Monday and Tuesday are public holidays in the UK) if I've missed something.

I believe that the best way to achieve what you want is by setting a parser feature, see:

The three parser features that look relevant are:

Let us know if that helps,

Cheers,

Chris

Like · Post Reply
nk4um User
Posts: 39
June 2, 2012 00:11Turning off validation

Hi folks,

Carrying on with the DITA evaluation.

I'm taking the suggested approach of using Core to diff the ditamaps and then using the DITA component to diff the topics. I'm using my old desktop version of Core 5.3 for the ditamap and can't figure out how to turn off validation; Core keeps choking on the DTD declaration. I'm sure there's a way of disabling this but can't find it in the docs. Got a clue?

Cheers, Jeff.

Like · Post Reply