From: Martin Q. <mar...@lo...> - 2006-08-27 21:24:09
|
Hello William, after your fixes around the memleak on bufferstack, it looks like tag attributes are not available from the ETag_* functions, but only from the STag_* ones.=20 I'm not sure this is a good thing, since I actually had a parser which used this bug/feature. I fixed my code to only use attribute content in S_*_fun, but it would be cool if you could change the way things are done to allow us to access attributes from the E_*_fun too.=20 Sorry, I have to confess one more time that my understanding of the flexml internals don't allow me to do the change myself. Bye, Mt. --=20 Those are my principles, and if you don't like them... well, I have others. -- Groucho Marx |
From: William F. D. <wil...@th...> - 2006-08-28 14:47:26
|
On Sun, 2006-08-27 at 23:23 +0200, Martin Quinson wrote: > Hello William, > > after your fixes around the memleak on bufferstack, it looks like tag > attributes are not available from the ETag_* functions, but only from the > STag_* ones. This is true. > I'm not sure this is a good thing, since I actually had a parser which used > this bug/feature. I fixed my code to only use attribute content in S_*_fun, > but it would be cool if you could change the way things are done to allow us > to access attributes from the E_*_fun too. OK, I'll look to see what needs to be changed to get that working. I was thinking that code that uses attributes should be in the start-tag processing where the attributes exist, but I also see the convenience of being able to refer to them later when processing the end tag. This is another case where it would be nice to have a minimal example test case in the testbed/ directory. Thanks, Will -- William F Dowling wil...@th... www.scientific.thomson.com |
From: William F. D. <wil...@th...> - 2006-08-28 16:18:38
|
On Sun, 2006-08-27 at 23:23 +0200, Martin Quinson wrote: > Hello William, > > after your fixes around the memleak on bufferstack, it looks like tag > attributes are not available from the ETag_* functions, but only from the > STag_* ones. > > I'm not sure this is a good thing, since I actually had a parser which used > this bug/feature. I fixed my code to only use attribute content in S_*_fun, > but it would be cool if you could change the way things are done to allow us > to access attributes from the E_*_fun too. I have looked into this; and it looks like a very simple change for me to make. However, I am a little puzzled how the generated parser was letting this through before my changes. There is code in flexml.pl (lines 1680, 1687, 1695) that to me seems to prohibit refering to attributes inside the end-tag processing code: die "\"$ACTIONS\", line $lineno: Attributes only allowed in start tag.\n" if not $isstart; Had you disabled this code somehow, or was there some case that was being missed, in the code around lines 1677-1702? Thanks, Will -- William F Dowling wil...@th... www.scientific.thomson.com |
From: Martin Q. <mar...@lo...> - 2006-08-29 09:43:20
|
On Mon, Aug 28, 2006 at 12:18:20PM -0400, William F. Dowling wrote: > On Sun, 2006-08-27 at 23:23 +0200, Martin Quinson wrote: > > Hello William, > >=20 > > after your fixes around the memleak on bufferstack, it looks like tag > > attributes are not available from the ETag_* functions, but only from t= he > > STag_* ones.=20 > >=20 > > I'm not sure this is a good thing, since I actually had a parser which = used > > this bug/feature. I fixed my code to only use attribute content in S_*_= fun, > > but it would be cool if you could change the way things are done to all= ow us > > to access attributes from the E_*_fun too.=20 >=20 > I have looked into this; and it looks like a very simple change for me > to make. Good news! > However, I am a little puzzled how the generated parser was letting this > through before my changes. There is code in flexml.pl (lines 1680, > 1687, 1695) that to me seems to prohibit refering to attributes inside > the end-tag processing code: >=20 > die "\"$ACTIONS\", line $lineno: Attributes only allowed in > start tag.\n" > if not $isstart; >=20 > Had you disabled this code somehow, or was there some case that was > being missed, in the code around lines 1677-1702? It's because we don't use an action file, but instead we override the STag_*_fun pointer directly to put a function of ours there. In that case, there is not much the perl parser can do against our misuses ;) Bye, Mt. --=20 Le cycliste zigzaguait sur la route, tant=F4t =E0 gauche, tant=F4t =E0 droi= te, avant que je puisse le t=E9lescoper. -- perles du courrier des assurances 2003 |