Thanks Jeff. That's definitely a way out. This will help me from deleting the <?xml line whenever the .rvt page is saved by tools like Amaya.
It would be great if we can make it a run-time configuration through directives than a compile time option. Reasonable to expect? Best Regards, Nagu. On Mon, Jul 23, 2012 at 12:11 PM, Jeff Lawson <j...@bovine.net> wrote: > As you know, the "<?" tag is also used by PHP (in its default short tag > mode), so Rivet is not unique in choosing it. In any case, the choice was > already made for the project long ago. > > You can also compile Rivet to use different tags if you really want to > make your configuration even more non-standard... :) > > -DSTART_TAG='"<?"' -DEND_TAG='"?>"' > > > > > On Sun, Jul 22, 2012 at 11:08 PM, Nagarajan Chinnasamy < > nagarajanchinnas...@gmail.com> wrote: > >> Thanks Massimo & Jeff. >> >> However, from a user's perspective, my take on this issue is that >> Rivet should not hijack the entire "<?" tag to itself, especially when >> "<?xml" is a widely-used standard practice. Even before its sent to tcl >> interpretter, why not just emit the whole tag when its not recognized by >> rivet? As it was suggested, having a "<?rivet" tag may also help. >> >> This point leads me to the imagination of having a template that has all >> different things embedded (xml, tcl code, php code etc.). This may need a >> super-template-processing-module as an apache module that dispatches a >> <?xxx block to the right template-processing-module based on configuration >> directives. >> >> Best Regards, >> Nagu. >> >> >> >> On Mon, Jul 23, 2012 at 5:13 AM, Jeff Lawson <j...@bovine.net> wrote: >> >>> If you need to output the XML declaration, you can output it with enough >>> escaping: >>> >>> <?= "\<\?xml version=\"1.0\" encoding=\"UTF-8\"\?\>" ?> >>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" >>> >>> "http://www.w3.org/TR/xhtml11/**DTD/xhtml11.dtd<http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd> >>> [1]"> >>> ... >>> >>> I agree that it is a little bit of a pain to do, but PHP has the same >>> trouble with that character sequence and requires an equivalent workaround. >>> >>> >>> >>> On Sun, Jul 22, 2012 at 5:13 PM, Massimo Manghi < >>> massimo.man...@unipr.it> wrote: >>> >>>> >>>> no way, the <? sequence invariably is parsed by the Rivet parser as the >>>> beginning of a Tcl script section embedded in the template. You have to >>>> remove it. >>>> >>>> Years ago someone suggested to support a different style of embedding >>>> using <?rivet ...?> as tag for the specific reason of not messing up with >>>> XML files. The proposal was filed as as bug #5553, it was acknowledged as >>>> such, but was closed as 'wontfix' anyway. Time for resuming this issue? >>>> >>>> regards >>>> >>>> -- Massimo >>>> >>>> >>>> On 2012-07-22 20:05, Nagarajan Chinnasamy wrote: >>>> >>>>> Hello, >>>>> >>>>> The "<?xml" tag that is part of a simple xhtml document (saved as .rvt >>>>> template) I generated from Amaya W3Cs editor throws error when >>>>> browsed: >>>>> >>>>> <?xml version="1.0" encoding="UTF-8"?> >>>>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" >>>>>> >>>>>> "http://www.w3.org/TR/xhtml11/**DTD/xhtml11.dtd<http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd>[1]"> >>>>>> <html >>>>>> xmlns="http://www.w3.org/1999/**xhtml<http://www.w3.org/1999/xhtml>[2]"> >>>>>> >>>>>> <head> >>>>>> <meta http-equiv="content-type" content="text/html; >>>>>> charset=UTF-8" /> >>>>>> <title>My First RVT</title> >>>>>> <meta name="generator" content="Amaya, see >>>>>> http://www.w3.org/Amaya/ [3]" /> >>>>>> >>>>>> </head> >>>>>> <body> >>>>>> <h1>My First RVT</h1> >>>>>> </body> >>>>>> </html> >>>>>> >>>>> >>>>> >>>> >>>> ------------------------------**------------------------------** >>>> --------- >>>> To unsubscribe, e-mail: >>>> rivet-dev-unsubscribe@tcl.**apache.org<rivet-dev-unsubscr...@tcl.apache.org> >>>> For additional commands, e-mail: rivet-dev-h...@tcl.apache.org >>>> >>>> >>> >> >