xsl-list
[Top] [All Lists]

[xsl] HTML inside XML using XSLT

2007-11-23 11:52:44
Hi,

I'm trying to do a program in XSLT that has a xml and a html files. The xml is 
like this:
<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet type="text/xsl" href="F-GESGQM.xsl"?>
<!-- New document created at Thu Oct 18 08:53:18 CEST 2007 -->

<gqmroot titleRoot="F-GES GQM">
        <goal titleGoal="G.1. Aumento della qualità esterna">
                <question titleQuestion="Q.1.1. Quanti bug trova l?utente? 
Quanti sono ad alta priorità?">
                        <metric
                                titleMetric="M.1.1.1. Numero di bug riportati 
nell'intervallo di tempo considerato, divisi per centro di costo e per 
prodotto."
                                ChartLink="gesGQMReport_M111.html">
                        </metric>

Now, when I do this, in the output of the xslt appears just the name of the 
html file. But instead of the name, I want that appears the content of the 
html. This html is a file whith figures in png. Is a java script that gets the 
png files from a folder and show them in a url, that is a html file. This is 
just the beginning of the html file:

<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<SCRIPT language=JavaScript> var ie55up = true </SCRIPT>
<![endif]-->
<SCRIPT language=JavaScript>
   function fixPNG(myImage) // correctly handle PNG transparency in Win IE 5.5 
or higher.
      {
      if (window.ie55up)
         {
         var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
         var imgClass = (myImage.className) ? "class='" + myImage.className + 
"' " : ""
         var imgTitle = (myImage.title) ? "title='" + myImage.title + "' " : 
"title='" + myImage.alt + "' "
         var imgStyle = "display:inline-block;" + myImage.style.cssText
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         strNewHTML += " style=\"" + "width:" + myImage.width + "px; height:" + 
myImage.height + "px;" + imgStyle + ";"
         strNewHTML += 
"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         strNewHTML += "(src=\'" + myImage.src + "\', 
sizingMethod='scale');\"></span>"
         myImage.outerHTML = strNewHTML
         }
      }
</SCRIPT>

Another problem is that the XSLT gets the value of the chartlink node:
<xsl:value-of select="@ChartLink"/>
XSLT make this for each metric of the xml file.

Does anyone knows how to do it??


Thanks a lot,
Lucas G. Grossi



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>