> However, if your topic already has warnings and errors reported by the
> DTD or schema (e.g. your topic has a missing or invalid id attribute),
> then the CheckHrefs validateHook will *not* report any warning.

> Rationale: Do not add benign warnings to possibly severe errors. Let
the
> user first fix the validity errors,

Thanks, that explains part of the problem. I had an invalid "???" id
reported. These never cause us any problems, so we don't bother to fix
the ids unless the file is a source for a conref or has a subtopic href
target. I'm not sure I agree with the rationale, but I understand it.

However, the IdCollector does not collect empty hrefs, even though
CheckHrefs does try to report an href with a length of 0. Is this
intentional? I think it'd be important to identify links with an empty
href attribute. 




-----Original Message-----
From: Hussein Shafie [mailto:[email protected]] 
Sent: Thursday, May 13, 2010 1:07 AM
To: Mark Fletcher
Cc: [email protected]
Subject: Re: [XXE] CheckHrefs validateHook

Mark Fletcher wrote:
> Is there some trick to making this hook fire? Looking at the code,
it's
> supposed to show a warning for href attributes  that are empty or that
> equal '???' when a dita file is validated, but I'm not seeing any such
> warnings. Do I need to do something special to see these validations?
> 

We have re-tested that the CheckHrefs validateHook works as expected.

* The CheckHrefs validateHook is declared in
XXE_install_dir/addon/config/dita/topic.xxe as follows:

---
  <validateHook name="checkHrefs">
    <class>com.xmlmind.xmleditext.dita.CheckHrefs</class>
  </validateHook>
---
More info here:
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/validateHook.htm
l

This means that it will work for topics, and not for maps.

* Warnings are automatically reported each time the document is
validated ("Tools|Check Validity" or more simply, "File|Save" and
"File|Open")

However, if your topic already has warnings and errors reported by the
DTD or schema (e.g. your topic has a missing or invalid id attribute),
then the CheckHrefs validateHook will *not* report any warning.

Rationale: Do not add benign warnings to possibly severe errors. Let the
user first fix the validity errors,


 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to