projectEndings / staticSearch

A codebase to support a pure JSON search engine requiring no backend for any XHTML5 document collection
https://endings.uvic.ca/staticSearch/docs/index.html
Mozilla Public License 2.0
46 stars 21 forks source link

xmlvalidate task looks at files that it shouldn't #274

Closed martindholmes closed 9 months ago

martindholmes commented 9 months ago

On line 217 of build.xml, the include for files to check for well-formedness is:

<include name="**/**.*htm*"/>

However, the documents we actually want to process, as defined in tokenize.xsl, are:

<xsl:variable name="docRegex">(.+)(\..?htm.?$)</xsl:variable>

This means that documents we will not process may be checked for validity. @sydb found this when renaming files to ".nothtml".

martindholmes commented 9 months ago

The immediately obvious solution is:

<filename regex="(.+)(\..?htm.?$)"/>

and I assume we also don't need the capturing groups just for a match. I'll test this.

sydb commented 9 months ago

Though wouldn’t it be nice to let the user pass in a regex to match from the commandline?

martindholmes commented 9 months ago

@sydb It might be nice indeed. But that's not the bug. :-) We'll fix the bug first, then wait for a user to raise a feature request.

martindholmes commented 9 months ago

@joeytakeda I've just fixed this in the 1.4 release branch, and I'll do a release when a couple more things are fixed. Meanwhile there's a PR for it on the dev branch, assigned to you.

martindholmes commented 9 months ago

PR was merged. Closing.