Changing validator user functions file programmatically

For technical support for all editions of CSE HTML Validator. Includes bug reports.
Post Reply
User avatar
MikeGale
Rank VI - Professional
Rank VI - Professional
Posts: 699
Joined: Mon Dec 13, 2004 1:50 pm
Location: Tannhauser Gate

Changing validator user functions file programmatically

Post by MikeGale » Fri Apr 10, 2015 1:05 am

Hi,

I'm considering automating some work with CSE, using the batch wizard.

Part of it involves customised validator user functions code, for each batch.

I'm not sure how best to achieve this.
  • The user function files are set in a GUI then saved, and I don't see that setting in a veo file, which otherwise seems a good approach.
  • Another approach might be to write an Interop assembly and set it using that. A heavyweight approach, that I'd prefer to avoid.
  • I could edit a functions file programmatically, though that might be clumsy and restrictive, if I'm running a few of these.
  • Consider other architecture for what happens in the functions file.
Have I missed a way to achieve this?

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3198
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Changing validator user functions file programmatically

Post by Albert Wiersch » Fri Apr 10, 2015 8:21 am

Hi Mike,

Are you referring to the user function file for the Batch Wizard? If so, then each target list can have its own user function files. In this case the user function files are saved in each target list... but you probably already know this. :)

But I assume that you want to alter the user function files that are specified in the Validator Engine Options. You are right that they are not included in VEO files. I think I did that to prevent possible problems with sharing settings and paths. How about I add an export option to include the user function files in VEO files? Then you could check that option and export the settings. I think this sounds like the easiest approach and it should not be that difficult to implement.
Image
Albert Wiersch

User avatar
MikeGale
Rank VI - Professional
Rank VI - Professional
Posts: 699
Joined: Mon Dec 13, 2004 1:50 pm
Location: Tannhauser Gate

Re: Changing validator user functions file programmatically

Post by MikeGale » Fri Apr 10, 2015 7:36 pm

Yep, I'm thinking of the Validator code.

That export option is an excellent solution. I like that.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3198
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Changing validator user functions file programmatically

Post by Albert Wiersch » Fri Apr 10, 2015 9:56 pm

Great. I'll work on this next week and get back to you.
Image
Albert Wiersch

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3198
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Changing validator user functions file programmatically

Post by Albert Wiersch » Mon Apr 13, 2015 4:29 pm

Hi Mike,

I've just emailed you a link to a new version to try.

Please check the export option in the Validator Engine Options to export the user functions file(s) (it should default to unchecked). You'll probably want to also make sure that the option to to load the config is checked so you are not prompted for a reload when you import the VEO file and the user functions file(s) change(s).

Please let me know how it works.
Image
Albert Wiersch

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests