Click here to Skip to main content
15,891,828 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionXSL - Transform Element Values to Attribute Name Pin
lisad_tgc10-Jan-08 12:47
lisad_tgc10-Jan-08 12:47 
GeneralRe: XSL - Transform Element Values to Attribute Name Pin
led mike11-Jan-08 5:48
led mike11-Jan-08 5:48 
QuestionCreation of xml-file based on schema? Pin
eroi10-Jan-08 3:53
eroi10-Jan-08 3:53 
GeneralRe: Creation of xml-file based on schema? Pin
led mike11-Jan-08 5:38
led mike11-Jan-08 5:38 
GeneralRe: Creation of xml-file based on schema? Pin
eroi14-Jan-08 3:32
eroi14-Jan-08 3:32 
GeneralRe: Creation of xml-file based on schema? Pin
led mike15-Jan-08 6:00
led mike15-Jan-08 6:00 
GeneralRe: Creation of xml-file based on schema? Pin
eroi17-Jan-08 1:06
eroi17-Jan-08 1:06 
QuestionHelp to incorporate an html code in xslt Pin
Ismailc9-Jan-08 21:01
Ismailc9-Jan-08 21:01 
Hi, I need help please! Don'T really know XSLT

I have an HTML code that works:
I try and add it to an xslt file but it moans about the javascript.
Please Anyone Assist!

The existing xslt have an image ALT used as an tooltip, the problem is that the users have lengthy tooltips & the alt dissapears after a few seconds which they don't want.
I found a workaround for a tooltip which works great in HTML now I'm trying to add the code to the xslt but having the problems of the script. Tried CDate but the code turns gray untill the end of the script but other scripts in the xslt is black.

Your can copy this cope directly in HTML and it works, I'm trying to add this anyware in xslt to just to get it going then i will remove the alt & add onmouseover image like the <a>: I tried to highlight th errors i get (red) as i see in my xslt file but in HTML it works fine, with the CDATA its totally gray.


<html>
<head>
<style type="text/css">

#dhtmltooltip{
position: absolute;
width: 150px;
border: 2px solid black;
padding: 2px;
background-color: lightyellow;
visibility: hidden;
z-index: 100;
/*Remove below line to remove shadow. Below line should always appear last within this CSS*/
filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135);
}

</style>
</head>
<body>
<div id="dhtmltooltip"></div>
<SCRIPT TYPE='text/javascript'>
<!--<![CDATA[ -->
var offsetxpoint=-60 //Customize x offset of tooltip
var offsetypoint=20 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thecolor, thewidth){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}

function positiontip(e){
if (enabletip){
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20

var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
else if (curX<leftedge)
tipobj.style.left="5px"
else
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetxpoint+"px"

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight)
tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
else
tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.visibility="visible"
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}

document.onmousemove=positiontip
<!--]]>-->
</SCRIPT>
<tr>
<td>
<a href="ajax.htm" onMouseover="ddrivetip('JavaScriptKit.com JavaScript tutorials','yellow', 300);" onMouseout="hideddrivetip();">?</a>
</td>
</tr>
</body>
</html>
Generaltransfer file Pin
angels7779-Jan-08 5:18
angels7779-Jan-08 5:18 
GeneralBest approach towards reading specific information from XML file Pin
Krishnaraj Barvathaya B8-Jan-08 22:46
Krishnaraj Barvathaya B8-Jan-08 22:46 
GeneralRe: Best approach towards reading specific information from XML file Pin
led mike9-Jan-08 4:46
led mike9-Jan-08 4:46 
Generalpicture problems in wpf Pin
angels7775-Jan-08 3:43
angels7775-Jan-08 3:43 
GeneralRe: picture problems in wpf Pin
Scott Dorman5-Jan-08 6:15
professionalScott Dorman5-Jan-08 6:15 
QuestionHow to get a specified attribute value using MSXML4 Pin
followait25-Dec-07 5:09
followait25-Dec-07 5:09 
AnswerRe: How to get a specified attribute value using MSXML4 Pin
CPallini28-Dec-07 9:59
mveCPallini28-Dec-07 9:59 
GeneralWhat's usually used to parse an XML file Pin
followait25-Dec-07 3:11
followait25-Dec-07 3:11 
GeneralRe: What's usually used to parse an XML file Pin
Scott Dorman5-Jan-08 6:36
professionalScott Dorman5-Jan-08 6:36 
GeneralRe: What's usually used to parse an XML file Pin
DavidNohejl14-Jan-08 3:13
DavidNohejl14-Jan-08 3:13 
GeneralXML starting... Pin
kingletas20-Dec-07 3:28
kingletas20-Dec-07 3:28 
GeneralRe: XML starting... Pin
pmarfleet20-Dec-07 9:32
pmarfleet20-Dec-07 9:32 
GeneralGeneric XSLT Pin
Gktony16-Dec-07 0:21
Gktony16-Dec-07 0:21 
GeneralRe: Generic XSLT Pin
Prateek G16-Dec-07 19:12
Prateek G16-Dec-07 19:12 
GeneralRe: Generic XSLT Pin
Gktony16-Dec-07 23:59
Gktony16-Dec-07 23:59 
GeneralGeneric XSLT Pin
Gktony16-Dec-07 0:18
Gktony16-Dec-07 0:18 
GeneralVTD-XML tutorials now available Pin
Jimmy Zhang15-Dec-07 16:44
Jimmy Zhang15-Dec-07 16:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.