|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: |
******************
Search Form
******************
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
</head>
<body>
<form action="page2.html">
Find <input type="text" NAME="q" />
<input type="submit" value="Go" />
</form>
</body>
</html>
******************
Page2.html
******************
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<script type="text/javascript">
var xmlDoc;
var xslt;
function BuildResult() {
//code for Internet Explorer
if (window.ActiveXObject) {
xslt = new ActiveXObject("Msxml2.XSLTemplate");
var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
xslDoc.async = false;
xslDoc.resolveExternals = false;
xslDoc.load("cdcatalog.xsl");
xslt.stylesheet = xslDoc;
xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
xmlDoc.async = false;
xmlDoc.resolveExternals = false;
xmlDoc.load("cdcatalog.xml");
displayResult();
}
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument) {
objXml = document.implementation.createDocument("", "", null);
objXml.load("cdcatalog.xml");
objXsl = document.implementation.createDocument("", "", null);
objXsl.load("cdcatalog.xsl");
objXsl.onload = displayResult;
}
}
function displayResult() {
var artistname = unescape(location.search.substring(3)); // skip ?q=
if (window.ActiveXObject) {
var xslProc = xslt.createProcessor();
xslProc.input = xmlDoc;
xslProc.addParameter("artistname", artistname);
xslProc.transform();
document.getElementById('divResult').innerHTML = xslProc.output;
}
else {
var processor = new XSLTProcessor();
processor.importStylesheet(objXsl);
processor.setParameter(null, "artistname", artistname);
var trandoc = processor.transformToFragment(objXml, document);
document.getElementById('divResult').innerHTML = "";
document.getElementById('divResult').appendChild(trandoc);
}
}
window.onload=function() {
BuildResult()
}
</script>
</head>
<body>
<div id="divResult"> </div>
</body>
</html>
******************
cdcatalog.xml
******************
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?>
<!-- Edited by XMLSpy® -->
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
<link>www.google.com</link>
<Keyword>bob dylan, Baby Let Me Follow You Down, Clothes Line Saga, discography, country music</Keyword>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
<link>www.yahoo.com</link>
<Keyword>Bonnie Tyler, Hide Your Heart, Greatest hits, discography, country music, Goodbye to the Island, 80s </Keyword>
</cd>
<cd>
<title>Greatest Hits</title>
<artist>Dolly Parton</artist>
<country>USA</country>
<company>RCA</company>
<price>9.90</price>
<year>1982</year>
<link>www.bing.com</link>
<Keyword>Dolly Parton, discography, texas,</Keyword>
</cd>
</catalog>
******************
cdcatalog.xsl
******************
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="artistname">bob dylan</xsl:param>
<xsl:variable name="lc">
<xsl:text>abcdefghijklmnopqrstuvwxyz+ </xsl:text>
</xsl:variable>
<xsl:variable name="uc">
<xsl:text>ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:text>
</xsl:variable>
<xsl:template match="/">
<html>
<body>
<h2>My CD Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Artist</th>
</tr>
<xsl:for-each select="catalog/cd[translate(artist, $lc, $uc)= translate($artistname, $lc, $uc)]">
<tr>
<td>
<xsl:value-of select="title"/>
</td>
<td>
<xsl:value-of select="artist"/>
</td>
</tr>
</xsl:for-each>
<xsl:if test="not(catalog/cd[translate(artist, $lc, $uc)= translate($artistname, $lc, $uc)])">
<tr bgcolor="red">
<td colspan="2">No Results Found</td>
</tr>
</xsl:if>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
|
Advertisement
| Hall of Fame |