[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

[wml] Problems with quotes, mp4h and ePerl



On Tue, Jul 18, 2000 at 12:40:07AM +0200, Denis Barbier wrote:
[...]
> In conclusion, it is important to understand these points:
>  * Quotes are used to group words in tag attributes.
>  * It is impossible to determine whether double quotes are used to group
>    words or must be printed on output.  For this reason, they are always
>    removed from output when in attributes (this is a convention).
[...]

[Fritz, i did not check yesterday how huge your attachment was.
Please limit posts to this mailing-list to ~10Ko.]

There may be an alternative, let innermost tag decide if quotes must be
removed, and outer tags do not suppress remaining quotes.  This is
performed by the patch below.
With this patch, wml rebuilds your site (i did not check if it does it
right).

I fear there are some side effects, so it needs more testing.
But if it works, there is no more problems with quotes and ePerl ;-)

--- wml_backend/p2_mp4h/src/input.c	2000/07/04 20:25:13	1.27
+++ wml_backend/p2_mp4h/src/input.c	2000/07/18 08:48:48
@@ -1154,9 +1154,6 @@
 
             case READ_ATTRIBUTE:
             case READ_ATTR_VERB:
-              type = TOKEN_QUOTE;
-              break;
-
             case READ_ATTR_ASIS:
             case READ_ATTR_QUOT:
               obstack_1grow (&token_stack, '"');
--- wml_backend/p2_mp4h/src/macro.c	2000/07/06 22:36:49	1.30
+++ wml_backend/p2_mp4h/src/macro.c	2000/07/18 08:51:22
@@ -215,8 +215,9 @@
 
         case TOKEN_QUOTE:
           in_string = !in_string;
-          obstack_grow (obs, TOKEN_DATA_TEXT (&td),
-                  strlen (TOKEN_DATA_TEXT (&td)));
+          if (expansion == READ_ATTR_ASIS || expansion == READ_ATTR_QUOT ||
+                  group_level > 0)
+            obstack_1grow (obs, '"');
           break;
 
         case TOKEN_QUOTED:

-- 
Denis Barbier
WML Maintainer
______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com