RE: [xsl] HTML inside XML using XSLT

Subject: RE: [xsl] HTML inside XML using XSLT
From: Lucas Gonçalves Grossi <lggrossi@xxxxxxxxxx>
Date: Sat, 24 Nov 2007 12:27:47 -0200

I sent what I did, but I'll tell again:
First, I'm using Stylus Studio 2007 Enterprise edition Release 2, to generate
the xsl file.
So, what I'm trying to do is: get an xml file and a html file and make an
output html file. In my code now I'm putting everything in a table. The
problem is that, inside the xml file, there is one part (chartlink), which is
a link to an html file that contains some png figures (some graphs). But when
i generate the xsl file, instead of the program show this graphs they show
just the name of the html file, for example, myfile.html
You told me to use the unparsed-text() or the xsl:copy of. I did this two
solutions, but how I told in the last email, did'nt work.

In the first solution I just substitute this part of the code bellow
(<xsl:value-of select="@Chartlink"/>) with this part (xsl:value-of
select="unparsed-text('myfile.html')"), but in this case in the output appears
the source code itself.

In the second solution, first I create the xhtml like you told me, using the
TagSoup (because jTidy didn't work for me) and then I substitute the same part
(<xsl:value-of select="@Chartlink"/>) with (<xsl:copy-of
select="myfile.xhtml">). In the output nothing appears.

This is my xsl code:
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="2.0"
<xsl:output method="xml"/>

<xsl:template match="/">
		<xsl:value-of select="gqmroot/@titleRoot"/>
        <table width="100%" border="1">
	<xsl:for-each select="gqmroot/goal">
	<td width="33%">
		<xsl:value-of select="@titleGoal"/>
	<td width="33%">
		<xsl:for-each select="question">
		<li value="0">
			<xsl:value-of select="@titleQuestion"/>
				<xsl:for-each select="metric">
				<li value="0">
					<xsl:value-of select="@titleMetric"/>
				<li value="0">
					<xsl:value-of select="@ChartLink"/>
			<xsl:for-each select="metric"/>
		<td width="33%"/>

<xsl:template name="NewTemplate0"/>

Thanks again,

> > First thanks for the help. But didn't work
> If something doesn't work, then we need to know precisely what you did and
> precisely how it failed, otherwise we can't help you fix the problem.
> Michael Kay

Current Thread