|
' length is the number of items ordered Pdf ko'rish
|
bet | 128/131 | Sana | 14.05.2024 | Hajmi | 2,96 Mb. | | #232039 |
Bog'liq Ceponkus, Hoodbhoy - Applied XML - Toolkit for Programmers ' length is the number of items ordered
' minus 1 because the index starts on 0 and not 1
length = xml.documentElement.childNodes.length - 1
' Generate a row for each ordered item
For i = 0 To length
%>
<%
' Insert the name of the current item into the table. %>
<%=xml.documentElement.childNodes.item(i).childNodes.item(0).
↵
childNodes.item(0).nodeValue%>
|
<%
' Insert the quantity of the current item into the table. %>
<%=xml.documentElement.childNodes.item(i).childNodes.item(1).
↵
childNodes.item(0).nodeValue%>
|
<% Next %>
Shopping Demo
,
,
, , and . From this, you can also tell that flow objects can nest themselves
(for example, putting table rows inside table tags, which in turn can be nested within the
tag).
XSL defines a vocabulary of flow objects that all XSL stylesheets can use. These flow
objects have
characteristics
that provide exact control over how the flow object works.
These characteristics work in a fashion similar to the way HTML flow objects are
controlled; that is, through attribute tweaking (think align = “center”
>).
In addition to the core vocabulary of flow objects that XSL uses for all output formats, XSL
also includes a set of flow objects that is specifically used for outputting HTML. Most of the
examples in this chapter use these flow objects just because they are the easiest to render
(everyone has an HTML browser, but not everyone has a SpeechML browser—yet).
XSL Models of Usage
XSL stylesheets are used in two generic ways depending on the nature of the XML
document for which they are targeted. They are template-driven and data-driven models.
Let’s take a look at what each of these models entails.
| |
|