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

Sterday morning mind games or News from Didier's lab

  • From: "Didier PH Martin" <martind@n...>
  • To: "'XML Dev'" <xml-dev@i...>
  • Date: Sat, 8 Jan 2000 14:26:24 -0500

sterday
Hi,

After two hours of cross-country skiing and getting back to Didier's lab to
Work on the DSSSL-2 scope of work. I started daydreaming about XSTL,
multiple groves path access, Onimark, procedural vs rule based systems,
etc...

These funny constructs emerged:

<xsl:template match="booklist/item">
<!cdata[
	(make display-group
		(make box
			(literal "Is this weirdo??")
			(make rule)
			(make paragraph)
		)
	)
	]]>
	<xsl:apply-templates select="."/>
</xsl:template>

or this one

node "Booklist" 'this is an XPath expression matched to the <booklist>
element node
	output "<html>" & _
	 	 "<body>"
	access_database()
	output "</body>" & _
	 	 "</html>
end node

sub access_database()
	Set db = getobject("ADODB.Connection")
	db.Open "Yop", "yop", "yop"
	set Items = db.Execute("select * from item")
	do while not Items.EOF
		output "<title>" & Items("title") & </title>"
		output "<author> & Items("author") & </author>"
	Loop
end sub

or even better, this one:

node "Booklist" 'this is an XPath expression matched to the <booklist>
element node
	<html>
		<body>
		access_database
		</body>
	</html>
end node

sub access_database()
	Set db = getobject("ADODB.Connection")
	db.Open "Yop", "yop", "yop"
	set Items = db.Execute("select * from item")
	do while not Items.EOF
		<title>Items("title")</title>
		<author>Items("author")</author>
	Loop
end sub

I particularly like the last one because it merges the procedural world and
the rule based world. It also keeps the template kind of constructs without
the ugly <% %> as found in ASP or JSP. You can as well imagine the same
constructs with a Java syntax, a Javascript syntax, a Perl syntax, a tcl
syntax or a Python syntax. Let's hope now that priests won't burn me for
heresy :-))

Cheers

Didier PH Martin
----------------------------------------------
Email: martind@n...
Conferences: Web New York (http://www.mfweb.com)
Book to come soon: XML Pro published by Wrox Press
Products: http://www.netfolder.com


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@i... the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)



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-2013 All Rights Reserved.