On Jan 14, 2011 1:17 AM, "Kornel Lesiński" <kor...@geekhood.net> wrote:
> On Thu, 13 Jan 2011 10:22:52 -0000, Tjerk Meesters <
tjerk.meest...@gmail.com> wrote:
>> Here's the problem; it throw an error, saying that the myns namespace
>> is not defined ... is that expected?
> Yes (if I understood correctly what you're trying to do).
> PHPTAL checks correctness of namespace declarations from perspective of
source files, not the output (it probably should check output too, but
that's a harder problem).

I would say it has to only check on the full output, but I also realize that
might be tougher ;)

> So if a file, looked at in isolation (before macros are executed), doesn't
have required xmlns, that's an error according to XML.
> I have a mixed feelings about enforcing XML strictness. It's sometimes
annoying, OTOH it's a bit dishonest to call TAL an XML language when it
doesn't play by XML rules.

Essentially I'm using my own namespaces to do on-the-fly replacements, after
which the namespaced element is gone, much like how the tal: is gone after
parsing the template, i.e. it only has meaning before that.

What I would like, therefore, is either:
a) a way to define my own namespace programmatically before parsing starts
b) a way to relax the parser so that namespace checking is not enforced,
like how tal ns is also not enforced
c) only do namespace checks on the output

> --
> regards, Kornel Lesiński
> _______________________________________________
> PHPTAL mailing list
> PHPTAL@lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
PHPTAL mailing list

Reply via email to