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

Re: Passing thru html to the browser

  • From: pshenoy@n... (Praveen Shenoy)
  • To: Michael Beddow <mbnospam@m...>
  • Date: Tue, 20 Feb 2001 12:17:21 -0800

test xsl in browser
Thanks Michael,
What I posted was a part of the xml. Here is a sample xml and xsl. I
solved the problem myself. Let me give some additional info.
I am new to xml and I am using xmlspy IDE from xmlspy.com to create my
xml/xsl files. I wish to render this xml file in IE5 with the xsl I
created. The sample below works perfectly within xmlspy but not in IE. For
this to work in IE I need to replace the "xsl:stylesheet" line with the
one that Microsoft specifies in its xml rendering guidelines for IE. As I
am new to this I don't know what these lines really mean.

The commented "xsl:stylesheet" line (line 3) in the xsl is what makes it
work on IE. I will post this on the xsl list after this.

--------------------------test.xml------------------------
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<portal>
 <top>&lt;a HREF="http://www.yahoo.com"&gt;some stuff here&lt;/a&gt;</top>

</portal>
--------------------------test.xsl--------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!--xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
xmlns:HTML="http://www.w3.org/Profiles/XHTML-transitional"-->
<xsl:template match="/">
  <html>
   <body>
    <xsl:apply-templates select="portal"/>
   </body>
  </html>
</xsl:template>
<xsl:template match="portal">
 <h1>
 <xsl:apply-templates select="top"/>
 </h1>
</xsl:template>
<xsl:template match="top">
 <xsl:value-of disable-output-escaping="yes" select='.'/>
</xsl:template>
</xsl:stylesheet>
----------------------------------------------------------------------------



Michael Beddow wrote:

> Praveen,
>
> A better place to ask this would be
> http://www.mulberrytech.com/xsl/xsl-list
>
> I don't really see what you're trying to do or why you're approaching
> it this way.
>
> In what you've shown us, there's nothing in the xml for your
> <xsl:value-of select="url"/> to select (there isn't an element named
> "url")
>
> Also, why are you trying to write escaped html in your xml, instead of
> using native xml syntax and letting the xsl do the transform into html
> for you?
>
> Have you studied the FAQ entry http://www.dpawson.co.uk/xsl/N4973.html
>
> Michael
> ------------------------------------------
> Michael Beddow
> http://www.mbeddow.net/


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
 

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.