midrange.com code scratchpad |
Name:
Running SQL Template
|
Scriptlanguage:
Plain Text
|
Tabwidth:
4
|
Date:
03/22/2011 10:38:19 pm
|
IP:
Logged
|
|
Description:
Running SQL to build a list in HTML
|
Code:
- <xmli:template xmlns:xmli="http://www.sourceforge.net/xmli"
- xmlns:cgi="http://www.larryducie.com/cgi"
- ccsid="819" format="pretty" >
-
-
- <html>
- <head>
- <title>Active Jobs</title>
- <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css" />
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
- <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js"></script>
- </head>
- <body>
-
- <div data-role="page" id="Queued" data-theme="b">
-
- <div data-role="header" data-theme="b">
- <h1>XMLi Sample Orders</h1>
- </div><!-- /header -->
-
- <div data-role="content">
-
- <ul data-role="listview">
-
- <!-- Run SQL to get a list of Orders by order number (sql-naming is set to SQL) -->
- <xmli:run-sql name="orders" statement="select ordordno, orddat, ordtot, ordcus
- from xmlilib.xmliorders
- order by ordordno">
- </xmli:run-sql>
- <xmli:for-each>
- <li><a href="${'/templates/queue_entries.html?order=' + orders.1}"><xmli:value-of select="orders.1" /></a> <span class="ui-li-count">$<xmli:value-of select="orders.3" /></span></li>
- </xmli:for-each>
-
- </ul>
- </div><!-- /content -->
-
- <div data-role="controlgroup" data-type="horizontal">
- <a href="answer.html?answer=yes" data-role="button">Yes</a>
- <a href="answer.html?answer=no" data-role="button">No</a>
- <a href="answer.html?answer=maybe" data-role="button">Maybe</a>
- </div>
-
-
- </div><!-- /page -->
-
- </body>
-
- </html>
-
- </xmli:template>
-
|
|
|