Martin Klang | 1 Oct 12:41 2007

Rebel IT: Open source support and commercial services

Hello all,

I'm pleased to announce that Rebel IT Ltd, a UK based company that I  
am involved in, are providing expert support and commercial services  
for o:XML projects and technologies.

The company undertakes bespoke software development projects for  
large and small clients. We also do pure consultancy, and are happy  
to chat with you about almost anything IT.

Rebel IT can provide commercial licences for most of the various  
o:XML related projects, including ObjectBox, MLML, hatatap and others.

The Rebel IT website will develop over time to feature news and  
updates for a range of exciting open source projects.

For more information please check out: http://www.rebel-it.com/

best regards,

/m
sudhir.parisaboyina | 22 Aug 14:45 2007

Query on YAPP Usage

 

Hi,

 

We have a query on YAPP usage.

 

A brief about our requirement:

A BNF rule has to be used to validate a data to see whether it is as per that BNF rule. (Assume 3.45 (data) is according to BNF rule say Fraction Number)

 

Our understanding about YAPP:

We understand from the document available <at> http://www.o-xml.org/yapp/ that YAPP can be used to convert a BNF rule into XML and XSLT, and it also says that the parser can be called using the call-template from another xsl stylesheet.

 

 

We have added a small BNF Rule to the existing xpath-grammar.bnf under <bnf> element as below.

 

number ::= [.0123456789];

Expression ::= AdditiveExpression end;

AdditiveExpression ::= number | AdditiveExpression minus number | AdditiveExpression plus number;

 

 

After giving make, we see a <xsl:template name="p:AdditiveExpression"> .. .. ..  .. </xsl:template> in the bnf-parser.xsl file.

 

 

When we tried calling this name template through an outsider xsl stylesheet we are getting compilation issue.

 

Pls help us to know if our understanding about YAPP is correct or not and how to use the bnf-parser.xsl file. Also, it would be great for us if we are provided with YAPP detailed documentation or any user guide to understand it’s specifications & usage thoroughly.

  

 

 

Below is the snapshot of our xsl style sheet.

 

<xsl:template match=”/”>

.

.

<xsl:call-template name="p:Expression">

<xsl:with-param name="in" select="'123 + 456 - 789'"/>

</xsl:call-template>

.

.

</xsl:template>

 

 

Any sort of help would be highly appreciated.

 

 

Thanks & Regards,

Pnvd Sudhir

 


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com
_______________________________________________
o-xml mailing list
o-xml@...
http://lists.pingdynasty.com/mailman/listinfo/o-xml
Martin Klang | 2 May 23:59 2007

o:XML 5th anniversary


Yesterday, May 1, marked the 5th anniversary of the o:XML project. We  
can look back on five years of intense and exciting developments.  
o:XML now comprises a whole family of highly interesting, innovative  
and in some cases cutting edge technologies.

It's also been five years of o:XML proving itself as a language fit  
for large scale, production grade projects. A series of commercial  
projects have been undertaken with o:XML as the core language  
technology, where it has delivered   robust, high-performance, on- 
time and on-budget solutions. Through this work, and through the  
close relationship we have with many of our users, o:XML has matured  
in a way that would not otherwise have been possible.

Looking to the future is always more important than looking at the  
past. Work is currently underway to produce the next generation of  
o:XML tools and technologies. Important language changes will be  
incorporated in an all-new compiler/interpreter. These changes  
represent an important coming of age for o:XML, incorporating all of  
the lessons learned in the last five years.

The new toolset, called ObjectBox2 (keeping it simple!), is based  
around MLML [1] and brings with it a host of improvements. Amongst  
other things you can expect to see improved contextual error  
messages, compiler error detection (including type checking!), multi  
schema validation, further improved integration with other  
technologies and much enhanced execution performance. This short list  
belies the depth of the changes; the next generation tools will allow  
for quite different methods of development to be undertaken.

The new generation tools will position o:XML not only as a solid  
general purpose programming language, but also as a uniquely powerful  
domain specific language that can be applied to all XML problems,  
from almost any chosen application platform.

Another important change is that commercial o:XML services is soon to  
be offered by an industry consultancy group specialising in XML and  
compiler technologies.

I hope that you will find these developments as exciting as I do.  
Thank you all for your support over the years, and for the support  
that you keep lending the o:XML endeavour.

best regards,

/m

[1] http://www.o-xml.org/projects/mlml.html
Martin Klang | 24 Apr 13:56 2007

Bug #47, Element.number() returns NaN

Hi,

Hugo Fernandez discovered a bug which results in Element.number()  
returning the wrong value, see http://bugz.pingdynasty.com/ 
show_bug.cgi?id=47 for details.

The bug has now been fixed in cvs, the fix will be included in the  
next release.

regards,

/m

On 4 Apr 2007, at 5:45, Hugo Fernandez wrote:

>
>
> Hello Martin,
>
>
> I am getting into o:xml and I was executing the tutorial examples.  
> I have come
> accross some doubts that I would like to ask you.
>
> In chapter 6, there is the following code:
>
>   <o:variable name="stock">
>     <product name="stereo">
>       <price>250.00</price>
>       <condition>flawless</condition>
>     </product>
>   </o:variable>
>
>   <!-- output the price plus VAT -->
>   <o:eval select="$stock/product/price.number()* 1.175"/>
>
> This gives NaN as a result
Martin Klang | 23 Apr 12:42 2007

Upcoming o:XML language changes

Hello all,

I'm planning to implement some fairly substantial language changes to  
o:XML and o:Lib. The new language version will be called o:XML 1.2,  
which will be implemented in ObjectBox v1.2.0.

The most visible change will be a new naming convention, which will  
give more consistent, and hopefully meaningful names to all built in  
and o:Lib types and functions.

The naming convention will be, in short:
Type names: UpperCamelCase, eg SystemError
Type functions: UpperCamelCase, eg GetStackTrace()
Global functions (eg XPath functions): hyphenated lower case, eg  
normalize-space()

Another important, and necessary, change is to do with type  
declarations and nodesets. Nodesets are used in o:XML as general- 
purpose lists, similar to tuples or arrays in other languages. Type  
declarations will be extended to allow the following notation:
Type - cardinality 1; denotes a single node of type 'Type'.
Type? - cardinality 0 or 1; either an empty nodeset or a single node  
of type 'Type'.
Type+ - 1 or more nodes of type 'Type' (ie a single node, or a  
nodeset with more than one nodes of type 'Type').
Type* - 0 or more nodes of type 'Type'.

hence a function can be declared thus:
<o:function name="AddNumbers">
   <o:param name="nums" type="Number+"/> <!-- 1 or more Numbers -->
or
<o:function name="CheckValid">
   <o:param name="item" type="String?"/> <!-- 0 or 1 Strings -->

The change means, amongst other things, that you cannot pass an empty  
nodeset instead of a String to a function which expects a String or  
String+.

Thirdly, the built in type hierarchy is subject to change. The  
current proposal is to introduce a new top-level type called Object.  
Object will have two main subtypes, Node (for XML constructs) and  
Value (for value-types), though other types may also inherit directly  
from Object.
Node will still be the super type of all different XML constructs,  
though String, Number and Boolean will be moved to inherit directly  
from Value. They will be replaced under Node by a new type called  
Text (representing all types of PC data).

The time schedule for these changes are to finalise the new language  
and produce a beta compiler in the next 2-3 weeks. Before the new  
version is made public, a new release of ObjectBox will be done that  
supports the current language variant.

Please let me know what you think about the proposed changes, and if  
you feel there are others which should be added to the list.

best regards,

/m
Martin Klang | 20 Apr 18:45 2007
Picon

Re: Dynamic evaluatino of XPath expression - should java:evaluate() work?

Eric,

try something like
<o:set file="io:File("output.xml")"/>
<o:do select="$file.write($output)"/>
<o:set program="Program($file.path())"/>
<o:set result="$program.run()"/>

you can also set program parameters before running it with
<o:do select="$program.parameter($name, $value)"/>

hth,

/m

On 18 Apr 2007, at 19:57, Hilfer, Eric wrote:

> I'll try writing a second program file dynamically.  Could you  
> remind me
> how to invoke a program that is in another file?
>
> Thanks,
> Eric
Cefn Hoile | 19 Apr 01:53 2007

Planning Project to use YAPP - confused on AST Tree Walker

I've been seeking a suitable XML format and supporting toolset to  
store both an abstract grammar and the mapping from an instance of  
the grammar (abstract syntax tree) to executable programs in a target  
language.

I'm aiming to learn the basics of compiler design by re-creating a  
subset of ECMAScript, (control flow, arithmetic and boolean logic),  
but where the javascript is written from an abstract syntax tree  
(AST) stored in XML directly e.g.

<if>
	<equals>
		<sum>
			<number>2</number>
			<number>2</number>
		</sum>
		<number>4</number>
	</equals>
	<assign>
		<property>world</property>
		<string>consistent</string>
	</assign>
</if>

The grammar (also represented in XML, as in the case of YAPP) should  
ensure that the original tree is indeed a valid construct, and  
traversing the tree should spit out ECMAscript, in this example...

if(2 + 2 == 4){
	world = 'consistent';
}

...and then this should run in an ECMAscript interpreter as a proof  
of concept.

I'm finding the YAPP introduction intriguing (I think I'm on the  
right track looking at YAPP), but rather confusing because it's  
essentially recursive - it uses it's own BNF grammar translator as  
the main example.

Is there somewhere else where there's a nice simple YAPP example  
(e.g. a language translator/compiler, not a grammar translator) which  
would help me understand where the placeholders equivalent to this  
kind of ANTLR file might go...
http://supportweb.cs.bham.ac.uk/docs/tutorials/docsystem/build/ 
tutorials/antlr/files/expression.g

I think I can see how the AST is constructed (or traversed), but not  
so easy to make out if there's a convention for where the target  
output code should be plugged in, e.g. I can provide this kind of  
basic info in whatever format and whatever input file if I can only  
find the right place...

			'if(', 	[bool], 	'){',
				[stmnt],
			'}'

			[number], '==', [number]

			[property], '=', [number]

This is a clumsy blend of tokenizer's events with the required output  
to my target language, but hopefully illustrates the point. Where  
does this info on the final target output (the bits in quotes) get  
put in the YAPP approach, in a way which reflects the relationship  
between these strings and the production rules themselves, and hence  
is used to traverse the AST?

ANTLR is capable of this, I think, and employs a number of variants  
on BNF for the various defs (lexer, parser, tree walker).

However I'm really keen on getting this info into XML in the place of  
BNF.

Once this data's in an XML format I hope to construct useful reports  
on the grammar tree and in example abstract syntax trees using the  
expressive power of XPath This is where the YAPP approach would be  
very cool if I can get my head around it, as it would make pretty  
well the whole toolset based on XML technologies.

Any assistance pointing me to examples would be useful.

Cefn
Hilfer, Eric | 18 Apr 19:06 2007

Dynamic evaluatino of XPath expression - should java:evaluate() work?

I have a file with a list of xpath expressions.  Using a hatatap o:Xml script, I want to evaluate each of those strings as an xpath path against a $dom variable that has been loaded by a POST request.

 

Is there a dynamic evaluation function in o:Xml?  I have tried using java:evaluate( $stringPath, $dom) but is always returns an empty result, I think.

 

Thanks for your help!

 

 

_______________________________________________
o-xml mailing list
o-xml@...
http://lists.pingdynasty.com/mailman/listinfo/o-xml
Martin Klang | 26 Mar 02:24 2007

ObjectBox v1.1.7 : Spring Integration


Finally in a public release, the new ObjectBox v1.1.7 now offers  
complete Spring 2.0 integration.

As usual you can get the release from the download page [1].

There's a new article [2] in the documentation describing how to  
create and use o:XML beans in Spring. It also has ideas for use  
cases, scenarios where delegating to o:XML beans can make a big  
difference in your application.

enjoy!

/m

[1] http://www.o-xml.org/download/
[2] http://www.o-xml.org/documentation/obox-spring.html
Martin Klang | 14 Mar 20:21 2007

ObjectBox v1.1.6

The documentation for the new ObjectBox v1.1.6 is now up on the  
website [1].
Notably the Database Extensions [2] have been revamped and got a  
couple of new features.

The release includes: Added functionality to provide alternative SQL  
commands for different SQL dialects. Updated db:result parameters to  
use SQL type mappings. Added generated nodes() function for Element  
subtypes for quick, automatic object serialisation. Updated o:for- 
each to maintain the context position during iteration. Improved  
support for SML and SML macros. Bugfixes and improvements to  
performance and useability.

The full change log is available here [3].

have fun!

/m

[1] http://www.o-xml.org/
[2] http://www.o-xml.org/documentation/obox-db-extensions.html
[3] http://www.o-xml.org/objectbox/changes.txt
Francisco | 19 Feb 12:20 2007
Picon

To find ProgramFactory

Dear Martin,
 
I couldn't find the class "ProgramFactory" as the example below. I am wondering what package should I "import"?
 
I even tried to look at the objectbox, but couldn't find it. Could you please kindly let me know where I can find it? Your great help is highly appreciated.
 
Looking forward to your reply.
 
 
Kind regards,
Francisco
 
 
====================================================
import org.oXML.type.*;
import org.oXML.engine.*;
...
String systemId = "your-file.oml";
Name functionName = new Name("your-function");
Type[] signature = new Type[]{}; // default sig, ie your-function()
Node[] args = new Node[]{}; // empty args
...
ProgramFactory pfactory = new ProgramFactory();
pfactory.loadDefaultExtensions();
InterpretedProgram program = pfactory.getProgram(systemId);
pfactory.compile(program);
Function func = program.getResolver().getFunction(functionName, 
signature);
RuntimeContext env = new RuntimeContext(program);
Node result = func.invoke(args, env);
String stringResult = result.stringValue();
======================================

Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. Do it now...
_______________________________________________
o-xml mailing list
o-xml@...
http://lists.pingdynasty.com/mailman/listinfo/o-xml

Gmane