1

Looking to format (automated, in application) some html / nvelocity templates. Tidy seems to be the answer for this, however all the .Net ports seem to be problematic and not very well maintained. Most rely on unmanaged code under the covers and that starts imposing other restrictions on the project.

For example, to use the code associated with http://www.codeproject.com/KB/mcpp/eftidynet.aspx, the projects now has to be a x86 build.

Is there a new preferred solution for doing this? Or is there a completely managed port of TidyHtml that understands nvelocity or allows custom token definition?

2 Answers 2

1

Let's list them:

  • EfTidy
  • ZetaHtmlTidy (mixed-mode, so it needs different assemblies for x86/x64)
  • tidyfornet (managed assembly but depends on external HTMLTidy native dll)
  • TidyATL (ATL wrapper, old, unmaintained, I think it's also mixed-mode and it even requires COM registration?)
  • TidyNet (fully-managed DLL, no external dependencies)
1

Even though it's old and unmaintained, I'm using TidyNet because it's fully managed. Does the job just fine.

BTW: Tidy and NVelocity are completely unrelated. I'd never process NVelocity templates with Tidy as it will probably break them... However you might want to run Tidy to the resulting html after processing the NVelocity template.

3
  • I mention nvelocity, because we are running tidy before running nvelocity, so we are passing certain nvelocity related tokens to tidy for custom handling around those tokens. So they aren't related, but we have to account for those tokens. Sep 8, 2010 at 1:19
  • @Tim: I know, that's why I suggested to run Tidy to the resulting html after processing the NVelocity template Sep 8, 2010 at 1:25
  • unfortunately, that's not an option. The user has to be presented with the template (hence formatted) before the substitutions are made. Sep 8, 2010 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.