From: Sven E. <sve...@we...> - 2001-10-13 22:11:06
|
er...@go... schrieb am 13.10.01: > > I just noticed that there is a problem with > > > > $GOBO/example/test/concat1/build.eant > > > > On line 67, column 76 > > > > <getest config="getest.cfg" compile="geant compile_ise > xcompile.log 2>&1"/> > > > > is used. > > > > 2>&1 > > > > is a problem for the xml parser. > > Yes I know, I had to modify the parser to accept that. > Are you saying that it is not correct XML? If it doesn't Yes, I think so. If you try to load it into an XML editor after having copied it from build.eant build.xml (or loading it with netscape 6.1 as I do) you should get an error message. > I would consider that as a flaw in the XML specification > because in a string the XML special characters should > not be special anymore. Look at Eiffel: special Eiffel > characters (e.g. +, *, <, ...) are not special in strings. Might be a flaw but that's how it is. > > > A solution would be to make the xml parser capable of recognizing > > CDATA sections (search for CDATA on www.zvon.org for more information). > > This would turn the above statement into this one: > > > > <getest config="getest.cfg" > > compile="<![CDATA[geant compile_ise > xcompile.log 2>&1]]"/> > > Actually at first I thought of writing: > > <getest config="getest.cfg" compile="geant compile_ise > > xcompile.log 2>&1"/> > > but when I looked at the XML parser code, it didn't seem > to interpret entities like that. Does it? I am not sure if I understood you correctly. If you are talking about xml entities you are right: they are not handled. If I remember correctly < would translate into < > would translate into > and there are many others. > > The XML Bible book says: "The only characters an attribute > value may not contain are the angle brackets < and >, though > these can be included using < and > entity references." > As I said ealier, I don't understand why < and > are forbidden > in strings. Anyway, wouldn't > and & be easier to > implement than CDATA? I think implementing CDATA would simply mean recognizing the token, switching into a CDATA start condition, pass the text until the end CDATA token to the parser and that's it (I hope). It would also be useful for the description tag, if we would like to place tokens there which are xlm tokens; e.g. when the description contains xml examples. - Sven _______________________________________________________________________ 1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de Ih...@we..., 8MB Speicher, Verschluesselung - http://freemail.web.de |