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

RE: Can't get XML to display through XSLT

can t display xml page
You're more likely to get answers to XSLT coding questions on the xsl-list
at http://www.mulberrytech.com/

Check that you have Microsoft's XSLT processor correctly installed: see the
MSXML FAQ at http://www.netcrucible.com/

You don't show what the input or output of your transformation are. The only
thing that's obviously odd about it is <xsl:for-each select="."> which
iterates over a single node. But there may be other things that are wrong in
relation to your source document.

Michael Kay
Software AG
home: Michael.H.Kay@n...
work: Michael.Kay@s...

> -----Original Message-----
> From: Means, Garann R. [mailto:grmeans@D...]
> Sent: 06 March 2002 00:08
> To: 'xml-dev@l...'
> Subject:  Can't get XML to display through XSLT
> Hi,
> I am trying to transform an XML document with an XSLT, but
> all that shows up
> are the HTML elements, and the for-each loops don't function
> correctly. When
> I try to open the document in Internet Explorer, all I get
> are a submit
> button and a single checkbox. The XML document without the
> XSLT shows up
> fine and is valid to the best of my knowledge. I've tried
> everything and
> searched everywhere I can think of, but can't see what I'm
> doing wrong.
> Here is the XSLT:
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> 	<xsl:template match="/">
> 		<xsl:apply-templates />
> 	</xsl:template>
> 	<xsl:template match="/main-menu">
> 		<html>
> 		<body>
> 		<form name="frmMenuItm" method="POST">
> 		<ul>
> 		<xsl:apply-templates />
> 		</ul>
> 		<input type="button" value="Edit" />
> 		</form>
> 		</body>
> 		</html>
> 	</xsl:template>
> 	<xsl:template match="main-menu/top-level">
> 		<xsl:for-each select=".">
> 			<li>
> 			<input type="checkbox" value="1"><xsl:attribute
> name="name"><xsl:value-of select="title" /></xsl:attribute></input>
> 			<a href="#"><xsl:value-of select="title" /></a>
> 			</li>
> 		</xsl:for-each>
> 	</xsl:template>
> </xsl:stylesheet>
> And the XML looks something like this:
> <main-menu>
> 	<top-level>
> 		<title>Here is a title.</title>
> 		<other-tag>Something else.</other-tag>
> 	</top-level>
> 	<top-level>
> 		<title>Another title.</title>
> 		<other-tag>More nonsense.</other-tag>
> 	</top-level>
> </main-menu>
> Can anyone help?
> Thanks,
> Garann Rose Means
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> The list archives are at http://lists.xml.org/archives/xml-dev/
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>


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.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.