Solved

Counting lines in XML/XSL

Posted on 2000-04-26
2
324 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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