[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: "XMLSON" Idea.


david lyon 1987
On 7/26/06, David Lyon <david.lyon@p...> wrote:
> On Wed, 2006-07-26 at 12:54 +0200, Tei wrote:
> > He!.
> > ..
> > I have a idea that can be fun.
> >
> > <?xml?>
> > <sales vendor='John'>
> >    <item id="carrot" price="3" quantity="10"/>
> >    <item id="papas" price="5" quantity="3"/>
> > </sales>
> >
> > "Magic goes here".
> > Javascript:
> >
> >  alert( staticClone.sales.carrot._quantity );// will croack 3
> >
> >  alert( staticClone.sales._vendor );// will croack John
>
> lol :-)
>
> Is that real code or hypothetical?

hypothetical :D

>
> (why mr-google says doesn't know xmlson?)
>

I made-up the name, of course.

> hypotheticalscript:
>
>  // -- Ding when the price falls below 2.25
>  alert( staticClone.sales.carrot._price < 2.25);
>
> Would be much more useful. That is generate an alert when there is
> somebody with a carrot price of less than $2.25.

I provide the code as a example of the syntax. Its not usefull, as
most examples:


int main() {
  printf("hello world");
}


Often real world examples are much more complex, so are "bad" examples:

#include <sys/cdefs.h>
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1987, 1993\n\
	The Regents of the University of California.  All rights reserved.\n");
#endif /* not lint */

#ifndef lint
#if 0
static char sccsid[] = "@(#)yes.c	8.1 (Berkeley) 6/6/93";
#endif
__RCSID("$NetBSD: yes.c,v 1.8 2006/04/24 05:24:03 jld Exp $");
#endif /* not lint */

#include <stdio.h>
#include <stdlib.h>

int
main(int argc, char **argv)
{
	const char *yes;

	yes = (argc > 1) ? argv[1] : "y";

	while(puts(yes) >= 0)
		continue;

	return EXIT_FAILURE;
}

--Tei

postdata:
javascript is scripting and is evaluated, java is programming with
strict type checking and is compiled. Wildly different animals.

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.