From: William F. D. <wil...@th...> - 2007-10-16 14:05:38
|
On Sat, 2007-10-13 at 09:51 +0200, Martin Quinson wrote: > Hello William, > > What I have in mind is a sort of meta-tag, not needing to be > specifyied in the DTD. Maybe a better way to express what I meant is > to use this kind of notation: > [FOREACH[A][list of elements][text to dupplicate]] > just the same way we have [CDADAT[text to protect]] > or we had the if construct in SGML (can't remember the syntax right > now). But that's so awful, that's incredible. <![CDATA[text to protect]]> is an XML construct described in the standard: http://www.w3.org/TR/REC-xml/ I'd like to keep flexml as close as possible to the standard (I know there are a few things we miss, but I'd rather move torward the standard, not away from it. > Or, you're right, maybe the solution is to do a new generator in the > spirit of fleXML, but dedicated to xsl transformations. After all, > these tags for kinda interpreting the XML are all part of the XSLT > standard. They are a bit verbose in my taste, but that's the way every > body does this out there. The name wouldn't even be hard to find: > fleXSLT ;) I like it (the name "fleXSLT", and the distinction between fleXML and fleXSLT). I am really conflicted about XSLT -- the idea is so good and the syntax is so shitty! I think "verbose" is the kindest thing you could say about it. So doing something in the spirit of xslt, but a saner syntax, seems like a great idea. > And once it's done, having a bit of xslt embeeded within the xml > should be doable, I guess. OK. > But before that, I'm more concerned about the missing rules. I know > better understand what you said to me about 2 years ago. The parsers > never jam nowadays, but the default rule is not very appropriate. Correct. It's a little embarrassing that we don't get better messages out. I'm glad you're looking into it. > My last change set in the code was to have an elegant error message > when a starting tag was misplaced. Previous one was somehting like > "char '<' found when expecting </mytag>". Now, it's "Starting tag > <something> not allowed here". That's a bit better, but I'd like to > have both of the information ("Starting tag <something> found when > expecting </mytag>"). For this I'll have to explicit much more > transitions in the lex file. I'm not sure I understand. Could you please elaborate? > Now, I do one rule for all states where > the tag is not allowed (check lines flexml.pl:1382-1397). But where > the hell can I find what each state wants to get further? Those damn > data structures are not friendly... Man, I need some time to look into this. > Another change direction I'd like to follow is the possible use of > schema instead of DTD as input. Shouldn't be hard, and not intrusive > either (only parsechildren needs to be changed). Just need some more > time ;) Schemas -- that's another area where I'm out of sync with the popular view. Everybody is moving to schemas (so you are right, supporting then in flexml is a great idea) but personally I think they are so ugly and avoid them when I can. -- William F Dowling wil...@th... www.scientific.thomson.com |