Re: Use XSLT to check a bunch of XHTML files for well-formedness?
| Newsgroups | gmane.text.xml.xsl.general.mulberrytech |
|---|---|
| Message-ID | <[email protected]> |
Roger — Do you need to know from XSLT, or is it sufficient to just know? I use xmlwf on the commandline almost daily. It is nearly instantaneous. Here it processes all 830 TEI specification files (relatively small files, that is) in < 0.04 s of real time:[1]
$ ls -1 *.xml | wc
830 830 12112
$ time xmlwf *.xml
real 0m0.038s
user 0m0.027s
sys 0m0.011s
$
Here I deliberately introduce an ill-formedness and try again (just to prove it is not a no-op 🙂):
$ echo "</duck>" >> xenoData.xml
$ time xmlwf *.xml
xenoData.xml:275:1: not well-formed (invalid token)
real 0m0.034s
user 0m0.034s
sys 0m0.000s
$
Notes
[1] That is literally less than a heartbeat, almost no matter how you define one. Just the electrical signal for ventricular contraction alone in healthy subjects is > 0.06 s, let alone atrial contraction or the time in between. (In an unhealthy heart ventricular contraction may take over twice that long).
[2] I am not sure, but I think xmlwf is part of the expat package in Debian, and probably other distros.
________________________________
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/3329386
or by email: [email protected]
--~--