473,378 Members | 1,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Using xml, xsl, html, cant change font size

I am having trouble changing the font size when extracting xml into an
html web page.
I think it can be done so many ways, that my searches bring up examples
that I am not familiar with.
I am a newbie at xml and xsl

This is my xml("index.xml")page(I can not change this, it comes to me
this way.

<?xml version="1.0" encoding="iso-8859-1" ?>
- <fieldgate ser="6C000D010A0" tag="TTL Bulk Storage Farm" type="full"
devices="all">
<time>19700101-000000</time>
<timezone>0</timezone>
<ff_version>01.02.02-071 20050118</ff_version>
<os_version>3.18</os_version>
<conf>FXA520-AA1A</conf>
- <device id="11183312ee" tag="B05" type="HART">
<u4>°C</u4>
<v4>22.22</v4>
<u2>In H2O</u2>
<dev>Cerabar S</dev>
<man>Endress+Hauser</man>
<u1>lb</u1>
<v1>535.91</v1>
<type>HART</type>
- <param>
<t1ch>Bulk Tank B5</t1ch>
<t2ch>Weight in Pounds</t2ch>
<max>43928.00</max>
<min>0.00</min>
</param>
</device>
</fieldgate>

The "device" element repeats 11 more times, and I want to ignore some,
so I am using an "if match" technique.
I just repeat the table for each bulk tank that I want to display.

This is my xsl("index.xsl"):

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<body>
<table width="800" border="2" bordercolor="#3300CC"
bgcolor="#0099CC">
<tr>
<th>Tank #</th>
<th>Current Level</th>
<th>Temp.</th>
<th>@</th>
</tr>
<xsl:for-each select="fieldgate/device">
<xsl:if match=".[tag='B01']">
<tr>
<td width="200"><xsl:value-of select="tag"/></td>
<td width="200"><xsl:value-of select="v1"/></td>
<td width="200"><xsl:value-of select="v4"/></td>
<td width="200"><xsl:value-of select="u4"/></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

This shows an html page like this:
Tank # CurrentLevel Temp. @
B01 395.47 69.65 °F

No matter what I try, the B01, shows the exact same way, or the page
becomes just blank, and shows nothing.
This is my html:

<html>
<body>
<script language="javascript">
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("index.xml")

// Load the XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("index.xsl")

// Transform
document.write(xml.transformNode(xsl))
</script>

</body>
</html>

If any one can tell me how to do this, and where to place the code, I
would appreciate it.
I see code examples, but dont know where to place it.
I am working off of an xml, xsl tutorial web site, and have had
success, but can not get over the hump of this font size, and perhaps
page colors, etc.

Any help in the right direction would help, even if I should find
another language to learn.

Thx in advance,
Ken

Jul 20 '05 #1
2 3145
km*********@charter.net wrote:
I am having trouble changing the font size when extracting xml into
an html web page.


I can't see any attempt to change font size in the code you included.
When HTML is your output format, it would appear to be natural to
use a CSS style sheet for such purposes. You could use CSS either by
including a suitable <link> element into the HTML code or by including
a <style> element into the <head> part of the HTML document, e.g.
<style type="text/css">
th, td { font-size: 90%; }
</style>

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #2

Jukka K. Korpela wrote:
km*********@charter.net wrote:
I am having trouble changing the font size when extracting xml into
an html web page.
I can't see any attempt to change font size in the code you included.
When HTML is your output format, it would appear to be natural to
use a CSS style sheet for such purposes. You could use CSS either by
including a suitable <link> element into the HTML code or by

including a <style> element into the <head> part of the HTML document, e.g.
<style type="text/css">
th, td { font-size: 90%; }
</style>

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Jukka,
wow, that was simple.
I was not doing something right.

Kiitoksia oikein paljon,
Ken

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

48
by: Nirvana | last post by:
How to make the font size constant in HTML code, so that in a web browser it remains fixed. For e.g in IE if you press CTRL and move mouse wheel front or back the font size changes, cheers
5
by: nivas.meda | last post by:
Hi, I have an excel sheet with a graph and cells.If i change the value in the excel cells the graph will reflect.Now i am going to implement this functionality in html page.I successfully saved...
2
by: Kathy Burke | last post by:
Hi, I'm doing a fairly simple datagrid (copied it from one that works). When I run the page, it gets and binds the datasource ok, but then I get an unhandled app error at End Sub. I've found this...
12
by: newspost2000 | last post by:
http://www.htmldog.com/articles/elasticdesign/demo/ I found this wonderful site the demonstrates how you cannnot resize text formated using styles in ie 6 if you specify font size using pt units...
7
by: Mariusf | last post by:
I am a novice Perl programmer and need to change a perl script that I use to create web pages with thumbnail images and some text. Currently the script created a web page for each artist / category...
14
by: jcage | last post by:
Is there any tutorials online for sending email through forms? I can send an email as well as write to my MySQL database from home with the following code but not at work. I think there might be...
2
by: shivendravikramsingh | last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if...
44
by: John Dann | last post by:
I'm unclear as to how best to use what I'm terming the top-level CSS selectors, by which I mean selectors like *, html and body. I'm coming at this from trying to understand how best to set font...
4
by: z55177 | last post by:
My domain: http://www.esthevision.cz/ This is the cause of my problem. The template is supposed to look somewhat like this: PINK STRIPE http://themebot.com/website-templates/ht... I created an...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.