spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / xml / column4

The Browser War continued: XML support in IE and Mozilla

Technical Lead
Thomson Reuters (Markets) LLC
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume
Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?


The CSS2 solution for Mozilla

This whole book example was inspired by the Mozilla Amazon Search Example, so if you have a copy of Mozilla handy the link before brings you to a more flashy version of this example. IE5 users will only see a blank page because some of the CSS elements are not understood by this browser or can only be applied to HTML and not XML elements, or both. If you view the source you can at least see the raw XML. Not much of a help, though.

The CSS solution for Both Browsers

Simplifying the Mozilla examples yields some results in both browsers, by sticking to simple CSS1 elements:
Books {
  display: block;
}
Book {
  display: list-item;
  float: none;
  border: none;
  background: inherit;
}
Title {
  display: block;
  font-weight: bold;
  color: blue;
  text-decoration: underline;
  cursor: pointer;
}
Author {
  display: block;
  font-style: italic;
}
Synopsis {
  display: none;
}
ListPrice {
  display: none;
  text-align: right;
  padding-right: 15px;
  text-decoration: line-through;  
}
Price {
  display: block;
  color: rgb(20,100,0);
  font-weight: bold;
  text-align:left; 
}
ISBN {
  display: block;
  font-family: monospace;
  font-size: 8pt;
}
In this style sheet most elements are rendered as block items, the exceptions being Book which is a list item, and ListPrice and Synopsis which will be hidden from the viewer. Simple font attributes are applied to different book elements. See the output. Note that the links are not active in IE because it does not support X-Link. To make this work you would have to replace these links with HTML anchor elements already in the source.

next page

http://www.internet.com

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business


Produced by Michael Claßen
All Rights Reserved. Legal Notices.

URL: http://www.webreference.com/xml/column4/4.html
Created: Jan. 17, 2000
Revised: Jan. 17, 2000