[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] RE: XML/XSLT to HTML output


Subject: RE: [xsl] RE: XML/XSLT to HTML output
From: "Kirk Allen Evans" <kaevans@xxxxxxxxxxxxx>
Date: Wed, 18 Sep 2002 13:41:22 -0400

Not a browser issue, just an implementation issue.  If your users want
the HTML result of the transformation, you are going to have to change
something.  Either the user needs to install the add-on from Microsoft
as mentioned by both David and I, or you will need to code your app to
perform the transformation in some other fashion.  Is this data coming
from a web server?  If so, you might consider performing the
transformation on the server, then outputting the transformed result as
the result of the HTTP request.

Kirk Allen Evans
http://www.xmlandasp.net
Author, "XML And ASP.NET", New Riders Publishing
http://www.amazon.com/exec/obidos/ASIN/073571200X

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-
> list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of CROFT, MICHAEL
> Sent: Wednesday, September 18, 2002 1:16 PM
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: RE: [xsl] RE: XML/XSLT to HTML output
> 
> 		The business issue is that the Customer Service
> Representative will click a link that points to the XML document(which
> contains the data for the report) and the XML document points to my
XSL
> stylesheet(s) which render the XML document and display the output in
the
> browser.  The output in the browser shows the marked-up XML document
> correctly and looks like an HTML document.  The Customer Service
> Representative wants to be able to save this file and email it.  When
you
> try to save the file, it saves it as an XML document so of course they
> lose
> all the markup.  I use XML-Spy as an XML editor, and when I apply my
XSL
> transformation to the XML document, it shows it as an html document
and
> keeps my html tags and so it can be saved as an html document.  But
when
> transformed in the browser, the file cannot be saved as an html
document,
> and so the report is useless to the Customer Service Representative as
an
> xml document.  Is this a browser issue?  What is the purpose of the
> <xsl:output method="html"/> when I.E. 6.0 is used, since it seems to
> ignore
> this anyway.  Im also aware this is an implicit stylesheet tag and
even if
> I
> left it out, it should default to html anyway.
> 		Here is a tested example (Not my report):
> 		Here is the stylesheet:
> 		<?xml version="1.0" encoding="UTF-8"?>
> 		<xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> 
> 			<xsl:template match="poem">
> 				<html>
> 					<body>
> 						<xsl:apply-templates/>
> 					</body>
> 				</html>
> 			</xsl:template>
> 			<xsl:template match="title">
> 				<h1>
> 					<xsl:apply-templates/>
> 				</h1>
> 			</xsl:template>
> 		</xsl:stylesheet>
> 
> 		Here is the xml document:
> 		<?xml version="1.0" encoding="UTF-8"?>
> 		<?xml-stylesheet type="text/xsl" href="C:\Documents and
> Settings\a10037\My Documents\TESTER.xsl"?>
> 		<poem>
> 			<title>this is a test</title>
> 		</poem>
> 
> 		Here is the transformed output result using
XML-Spy:(This is
> what Im trying to get with the browser)
> 		<html>
> 			<body>
> 				<h1>this is a test</h1>
> 			</body>
> 		</html>
> 
> 		This result is what I want to see in the browser.  But
using
> the same stylesheet & xml document, this is the browser result:
> 		<?xml version="1.0" encoding="UTF-8"?>
> 		<?xml-stylesheet type="text/xsl" href="C:\Documents and
> Settings\a10037\My Documents\TESTER.xsl"?>
> 		<poem>
> 			<title>this is a test</title>
> 		</poem>
> 
> 		Notice I lose all my html markup....Is there a solution
to
> this???
> 
> 		Michael D. Croft
> 		I.T.  Developer
> 		Amica Insurance
> 		(800) 24.AMICA ext. 4918
> 		(401) 334.1634 fax
> 		mcroft@xxxxxxxxx
> 
> 				-----Original Message-----
> 				From:	Kirk Allen Evans
> [mailto:kaevans@xxxxxxxxxxxxx]
> 				Sent:	Wednesday, September 18, 2002
11:41
> AM
> 				To:	xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> 				Subject:	RE: [xsl] RE:
> 
> 				The source is actually the XML file, so
it
> is showing you the correct
> 				listing.  However, you can download a
> utility add-on for IE that will
> 				allow you to look at the output of the
> transformation [1].  The utility
> 				is called "Internet Explorer Tools for
> Validating XML and Viewing XSLT
> 				Output."
> 
> 				[1]
> 
>
http://msdn.microsoft.com/downloads/sample.asp?url=/msdn-files/027/000/5
> 				43/msdncompositedoc.xml&frame=true
> 
> 
> 				Kirk Allen Evans
> 				http://www.xmlandasp.net
> 				Author, "XML And ASP.NET", New Riders
> Publishing
> 
> http://www.amazon.com/exec/obidos/ASIN/073571200X
> 
> 				> -----Original Message-----
> 				> From:
> owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-
> 				> list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf
Of
> CROFT, MICHAEL
> 				> Sent: Wednesday, September 18, 2002
11:14
> AM
> 				> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> 				> Subject: [xsl] RE:
> 				>
> 				> 		When the browser renders
the
> XML document using my XSLT
> 				> stylesheet, the report displays
> successfully in the browser, and then
> 				you
> 				> select view source on the browser, it
only
> displays the XML document.
> 				It
> 				> is
> 				> not outputting my html tags.  It is a
.xml
> file, not a .html file.
> 				>
> 				> 		Mike
> 				>
> 				>
> -----Original Message-----
> 				> 				From:
> David Carlisle
> 				> [mailto:davidc@xxxxxxxxx]
> 				> 				Sent:
> Wednesday, September 18, 2002
> 				10:26
> 				> AM
> 				> 				To:
> xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> 				> 				Subject:
> 				>
> 				>
> 				> 				>
Does
> anyone know how to have the
> 				I.E
> 				> 6.0 browser output a
> 				> 				>
rendered
> XML document using XSLT as an
> 				> HTML document.
> 				>
> 				> 				that's
what
> it does. (What do you mean
> 				by
> 				> "output" though in
> 				> 				the case
of
> a browser?)
> 				>
> 				> 				>
> 				>
> xmlns:fo="http://www.w3.org/1999/XSL/Format">
> 				> 				you
don't
> appear to need to declare the
> 				FO
> 				> namespace in this stylesheet
> 				>
> 				>
> 				> 				This
isn't
> needed as it will already be
> 				the
> 				> default as the top level
> 				> 				element
is
> html.
> 				>
> <xsl:output
> 				method="html"/>
> 				>
> 				>
> 				> 				David
> 				>
> 				>
> 				>
> _____________________________________________________________________
> 				> 				This
message
> has been checked for all
> 				known
> 				> viruses by Star Internet
> 				>
delivered
> through the MessageLabs Virus
> 				> Scanning Service. For further
> 				>
information
> visit
> 				> http://www.star.net.uk/stats.asp or
> alternatively call
> 				> 				Star
> Internet for details on the Virus
> 				> Scanning Service.
> 				>
> 				>
XSL-List
> info and archive:
> 				>
http://www.mulberrytech.com/xsl/xsl-list
> 				>
> 				>
> 				>
> **********************************************************************
> 				> This email and any files transmitted
with
> it are confidential and
> 				> intended solely for the use of the
> individual or entity to whom they
> 				> are addressed. If you have received
this
> email in error please notify
> 				> the sender and postmaster@xxxxxxxxxx
> 				>
> **********************************************************************
> 				>
> 				>
> 				>
> 				>  XSL-List info and archive:
> http://www.mulberrytech.com/xsl/xsl-list
> 				>
> 
> 
> 
> 
> 				 XSL-List info and archive:
> http://www.mulberrytech.com/xsl/xsl-list
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords