• Insert the quantity of the current item into the table. %>
  • XSL Models of Usage
  • ' length is the number of items ordered




    Download 2,96 Mb.
    Pdf ko'rish
    bet128/131
    Sana14.05.2024
    Hajmi2,96 Mb.
    #232039
    1   ...   123   124   125   126   127   128   129   130   131
    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
    %>




    <% Next %>

    <% 
    ' 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%>

    Shopping Demo





    WIDTH="760" 

    HEIGHT="500">

    ,

    , , 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.

    Download 2,96 Mb.
    1   ...   123   124   125   126   127   128   129   130   131




    Download 2,96 Mb.
    Pdf ko'rish

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    ' length is the number of items ordered

    Download 2,96 Mb.
    Pdf ko'rish