Solved

Counting lines in XML/XSL

Posted on 2000-04-26
2
330 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

Technology Partners: 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 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…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

707 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