Sterday morning mind games or News from Didier's lab

Didier PH Martin martind at netfolder.com
Sat Jan 8 19:30:48 GMT 2000


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 at netfolder.com
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 at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)





More information about the Xml-dev mailing list