Cascading Style Sheets Tutorial

Using xml, xsl, css display data

  / * Xsl data file * / 

  <? Xml version = "1.0" encoding = "GB2312?"> 
  <xsl:stylesheet Xmlns:xsl=" http://www.w3.org/TR/WD-xsl "> 
  <xsl:template Match="http://www.blogchinese.com//"> 
<HTML>
<HEAD>
  <TITLE> Information to be available </ TITLE> 
<script>
  Function selectMember (fileName, ctlID) ( 
  Var oOption = document.createElement ( "OPTION"); 
  OOption.text fileName =; 
  OOption.value = ctlID; 
  Document.test.members.add (oOption); 
  ) 
  </ Script> 
  </ HEAD> 
<BODY>
  <table Width="100%" border="1" bordercolor="#FF0000"> 
  <tr Bgcolor="#99CCCC"> 
<td>
  <div Align="center"> information to be available </ div> 
  </ Td> 
  </ Tr> 
  <xsl:for-each Select="document/masterInfo"> 

<tr>
<td>
  <table Border="0" cellspacing="0" cellpadding="5"> 
<tr>
  <td Width="20%"> process examples: </ td> 
  <td Width="30%" onclick="selectMember(666,001);"> 
  <xsl:value-of Select="processName"/> 
  </ Td> 
  </ Tr> 
<tr>
  <td Width="20%"> processes sponsors: </ td> 
  <td Width="30%"> 
  <xsl:value-of Select="creator"/> 
  </ Td> 
  </ Tr> 
  </ Table> 
  </ Td> 
  </ Tr> 
  </ Xsl: for-each> 

  <xsl:for-each Select="document/detailInfo"> 

<tr>
<td>
  <table Border="0" cellspacing="0" cellpadding="5" width="100%"> 
<tr>
  <td Width="20%"> assets Name: </ td> 
  <td Width="30%"> 
  <xsl:value-of Select="accessName"/> 
  </ Td> 
  <td Width="20%"> asset type: </ td> 
  <td Width="30%"> 
  <xsl:value-of Select="accessType"/> 
  </ Td> 
  </ Tr> 
  </ Table> 
  </ Td> 
  </ Tr> 
  </ Xsl: for-each> 
  </ Table> 
  <form Name="test"> 
  <select Name="members"> 

  </ Select> 

  </ Form> 
  </ BODY> 
  </ HTML> 
  </ Xsl: template> 
  </ Xsl: stylesheet> 

  / * Xml data files * / 

  <? Xml version = "1.0" encoding = "gb2312?"> 
  <? Xml-stylesheet type = "text / xsl" href = "http://www.blogchinese.com/preread.xsl?"> 

<document>

<masterInfo>

  <processName> Asset allocation process </ processName> 
  <creator> Leuphis </ creator> 
  </ MasterInfo> 
<detailInfo>
  <accessName> IBM PC 1 </ accessName> 
  <accessType> Hardware </ accessType> 
  </ DetailInfo> 
<detailInfo>
  <accessName> IBM computer 2 </ accessName> 
  <accessType> Hardware </ accessType> 
  </ DetailInfo> 
<detailInfo>
  <accessName> IBM PC 3 </ accessName> 
  <accessType> Hardware </ accessType> 
  </ DetailInfo> 
  </ Document> 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • DotNetKicks
  • DZone

Tags: css display, Display, xml xhtml

Releated Posts

  • CSS achieve dynamic display by the five-pointed star-level results
  • Css create classic mouse trigger Display Options
  • CSS Case Analysis and Display Visibility different attributes
  • Display: inline-block attributes
  • CSS in IE and Nascape display differences

This entry was posted on Friday, January 11th, 2008 at 12:00 am and is filed under CSS Properties. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

« Dhtml shtml xhtml difference
Changes in the mouse showed that using css »

Leave a Reply

  • Categories

    • CSS Properties (491)
    • CSS Tutorial (1154)
    • CSS Tutorial By Examples (1201)
    • Css+Div Web Design (3274)
    • Xhtml and Web Design (1797)
  • Archives

    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
    • September 2007
    • August 2007
    • July 2007
    • June 2007
    • May 2007
    • April 2007
    • March 2007
    • February 2007
    • January 2007
  • Pages

    • About us

Cascading Style Sheets Tutorial