How to check links in compound documents?

Leif Halvard Silli <[email protected]> Wed, 24 Jan 2024 22:34:39 +0100
Newsgroups gmane.editors.xxe.general
Message-ID <[email protected]>
      My use case:

We have some large compound XHTML documents - a main document with lots 
of subsections embedded via Xinclude.

The documens ave cross reference links. And there always seems to be 
some links that are - or become - broken.

And so I would liked to have a link checker to check for broken links.

(We use Prince XML to generate our PDFs, and I can say that (with the 
exception of the dead/broken links), links works the same inside the XXE 
editor as in the Prince XML generated PDFs. Whereas if I try to use FOP 
to create the PDFs, then most of the links will not work.)


      What I tried:

(1) The XHTML preview option plus an external link checker.

The XHTML menu have a Preview item which I hoped would create one, big, 
«flattened» document, which I could then run some link checker on.

The problem: The resulting document doesn't actually get (completely) 
«flattened» - at least not when it comes to links. And so the majority 
of links, stops working in this «flattened» variant of the documents.

(Still this might be my safest bet - if only I remove "subdoc.xhtml" 
from href="subdoc.xhtml#fragment", then I will end up with a link - 
href="#fragment", that should work. But this is a rather cumbersome 
"method".)

(2) XXE’s built in link validation

XXE has a link validation tool - AKA a link checker. But in our compound 
XHTML documents, the link validation tool does not work - at least it 
does not work in a useful way. Becuase, the links that I need to check, 
are found in subdocuments. But at least by default, the link validator 
only reports broken links if link (aka the <a href> elemen) is found 
directly in the main document itself. And, in addition, it seems like 
the link validation does not check links that leads to other files. 
Also, the link validation does not check the links that occur in 
subdocuments. Thus, I have not found a way to make use of the built in 
link validation.


      What I ask:

Is there more to the link validation tool? Is it possible for me to 
configure it differently? If not, could it be updated to validate links 
in compound documents?

Alternatively/Additionally, is it also possible to wish that XHTML 
Preview could produce _really_ flattened Xinclude documents?

Leif Halvard Silli


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