Skip to main content
Rsfl
Inspiring
October 11, 2013
Question

Suppress XML validation when opening files

  • October 11, 2013
  • 1 reply
  • 669 views

Hi,

is there a way to (temporarely) suppress the validation? I have a large amount of DITA files created with an old FM version. For some reason, the doctype "dita" has been written into the headers. All I need to do is open each file, confirm the validation error message, and save the file again. FM then automatically writes the correct doctype. However clicking through all these error messages would be very time consuming.

This is FM11 with FMx 1.1.

Robert

This topic has been closed for replies.

1 reply

ScottPrentice
Inspiring
October 11, 2013

I'm not aware of a way to supporess validation on file open.

Are you  saying that the doctype is "dita" but the root element is something else? It would get set to "dita" if you used the "wrap in dita" option when creating the file. But I don't know why that wouldn't get updated when the root element was changed.

This would be a fairly simple fix to make using Perl or a text editor that allows you to process groups of files with a search/replace operation.

...scott

Rsfl
RsflAuthor
Inspiring
October 15, 2013

Hi scott, yes you can see an example of the first lines below. It was not a problem under FM7.2 (with DITA application pack) and I never payed attention to this until we updated to FM11. A script would be the fastest solution I suppose, as there are a few thousand files to fix.

----

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd" [

<!-- Begin Document Specific Declarations -->

<!-- End Document Specific Declarations -->

]>

<concept id = "id081NF500U30" status = "changed" xml:lang = "de-de"

xmlns:ditaarch = "http://dita.oasis-open.org/architecture/2005/">

<title>title</title>

...

ScottPrentice
Inspiring
October 15, 2013

Yes .. a simple Perl script thta scans each file and updates the doctype based on the root element name, would be the best.

Cheers,

...scott