Download presentation
Presentation is loading. Please wait.
Published byEdwina Simmons Modified over 6 years ago
1
Chapter 20. SQL Server 2000 XML Sample Application
컴퓨터언어연구실 석사2학기 송민영
2
Contents Project1 - Accessing SQL server 2000 Directly over HTTP
XML Templates – Getting XML from SQL server across the web Posting a Template Using an HTML Form Sample ASP Application Sample ADO Application Building an Empire: an eLemonade Company The Two Different Solutions Prototyping with OpenXML and FORXML Prototyping with Xpath and Updategrams
3
Introduction This chapter is.. To test these application..
How to get results from, some of the more advanced XML features in SQL Server 2000 How to program them To test these application.. SQL Server 2000 Updategram and bulk load functionality ( Virtual directory (virtual root)
4
Project 1 – Accessing SQL Server 2000 Directly over HTTP
Different ways to access SQL Server 2000 over HTTP How to POST an XML template using an HTML form A simple Visual Basic application using ADO that execute an XML template An ASP application that executes an XML updategram Execute XML templates and show how parameters are passed in each of the application
5
XML Templates – Getting XML from SQL Server Across the Web
<ROOT xmlns:sql=“urn:schemas-microsoft-com:xml-sql”> <sql:header> <sql:param ParameterName> Default Value </sql:param> <sql:param ParameterName> Default Value </sql:param>…n </sql:header> <sql:query> SQL statement(s) </sql:query> </ROOT> <query> : actual SQL statements <header> : container element in which you can specify multiple parameters using the <param>element <param> : define the parameter name and its optional value
6
<ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<sql:query> SELECT FirstName, LastName FROM Employees WHERE EmployeeID = 6 FOR XML AUTO </sql:query> </ROOT> <ch20_ex01.xml> <ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <sql:header> <sql:param name='EmpID'>1</sql:param> </sql:header> <sql:query> SELECT FirstName, LastName FROM Employees WHERE EmployeeID FOR XML AUTO </sql:query> </ROOT> <ch20_ex02.xml>
7
Templates Featuring Xpath Queries
<ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <sql:header> <sql:param name='EmpID'>1</sql:param> </sql:header> <sql:xpath-query mapping-schema="ch20_ex04.xdr"> </sql:xpath-query> </ROOT> <ch20_ex03.xml> <?xml version="1.0" ?> <Schema xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <ElementType name="Employees" > <AttributeType name="EmployeeID" /> <AttributeType name="FirstName" /> <AttributeType name="LastName" /> <attribute type="EmployeeID" /> <attribute type="FirstName" /> <attribute type="LastName" /> </ElementType> </Schema> <ch20_ex04.xdr>
8
Applying XSLT to a Template
<root xmlns:sql='urn:schemas-microsoft-com:xml-sql' sql:xsl='ch20_ex05.xsl'> <sql:query> SELECT CustomerID, ContactName, City FROM Customers FOR XML AUTO </sql:query> </root> <ch20_ex05.xml> <?xml version='1.0' encoding='UTF-8'?> <xsl:stylesheet xmlns:xsl=" version="1.0"> <xsl:template match = '*'> <xsl:apply-templates /> </xsl:template> <xsl:template match = 'Customers'> <TR> <TD><xsl:value-of select = /></TD> <TD><xsl:value-of select = /></TD> <TD><xsl:value-of select = /></TD> </TR> <xsl:template match = '/'> <HTML> <HEAD> <STYLE>th { background-color: #CCCCCC }</STYLE> </HEAD> <BODY> <TABLE border='1' style='width:300;'> <TR><TH colspan='2'>Customer List</TH></TR> <TR><TH >Customer ID</TH><TH>Contact Name</TH><TH>City</TH></TR> <xsl:apply-templates select = 'root' /> </TABLE> </BODY> </HTML> </xsl:stylesheet> <ch20_ex05.xsl>
9
Updategrams <ch20_ex06.xml>
<ROOT xmlns:updg="urn:schemas-microsoft-com: xml-updategram" xmlns:sql="urn:schemas-microsoft-com:xml-sql" > <updg:sync > <updg:before> </updg:before> <updg:after> <Employees FirstName=“Anne" LastName=“Dodsworth“ /> </updg:after> </updg:sync> <sql:query> SELECT EmployeeID, FirstName, LastName FROM Employees FOR XML AUTO </sql:query> </ROOT> <ch20_ex06.xml>
10
<ROOT xmlns:updg="urn:schemas-microsoft-com:xml-updategram"
xmlns:sql="urn:schemas-microsoft-com:xml-sql" > <updg:sync mapping-schema="ch20_ex07.xdr" > <updg:before> </updg:before> <updg:after> <Emp FName=“Anne" LName=“Dodsworth" /> </updg:after> </updg:sync> <sql:query> SELECT EmployeeID, FirstName, LastName FROM Employees FOR XML AUTO </sql:query> </ROOT> <ch20_ex07.xml> <?xml version="1.0" ?> <Schema xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <AttributeType name="Contact" /> <ElementType name="Emp" sql:relation="Employees" > <AttributeType name="FName" /> <AttributeType name="LName" /> <attribute type="FName" sql:field="FirstName" /> <attribute type="LName" sql:field="LastName" /> </ElementType> </Schema> <ch20_ex07.xdr>
11
Posting a Template Using an HTML Form
<head> <title>Sample Form </title> </head> <body> <form action=" method="POST"> <input type="hidden" name="contenttype" value=text/xml > <input type="hidden" name="template" value=" <root xmlns:sql='urn:schemas-microsoft-com:xml-sql' > <sql:query> SELECT top 5 CustomerID, ContactName, City FROM Customers FOR XML AUTO </sql:query> </root> "> <p> <input type="submit" value="Show customers" > </form> </body> </html> <ch20_ex08.html>
12
<html> <head> <title>Sample Form </title> </head> <body> <form action=" method="POST"> <input type="hidden" name="contenttype" value=text/html > <input type="hidden" name="template" value=" <root xmlns:sql='urn:schemas-microsoft-com:xml-sql' > <sql:query> SELECT top 5 CustomerID, ContactName, City FROM Customers FOR XML AUTO </sql:query> </root> "> <input type="hidden" name="xsl" value="ch20_ex09.xsl" > <p><input type="submit" value=" Show all Customers" > </form> </body> </html> <ch20_ex09.html> <?xml version='1.0' encoding='UTF-8'?> <xsl:stylesheet xmlns:xsl=" version="1.0"> <xsl:template match = '*'> <xsl:apply-templates /> </xsl:template> <xsl:template match = 'Customers'> <TR> <TD><xsl:value-of select = /></TD> <TD><xsl:value-of select = /></TD> <TD><xsl:value-of select = /></TD> </TR> <xsl:template match = '/'> <HTML> <HEAD> <STYLE>th { background-color: #CCCCCC }</STYLE> </HEAD> <BODY> <TABLE border='1' style='width:300;'> <TR><TH colspan='3'>Customer List</TH></TR> <TR><TH >Customer ID</TH><TH>Contact Name</TH><TH>City</TH></TR> <xsl:apply-templates select = 'root' /> </TABLE> </BODY> </HTML> </xsl:stylesheet> <ch20_ex09.xsl>
13
Passing Parameters to the Query
pass parameter to the query if they are identified in the <sql:header> tag in the template modify our HTML code to pass the parameter value Difference The XML template takes one parameter which limits the scope of the SELECT statement specified in it. The client provides the value of this parameter as one of the values in the form (CustomerID)
14
<html> <head> <title>Sample Form </title> </head> <body> For a given customer ID, contact name and city information retrieved. <form action=" method="POST"> <b>Customer ID:</b> <input type="text" name="CustomerID" value="ALFKI"> <input type="hidden" name="contenttype" value="text/xml" > <input type="hidden" name="template" value=" <root xmlns:sql='urn:schemas-microsoft-com:xml-sql' > <sql:header> <sql:param name='CustomerID'>ALFKI</sql:param> </sql:header> <sql:query> SELECT CustomerID, ContactName, City FROM Customers WHERE FOR XML AUTO </sql:query> </root> "> <p><input type="submit"> </form> </body> <ch20_ex10.html>
15
Executing Template Files
<html> <head> <title>Sample Form </title> </head> <body> Display first 5 customers. <form action=" method="POST"> <input type="hidden" name="contenttype" value="text/xml" > <p><input type="submit" value="Find customers" > </form> </body> </html> <ch20_ex11.html> <ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql" > <sql:query> SELECT top 5 CustomerID, ContactName, City FROM Customers FOR XML AUTO </sql:query> </ROOT> <ch20_ex11.xml>
16
Passing Parameters to Template Files
<html> <head> <title>Sample Form </title> </head> <body> For a given employee ID, employee first and last name is retrieved. <form action=" method="POST"> <input type="text" name="CustomerID" value="ALFKI" > <input type="hidden" name="contenttype" value="text/xml" > <p><input type="submit" value="Find Customer" > </form> </body> </html> <ch20_ex12.html> <ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql" > <sql:header> <sql:param name="CustomerID">ALFKI</sql:param> </sql:header> <sql:query> SELECT CustomerID, ContactName, City FROM Customers WHERE FOR XML AUTO </sql:query> </ROOT> <ch20_ex12.xml>
17
Sample ASP Application
Creating the Application Create a new database Write the two template Compose the ASP page that houses the functionality
18
Creating the Table CREATE TABLE EditEmployees (eid int, fname varchar(20), lname varchar(20)) INSERT INTO EditEmployees VALUES (1, 'Nancy', 'Davolio') INSERT INTO EditEmployees VALUES (2, 'Andrew', 'Fuller')
19
Creating the Templates
<root xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <sql:header> <sql:param name="eid"></sql:param> </sql:header> <sql:query> SELECT eid, fname, lname FROM EditEmployees WHERE FOR XML AUTO </sql:query> </root> <ch20_ex16.xml> <ROOT xmlns:updg="urn:schemas-microsoft-com:xml-updategram"> <updg:header> <updg:param name="eid"/> <updg:param name="fname" /> <updg:param name="lname" /> </updg:header> <updg:sync > <updg:before> <EditEmployees eid="$eid" /> </updg:before> <updg:after> <EditEmployees eid="$eid" fname="$fname" lname="$lname" /> </updg:after> </updg:sync> </ROOT> <ch20_ex17.xml>
20
Writing the ASP Page <% LANGUAGE=VBSCRIPT %> <% Dim EmpID
EmpID=Request.Form("eid") %> <html> <body> if EmpID="" then <form action="ch20_ex17.asp" method="POST"> <br> Enter EmpID: <input type=text name="eid"><br> <input type=submit value="Submit this ID" ><br><br> else <form name="Employee" action=" method="POST"> You may update the first name and last name information below.<br><br> Set objXML=Server.CreateObject("MSXML2.DomDocument") objXML.async=False objXML.Load(" & EmpID) set objEmployee=objXML.documentElement.childNodes.Item(0) On Error Resume Next Response.Write "Emp ID: <input type=text readonly=true style= 'background-color:silver' name=eid value=""" Response.Write objEmployee.attributes(0).value Response.Write """><br><br>" Response.Write "First Name: <input type=text name=fname value=""" Response.Write objEmployee.attributes(1).value Response.Write "Last Name: <input type=text name=lname value=""" Response.Write objEmployee.attributes(2).value Response.Write """><br>" set objEmployee=Nothing Set objXML=Nothing %> <input type="submit" value="Submit this change" ><br><br> <input type=hidden name="contenttype" value="text/xml"> <input type=hidden name="eeid" value="<%=EmpID%>"><br><br> <% end if %> </form> </body> </html> <ch20_ex17.asp>
21
Sample ADO Applications
ADO is a client dependent method of accessing and manipulating SQL Server data using XML Advantages of this method A distributed load ASP applications the server handles all the processing of data client-side ADO applications use the processing power of the client to manage data
22
Executing an XML Template
FileSystemObject to open a text stream over a text file, which contains the XML template. This method returns TextStream object The data in this stream is passed to an ADO stream. To do this we convert the TextStream object into ADOStream object which is understood by the ADO command object(cmd) The ADO stream is then executed using the connection to SQL Server.
23
Private Sub Form_Load()
Dim cmd As New ADODB.Command Dim conn As New ADODB.Connection Dim strmIn As New ADODB.Stream Dim txtStream As TextStream Dim strmOut As New ADODB.Stream Dim objFSO As New FileSystemObject ‘open a connection to the SQL Server conn.Provider = "SQLOLEDB" conn.Open "server=(local); database=Northwind; uid=sa; " Set cmd.ActiveConnection = conn cmd.Dialect = "{5d531cb2-e6ed-11d2-b252-00c04f681b71}" ‘Open the command stream and write our template to it. strmIn.Open Set txtStream = objFSO.OpenTextFile("C:\inetpub\wwwroot\smy\ch20_ex20.xml", _ ForReading) strmIn.WriteText txtStream.ReadAll strmIn.Position = 0 Set cmd.CommandStream = strmIn ‘Execute the command, open the return stream, and read the result. strmOut.Open strmOut.LineSeparator = adCRLF cmd.Properties("Output Stream").Value = strmOut cmd.Execute , , adExecuteStream strmOut.Position = 0 Debug.Print strmOut.ReadText End Sub <ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql" > <sql:query> SELECT FirstName, LastName FROM Employees where EmployeeID=1 FOR XML AUTO </sql:query> </ROOT> <ch20_ex20.xml> <ch20_ex20>
24
Passing Parameters The XML Template executes an Xpath query against XML View This template accepts one parameter which must be passed through ADO
25
Private Sub Form_Load()
Dim cmd As New ADODB.Command Dim conn As New ADODB.Connection Dim strmIn As New ADODB.Stream Dim txtStream As TextStream Dim strmOut As New ADODB.Stream Dim objFSO As New FileSystemObject Dim objParam As ADODB.Parameter conn.Provider = "SQLOLEDB" conn.Open "server=(local); database=Northwind; uid=sa; " Set cmd.ActiveConnection = conn cmd.Dialect = "{5d531cb2-e6ed-11d2-b252-00c04f681b71}" strmIn.Open Set txtStream = objFSO.OpenTextFile("C:\inetpub\wwwroot\Northwind \template\ch20_ex21.xml", ForReading) strmIn.WriteText txtStream.ReadAll strmIn.Position = 0 Set cmd.CommandStream = strmIn strmOut.Open strmOut.LineSeparator = adCRLF cmd.Properties("Output Stream").Value = strmOut Set objParam = cmd.CreateParameter objParam.Name = objParam.Direction = adParamInput objParam.Type = adWChar objParam.Size = 25 objParam.Value = "6" cmd.Parameters.Append objParam cmd.NamedParameters = True cmd.Execute , , adExecuteStream strmOut.Position = 0 Debug.Print strmOut.ReadText End Sub <ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <Schema xmlns="urn:schemas-microsoft-com:xml-data" sql:id="MyMappingSchema" sql:is-mapping-schema="1"> <ElementType name="Employees" > <AttributeType name="EmployeeID" /> <AttributeType name="FirstName" /> <AttributeType name="LastName" /> <attribute type="EmployeeID" /> <attribute type="FirstName" /> <attribute type="LastName" /> </ElementType> </Schema> <sql:header> <sql:param name='EmployeeID'>1</sql:param> </sql:header> <sql:xpath-query mapping-schema="#MyMappingSchema"> </sql:xpath-query> </ROOT> <ch20_ex21.xml> <ch20_ex21>
26
Project 2 - Building an Empire: an eLemonade Company
In this project Use a fictional e-commerce site to contrast two XML approaches to the same problem FOR XML and OpenXML XML Views, Xpath, and Updategrams Project requirements Selling lemonade over the Internet
27
Database Design Customers Orders Purchases Supplies News
28
External XML Sources <NewsStream> <Story>
<Title>Lemon Prices Sour</Title> <Date> </Date> <Author>Ford Prefect</Author> <Text>Today, lemon prices reach a new 52-week low as . . .</Text> </Story> <Title>The Internet Lemonade Stand Opens For Business</Title> <Date> </Date> <Author>Argle Fargle</Author> <Text>In a shrewd move, the Internet Lemonade Stand opened . . .</Text> <!-- additional news items --> </NewsStream>
29
The Two Different Solutions
Using OpenXML and FOR XML to implement a solution through SQL Being entirely XML-based , using XML Views , Xpath and Updategrams
30
Prototyping with OpenXML and FOR XML
Sometimes, a completely SQL-based solution is required If you already have an extensive network of stored procedures and other database logic and want only to extend this system to produce XML output.
31
Displaying New and Expenses
int EXEC OUTPUT, '<NewsStream> </NewsStream>' INSERT INTO NEWS SELECT * FROM '/NewsStream/Story', 2) WITH (Date datetime './Date', Headline nvarchar(100) './Title', Story ntext './Text') <ch20_ex24.sql> <report sql:xsl="ch20_ex24.xsl" xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <sql:query> SELECT * FROM News ORDER BY Date DESC FOR XML AUTO, ELEMENTS; SELECT * FROM Purchases ORDER BY Date DESC FOR XML AUTO; </sql:query> </report> <ch20_ex24.xml>
32
<ch20_ex24.xsl> <xsl:template match="News">
<xsl:stylesheet version="1.0" xmlns:xsl=" <xsl:output method="html" indent="yes" media-type="text/html" /> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="report"> <html> <head> <title>The Internet Lemonade Stand News And Expense Report</title> </head> <body> <h1>Top News</h1> <dl> <xsl:apply-templates select="News"/> </dl> <h1>Inventory Purchases</h1> <TABLE BORDER="2"> <tr> <th>date</th> <th>total cost</th> <th>notes</th> </tr> <xsl:apply-templates select="Purchases"/> </TABLE> </body> </html> <xsl:template match="News"> <dt>[<xsl:value-of select="Date"/>] <b><xsl:value-of select="Headline"/></b></dt> <dd><xsl:value-of select="Story"/></dd> <xsl:template match="Purchases"> <td><xsl:value-of <td><xsl:value-of /></td> <td><xsl:value-of </xsl:stylesheet> <ch20_ex24.xsl>
33
Place order and create Customer Account
<sql:header xmlns:sql="urn:schemas-microsoft-com:xml-sql" > <sql:param name="color">white</sql:param> <sql:param name="id"/> <sql:param name="name"/> </sql:header> <sql:query xmlns:sql="urn:schemas-microsoft-com:xml-sql" > INSERT INTO </sql:query> </create> <ch20_ex25.xml>
34
Prototyping with Xpath and Updategrams
Advantages More easily interoperable among platforms than other, code-based solutions Real-world data is often most naturally viewed as semi-structured data, not relational data Changes in the XML shape or content are more readily dealt with when you’re already working at the XML level
35
Prototyping with Xpath and Updategrams
<Schema xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <ElementType name="News" sql:relation="News" sql:field="Story"> <AttributeType name="date" /> <AttributeType name="headline"/> <attribute type="date"/> <attribute type="headline"/> </ElementType> <ElementType name="Expense" sql:relation="Purchases"> <AttributeType name="id"/> <AttributeType name="date"/> <AttributeType name="price"/> <AttributeType name="notes"/> <attribute type="id" sql:field="Pid"/> <attribute type="price"/> <attribute type="notes"/> <AttributeType name="quantity"/> <ElementType name="Inventory" sql:relation="Supplies"> <AttributeType name="type"/> <attribute type="type" /> <attribute type="quantity"/> <ElementType name="Order" sql:relation="Orders"> <AttributeType name="id"/> <AttributeType name="ordered" /> <AttributeType name="shipped" /> <AttributeType name="customer"/> <AttributeType name="unit-price"/> <attribute type="id" sql:field="Oid"/> <attribute type="ordered" sql:field="OrderDate"/> <attribute type="shipped" sql:field="ShipDate"/> <attribute type="customer" sql:field="Cid"/> <attribute type="quantity"/> <attribute type="unit-price" sql:field="UnitPrice"/> </ElementType> <ElementType name="Name" content="textOnly"/> <ElementType name="Customer" sql:relation="Customers"> <AttributeType name="color"/> <attribute type="id" sql:field="Cid"/> <attribute type="color"/> <element type="Name"/> </Schema> <ch20_ex26.xdr> <Example xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <Customers> <sql:xpath-query mapping-schema="ch20_ex26.xdr">Customer</sql:xpath-query> </Customers> <Sales> <sql:xpath-query mapping-schema="ch20_ex26.xdr">Order</sql:xpath-query> </Sales> </Example> <ch20_ex26.xml>
36
Create and Edit Customer Accounts
<HTML> <HEAD> <TITLE>Welcome to the Internet Lemonade Stand</TITLE> </HEAD> <BODY> <P>Please log in to your account</P> <FORM ACTION=" <B>Username</B> <input type="text" name="cid" value=""/> <input type="submit"/> </FORM> <P>or create a new account</P> <FORM ACTION=" <B>Username</B> <input type="text" name="id" value=""/><br> <B>Full Name</B> <input type="text" name="name" value=""/><br> <B>Favorite Color</B> <input type="text" name="color" value=""/><br> </BODY> </HTML> <ch20_ex30.html> <create sql:xsl="ch20_ex31.xsl" xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <u:header xmlns:u="urn:schemas-microsoft-com:xml-updategram" > <u:param name="color">white</u:param> <u:param name="id"/> <u:param name="name"/> </u:header> <u:sync xmlns:u="urn:schemas-microsoft-com:xml-updategram" u:nullvalue="" mapping-schema="ch20_ex27.xdr"> <u:after> <Customer id="$id" color="$color"> <Name>$name</Name> </Customer> </u:after> </u:sync> </create> <ch20_ex30.xml>
37
<xsl:stylesheet version="1. 0" xmlns:xsl='http://www. w3
<xsl:output method="html" indent="yes" media-type="text/html" /> <xsl:template match="/"> <html> <head><title>Customer Login</title></head><body> <xsl:apply-templates/> </body> </html> </xsl:template> <xsl:template match="create"> <xsl:choose> <!-- if the template returns an error, display it otherwise, the new account succeeded --> <xsl:when test="processing-instruction('MSSQLError')"> <p>A customer with that username already exists. Please try a different username.</p> <form action=" <b>Username</b> <input type="text" name="id" value=""/> <b>Full Name</b> <input type="text" name="name" value=""/> <b>Favorite Color</b> <input type="text" name="color" value=""/> <input type="submit"/> </form> </xsl:when> <xsl:otherwise> Congratulations on your new account. </xsl:otherwise> </xsl:choose> </xsl:stylesheet> <ch20_ex31.xsl>
38
Personalized Customer Page
<personal sql:xsl="ch20_ex32.xsl" xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <sql:header> <sql:param name="cid" /> </sql:header> <sql:xpath-query mapping-schema="ch20_ex27.xdr"> </sql:xpath-query> </personal> <ch20_ex31.xml> INSERT INTO Orders VALUES(' ', ' ', 'ad', 2, 1.75) INSERT INTO Orders VALUES(' ', ' ', 'ad', 5, 1.50) INSERT INTO Orders VALUES(' ', ' ', 'ad', 15, 1.00) <xsl:stylesheet version="1.0" xmlns:xsl=" <xsl:output method="html" indent="yes" media-type="text/html" /> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="personal"> <xsl:template match="Customer"> <html> <head><title>Welcome <xsl:value-of select="Name"/>!</title></head> <body> <xsl:attribute name="BGCOLOR"> <xsl:value-of </xsl:attribute> <p>Welcome back to the Internet Lemonade Stand, <xsl:value-of select="Name"/>!</p> <p>Let us quench your thirst with our excellent lemonade!</p> <h2>Pending Orders</h2> <ul> <xsl:for-each <xsl:sort order="descending"/> <li>Ship Date: <b><xsl:value-of Order Date: <b><xsl:value-of Amount: <b><xsl:value-of liters</b> Cost: <b><xsl:value-of '$#.00')"/></b> </li> </xsl:for-each> </ul> <h2>Past Orders</h2> <ul> <xsl:for-each <xsl:sort order="descending"/> <li>Ship Date: <b><xsl:value-of Order Date: <b><xsl:value-of Amount: <b><xsl:value-of liters</b> </body> </html> </xsl:template> </xsl:stylesheet> <ch20_ex32.xsl>
39
결과화면
40
Helpful Web Sites http://www.microsoft.com/productioninfo/default.htm
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.