Hi again. In my attempt to get JavaScript to automatically generate a table of contents for a collection of [randomly selected] web pages (which I’m now quite happy about , and will soon publish the outcome to this forum for whoever might be interested), I’ve come to realize that my approach might actually fail in a number of instances. :?
Our web pages should all be XHTML 1.0 Strict (and mostly are), but unfortunately on one hand content editors seem to find always new ways to bypass our web content management validation enforcement routines, on the other hand sometimes “non-quite-compliant” external feeds inject the odd unescaped ampersand, and so on…
So, I guess my question is: is there a way to…
I tried hard to achieve (2), but couldn’t really find a way to reliably access the DOM of the combined file with JavaScript, paginate it or link from the TOC page to its targets. That’s why I eventually resorted to the XInclude approach, which is great and gives me exactly what I wanted… if it wasn’t for that [strict] XML validation “drawback”.
Many thanks.
Our web pages should all be XHTML 1.0 Strict (and mostly are), but unfortunately on one hand content editors seem to find always new ways to bypass our web content management validation enforcement routines, on the other hand sometimes “non-quite-compliant” external feeds inject the odd unescaped ampersand, and so on…
So, I guess my question is: is there a way to…
- either “relax” the XML validation on the XIncluded files;
- or make JavaScript see as a “single document” a list of HTML files supplied in the command line with “-i html”.
I tried hard to achieve (2), but couldn’t really find a way to reliably access the DOM of the combined file with JavaScript, paginate it or link from the TOC page to its targets. That’s why I eventually resorted to the XInclude approach, which is great and gives me exactly what I wanted… if it wasn’t for that [strict] XML validation “drawback”.
Many thanks.