Menu

#217 DITA validation flags missing optional attributes as errors; stops when it finds one

Bugs
open
nobody
DITA (1)
5
2015-05-31
2015-04-30
No

I'm part of a technical documentation team that works almost exclusively in DITA. We use a couple of WYSIWYG-ish editors but I love XML Copy Editor for tweaking/analysing the raw XML code when things go awry, and for all DITAMAP editing. I'm trying to get my whole team to use XML Copy Editor as our standard XML tool as its DITA features are far superior to all other free editors. (Keep up the great work!)

One of my favourite features is the "Validate" feature, but in DITA files it often doesn't get past the first line because it flags missing optional attributes in the <concept>, <map> (or whatever) root element. Example text: "Error at line 1, column 570: no declaration found for element 'concept'." The validation tool seems to categorise optional attributes as required (I can't find any source that suggests the elements it's looking for are compulsory in DITA, and the DITA Open Toolkit builds using these files without complaint) and as a result it doesn't check for critical errors further down. I know it can see other errors as it red-underlines them, but in long files with complex tagging it can be difficult to spot the underlines and it would be much easier to have the Validate feature flag all errors/queries. May I suggest a modification in the validation criteria for DITA files to one or more of the following:

  • Relax validation requirements for root elements (either disable the error criteria altogether for these elements or review what the feature considers "required" declarations), and/or

  • Allow the validation tool to continue searching the rest of the file for errors even after it thinks it's found one, and offer a complete list of errors at the end. That way users can decide which ones they care about and which ones they don't.

Thanks!

Discussion

  • gnschmidt

    gnschmidt - 2015-05-09

    Hi Richard, which OS are you using? Are you able to share a sample file (a minimal one is fine) by pm?

    Many thanks,
    Gerald

     
  • Zane U. Ji

    Zane U. Ji - 2015-05-31

    I believe this problem is similar to the one in [discussion:bcc5f188].

     

    Related

    Discussion: bcc5f188


Log in to post a comment.