[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: HTML inside XML using XSLT

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

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"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>

<xsl:template match="/">
<html><head></head>
<body>
<p>
	<strong>
		<xsl:value-of select="gqmroot/@titleRoot"/>
	</strong>
        </p>
        <p>
        <table width="100%" border="1">
	<tbody>
	<xsl:for-each select="gqmroot/goal">
	<tr>
	<td width="33%">
		<xsl:value-of select="@titleGoal"/>
	</td>
	<td width="33%">
	<ul>
		<xsl:for-each select="question">
		<li value="0">
			<xsl:value-of select="@titleQuestion"/>
			<ul>
				<xsl:for-each select="metric">
				<li value="0">
					<xsl:value-of select="@titleMetric"/>
				</li>
				<li value="0">
					<xsl:value-of select="@ChartLink"/>
					</li>
				</xsl:for-each>
			</ul>
			<div>
			<xsl:for-each select="metric"/>
			</div>
			</li>
		</xsl:for-each>
		</ul>
		</td>
		<td width="33%"/>
		</tr>
		</xsl:for-each>
	</tbody>
</table>
</p>
</body>
</html>
</xsl:template>

<xsl:template name="NewTemplate0"/>
</xsl:stylesheet>


Thanks again,
LUCAS


> > 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
> http://www.saxonica.com/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.