From: William D. <wdo...@us...> - 2006-08-29 14:14:54
|
Update of /cvsroot/flexml/flexml In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv22138 Modified Files: flexml.pl Log Message: Allow reference to attribute values in end-tag processing methods. Index: flexml.pl =================================================================== RCS file: /cvsroot/flexml/flexml/flexml.pl,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- flexml.pl 27 Aug 2006 20:47:29 -0000 1.57 +++ flexml.pl 29 Aug 2006 14:14:40 -0000 1.58 @@ -1355,11 +1355,6 @@ } $exitswitch .= " }\n"; } - - - - - # Start or empty tag: initialise attribute list. print "\n"; @@ -1451,7 +1446,7 @@ . " FAIL(\"Required attribute `$attribute' not set for `$tag' element.\");\n"; } } - print " LEAVE; STag_${tagprefix}$myctag(); popbuffer(); " + print " LEAVE; STag_${tagprefix}$myctag();" . (%inmixed ? ' pushbuffer('."${tagprefix}".'pcdata_ix);' : '') . ($mixed{$tag} ? 'pushbuffer('."${tagprefix}".'pcdata_ix); BUFFERSET('."${tagprefix}".'pcdata_ix);' : "${tagprefix}".'pcdata_ix = 0'). ";" . " ENTER($startstate{$tag});\n"; @@ -1466,12 +1461,12 @@ . " FAIL(\"Required attribute `$attribute' not set for `$tag' element.\");\n"; } } - print " LEAVE; STag_${tagprefix}$myctag(); popbuffer();" + print " LEAVE; STag_${tagprefix}$myctag();" . (%inmixed ? ' pushbuffer('."${tagprefix}".'pcdata_ix);' : '') . " ${tagprefix}".'pcdata_ix = 0;' . " ETag_${tagprefix}$myctag();" . (%inmixed ? " ${tagprefix}".'pcdata_ix = popbuffer();' : '') - . "\n"; + . " popbuffer(); /* attribute */\n"; # print $exitswitch; print " }\n"; @@ -1497,6 +1492,7 @@ print " ETag_${tagprefix}$myctag();\n"; print " ${tagprefix}pcdata_ix = popbuffer();\n" if $mixed{$tag}; print " ${tagprefix}pcdata_ix = popbuffer();\n" if %inmixed; + print " popbuffer(); /* attribute */\n"; print $exitswitch; print " }\n"; @@ -1679,23 +1675,17 @@ if ($tag) { while ( s/\{($Name)\}/A_${tagprefix}$ctag{$tag}_$catt{$1}/x ) { - die "\"$ACTIONS\", line $lineno: Attributes only allowed in start tag.\n" - if not $isstart; die "\"$ACTIONS\", line $lineno: Unknown attribute `$1' for <$tag>.\n" if not $atttype{"$tag/$1"}; } while ( s/\{[!]($Name)\}/AU_${tagprefix}$ctag{$tag}_$catt{$1}/x ) { - die "\"$ACTIONS\", line $lineno: Attributes only allowed in start tag.\n" - if not $isstart; die "\"$ACTIONS\", line $lineno: Unknown attribute `$1' for <$tag>.\n" if not $atttype{"$tag/$1"}; } while ( s|\{($Name)=($Name)\}| "A_${tagprefix}$ctag{$tag}_$catt{$1}_" . variablify($2); |xe ) { - die "\"$ACTIONS\", line $lineno: Attributes only allowed in start tag.\n" - if not $isstart; my ($att,$elt) = ($1,$2); die "\"$ACTIONS\", line $lineno: Unknown attribute $1 for <$tag>.\n" if not $atttype{"$tag/$1"}; |