We have implemented report parser in C#. Bacause things are spinned around C#, a schema definition is changed.
We have started from classes defining a report definition tree, annotated these classes for xml serialization, and, finally, produced xml schema for such tree. So, at present, it is not an xml schema with annotations but a separate xml schema.
In addition we have defined APIs:
IEnumerable<ViewValue>
XmlReader
XmlWriter
An example of report definition as C# code is: MyReport.cs. The very same report definition but serialized into xml is my-report.xml. A generated xml schema for a report definition is: schema0.xsd.
The good point about this solution is that it's already flexible enough to describe every report layout we have at hands, and it's extendable. Our measurments show that report parsing is extremely fast and have very small memory footprint due to forward only nature of report definitions.
From the design point of view report definition is a view of original text data with view info attached.
At present we have defined following views:
To specify details of definitions there are:
Add
Div
Integer
MatchProperty
Max
Min
Mod
Mul
Neg
Null
Sub
VariableRef
ViewProperty
Case
And
EQ
GE
GT
IsMatch
LE
LT
NE
Not
Or
At present there is no a specification of a report definitions. Probably, it's the most complex part to create such a spec for a user without deep knowledge. At present, our idea is that one should use xml schema (we should polish generated schema) for the report definition and schema aware editor to build report definitions. That's very robust approach working perfectly with languages xom.
C# sources can be found at: ReportLayout.zip including report definition classes and a sample report.
Remember Me
a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u