Solved

Counting lines in XML/XSL

Posted on 2000-04-26
2
308 Views
Last Modified: 2006-11-17
I want to display a mobile phone bill.  The data is displayed in 2 columns.  Column 1 displays the first 50 lines and then I want to continue in column 2.
What is the best way to do this?
0
Comment
Question by:fiona_freeman
2 Comments
 
LVL 10

Expert Comment

by:makerp
ID: 2750947
if your using xsl/xml then hold the phone bill in xml and use xsl to trasform it in to html

this appraoch only works in IE if done on the client. you can if ypou like use asp to trasform it on the server and then send it to the browser but this is a bit more involved.

basically to do it on the client you xml will be something like this.

<BILL>
     <ITEM>
           <NUMBER>7878</NUMBER>
           <COST>89.76</COST>
     </ITEM>
     <ITEM>
           <NUMBER>788444</NUMBER>
           <COST>489.76</COST>
     </ITEM>
</BILL>

and then your xsl something like this, this will go through your xml and transform it

<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  <xsl:template match="/">
  <TABLE>
  <xsl:for-each select="BILL/ITEM">
  <TR>
      <TD><xsl:value-of select="NUMBER"/></TD>
      <TD><xsl:value-of select="COST"/></TD>
  </TR>
  </xsl:for-each>
  </TABLE>
</xsl:template>
</xsl:stylesheet>

finally the actual bit that makes it work.

in you html page you have two refernces , one to the xml and one to the xsl

like this

<XML ID=xmlobject SRC=your.xml>
<XML ID=xslobject SRC=your.xsl>

then a div tag that the trasformed output will go into

<DIV ID=mydiv></DIV>

then a vbscript trasformnode to populate the div

<SCRIPT>
    mydiv.InnerHTML = xslobject.TransformNode(xmlobject.XMLDocument)
</SCRIPT>
0
 
LVL 1

Accepted Solution

by:
kwq5421 earned 50 total points
ID: 2771657
you can use three table , first table include two tabke inside it,
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question