browser does not transform xml when server through web server

R

robert walker

hi all, can someone help me with this

I have xml file on
my web server (iplanet) and want to
to load them from a client (internet explorer)
and see the transformed xml in html

my xslt is billing_reports.xsl like this

=====================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:eek:utput method="html"/>
<xsl:template match="/">
......
=====================================

and my xml file looks like
=====================================
<?xml version="1.0" encoding="ISO-8859-1"?>

<?xml-stylesheet href="billing_reports.xsl" type="text/xsl"?>

<INVOICE INVOICE_TYPE="DRAFT">

.......
=====================================

when served to the the client, no transformation takes place



internet explorer client gives
"Invalid at the top level of the document. Error processing resource
..."
its well formed xml and there is no dtd, so I do not understand this
message,
and
mozilla yeieds the xml
as if it were a text file



XML Bible book states

There are three primary ways to transform XML documents into other
formats, such as HTML, with an XSLT style sheet:

1. The XML document and associated style sheet are both served to the
client (Web browser), which then transforms the document as specified
by the style sheet and presents it to the user.

..
..
..
..


how do I configure #1 so that this happens

thanks
 
J

Joe Fawcett

robert walker said:
hi all, can someone help me with this

I have xml file on
my web server (iplanet) and want to
to load them from a client (internet explorer)
and see the transformed xml in html

my xslt is billing_reports.xsl like this

=====================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:eek:utput method="html"/>
<xsl:template match="/">
.....
=====================================

and my xml file looks like
=====================================
<?xml version="1.0" encoding="ISO-8859-1"?>

<?xml-stylesheet href="billing_reports.xsl" type="text/xsl"?>

<INVOICE INVOICE_TYPE="DRAFT">

......
=====================================

when served to the the client, no transformation takes place



internet explorer client gives
"Invalid at the top level of the document. Error processing resource
.."
its well formed xml and there is no dtd, so I do not understand this
Are you sure there is NO whitespace before the xml prolog?

Joe (MVP - xml)
 
R

robert walker

hi joe, i think all
ws is removed proior to start of

<?xml version="1.0" encoding="iso-8859-1"?>


in my xml file

this is what you are suggesting i check right?

i was reading about cocoon and additional processing instructions to
get this to work, but thought it should just happen when requesting a
xml
resource

thanks
 
J

Joe Fawcett

robert walker said:
hi joe, i think all
ws is removed proior to start of

<?xml version="1.0" encoding="iso-8859-1"?>


in my xml file

this is what you are suggesting i check right?

i was reading about cocoon and additional processing instructions to
get this to work, but thought it should just happen when requesting a
xml
resource

thanks
If you email the files to joefawcett - AT - hotmail.com I'll check them on
my server/browser.
(You'll need to email rather than post inline because that can change
encoding etc.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,231
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top