Re: [SrcML] XML rationale
Status: Beta
Brought to you by:
crashchaos
From: Frank R. <fra...@un...> - 2005-11-19 14:33:06
|
On Sat, Nov 19, 2005 at 03:15:34PM +0100, Icaro wrote: > From the SrcML home page: "You can get the current version of the Schema > __here__" > . > but the Schema is not available :-( Sorry. The link was wrong there. I corrected it and you can find the schema here: http://cvs.sourceforge.net/viewcvs.py/srcml/srcml/srcml.xsd?view=markup Thanks for the notice. > Where I can find documentation about the "rationale" about the XML > structure you have chosen to be language independent? The current schema is rather heavily leaned against similar efforts from the srcML and javaML projects. There is a definite need to improve this schema. Currently it's still too closely related to a parser's AST which I find is rather confusing at times. Maybe I have some time during my diploma thesis to work on that a bit. To give a simple idea of what I'm talking about here imagine a normal class and a method in that class. Right now the schema dictates that the structure has to look like this: <class ...> <block> <method...> </method> </block< </class> simply because the java syntax uses these { .. } brackets for the class' body. So the block tag is not really containing any useful information at this point and methods (as well as variable declarations) should rather go directly under class. It's also more intuitive for XPath users to write class[@name="MyClass"]/method[@name="foo"] instead of having to write class[@name="MyClass"]/block/method[@name="foo"]. Of course all this will be transparent when using the supplied API, but it's still a bit of a hazzle when working directly on the XML f.ex. with an XSL transformation. So in short: There's still a lot of work to do on the schema and it can't be considered ready for handling other languages nor should it be considered stable. PS: Also every new language will come with new features which have not been added to the schema yet and require a modification to it. Hopefully we can modify the schema to a point where these modifications are only additions (as opposed to a real modification) -- Raiser, Frank Student @ University of Ulm (www.uni-ulm.de) We stand today at a crossroads: One path leads to despair and utter hopelessness. The other leads to total extinction. Let us hope we have the wisdom to make the right choice. (Woody Allan) |