xsl-list
[Top] [All Lists]

RE: [xsl] IE does not comprehend default namespace in XML

2009-08-28 09:34:30
From: denit thomas [mailto:denit_thomas(_at_)yahoo(_dot_)co(_dot_)in]
Sent: Friday, August 28, 2009 3:19 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] IE does not comprehend default namespace in XML

Sperberg,
I managed to fix this issue. It was a very basic fix. I added the
default namespace in the stylesheet as well and had a prefix for it
defined too in the stylesheet. I then used the prefix to access the
elements (from the xml).

As I said I am pretty new to this :-)

The reason why you experienced the problem is that it was an error in 
your stylesheet, not IE's fault.  Its too easy to blame IE without
understanding what its trying to resolve based on what you specified
in your stylesheet.  You specified in your stylesheet

  <html>

without providing a namespace on the element nor supplied an xmlns=
on the xsl:stylesheet document element.  Therefore, that <html>
element is not in the XHTML namespace which is:

  http://www.w3.org/1999/xhtml

Because you didn't associate that <html> element with the XHTML
namespace IE will not recognize the markup as being XHTML and will
not automatically place itself into standards mode.  This has
implications on the CSS model being used, e.g., non-standards
complient.

Further, you didn't specify a DOCTYPE in your xsl:output so IE
doesn't know which version of HTML that you are talking about,
e.g., 3.2, 4.0, 4.01, etc.  This means that IE will choose to 
be very lax about the markup it is willing to accept.
        

Andy. 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>