D For A Web Developer
Nick Sabalausky via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 30 09:02:23 PDT 2014
On 4/30/2014 10:53 AM, Adam D. Ruppe wrote:
> On Wednesday, 30 April 2014 at 12:26:06 UTC, Nick Sabalausky wrote:
>
>> Then I use Adam's dom.d (in non-strict mode) to read the HTML form
>> template (preserving the templating stuff)
>
> I use strict mode for that stuff, keep in mind strict mode is about
> well-formedness, not validation. So it accepts custom tags and
> attributes easily enough.
Well, I've been using mustache-d as my main templating engine, which is
just a general text preprocessor (Although I'm kinda eyeing that other
text preprocessor that uses actual D code). IIRC, I think there were
some cases where the my templates involved some non-well-formedness that
the DOM's non-strict mode was perfectly happy with. Whatever it was, I'm
sure there was *something* I was doing that strict mode was tripping up
on. May have been an old version of the DOM, too.
Granted there are still things I have to refrain from doing in my HTML
form templates because it would violate well-formedness *too much* even
for an ultra-relaxed HTML DOM. But those cases always have other
(arguably more sanitary) ways to accomplish the same thing.
More information about the Digitalmars-d
mailing list