OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Sterday morning mind games or News from Didier's lab

[ Lists Home | Date Index | Thread Index ]
  • From: "Didier PH Martin" <martind@netfolder.com>
  • To: "'XML Dev'" <xml-dev@ic.ac.uk>
  • Date: Sat, 8 Jan 2000 14:26:24 -0500

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@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@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@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS