--- In xpl-dev@y..., cagle@o... wrote:
About XML Pipes
I recently wrote a case study for Wrox in which I started building an
XSLT framework called XPipes. It is intended as a framework for
developing web output quickly, although it incorporates a lot of what
I've mentioned in previous posts -- the double pass XSLT processing,
the conversion of simple tag/attribute elements into object requests,
the definition of more sophisticated scripts. It's still not simple
enough, principally because of namespace limitations, but it's
getting there.
For example, the following is a working XPipes page:
<!-- sampleDoc.xml -->
<xp:document xmlns:xp="http://www.vbxml.com/xp">
<param name="title">My Document</param>
<param name="author">Kurt Cagle</param>
<param name="email">cagle@o...</param>
<param name="user"/>
<xp:script name="string" namespace="http://www.vbxml.com/string"/>
<xp:body onclick="alert('This is a test!')">
<h1><out>$title</out></h1>
<h2><link href="mailto:{$email}"><out>$author</out></link</h2>
<var name="sample_text"><p>Hello, #user, this is a sample of
your web page.</p></var>
<out>string:replace_text($sample_text,'#user',$user)</out>
</xp:body>
</xp:document>
If you then pass the following URL:
http://localhost/xpserver.asp?source=sampleDoc&title=A New
Page&user=John Doe
then the XP page, when doubly parsed will generate as output:
<html>
<head>
<title>A New Page</title>
</head>
<body onclick="alert('This is a test!')">
<h1>A New Page</h1>
<h2><a href="mailto:cagle@o...">Kurt Cagle</h2>
<p>Hello, John Doe, this is a sample of your web page.</p>
</body>
</html>
It gets more complex than this -- I have tables, forms, and treeview
controls that all work within this paradigm as well -- but you get
the general idea.
-- Kurt Cagle
--- End forwarded message ---
|