Problem with IE6

Discussion in 'XML' started by Dennis, May 3, 2008.

  1. Dennis

    Dennis Guest

    Why does this page...

    http://kowallekfamily.com/genealogy/reports/desc-1766.xml

    ....display fine in Firefox 2.0.0.14 but gets an error in IE6?

    In IE6 I get the message...

    >The XML page cannot be displayed
    >Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    >
    >
    >--------------------------------------------------------------------------------
    >
    >The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML documen...


    TIA,

    --

    Dennis
    Dennis, May 3, 2008
    #1
    1. Advertising

  2. In article <>,
    Dennis <> wrote:

    >The stylesheet does not contain a document element. The stylesheet may
    >be empty, or it may not be a well-formed XML documen...


    It looks ok to me.

    I suppose it's possible that it's objecting to the fact that the
    name in the doctype does not match the name of the top-level
    element, but that is not a well-formedness error and the document
    is not expected to be valid.

    Try changing this line

    <!DOCTYPE stylesheet [

    to read

    <!DOCTYPE xsl:stylesheet [

    -- Richard
    --
    :wq
    Richard Tobin, May 3, 2008
    #2
    1. Advertising

  3. Dennis

    Dennis Guest

    On 3 May 2008 21:22:53 GMT, (Richard Tobin)
    wrote:

    >Try changing this line
    >
    ><!DOCTYPE stylesheet [
    >
    >to read
    >
    ><!DOCTYPE xsl:stylesheet [


    Still didn't work.

    Maybe I'll have to try deleting stuff until I get it to work again. This
    used to work in IE6 until I added some stuff recently. I don't remember
    the last time I tried it in IE6 though.

    Thanks,

    --

    Dennis
    Dennis, May 3, 2008
    #3
  4. Dennis

    Dennis Guest

    On Sat, 03 May 2008 17:54:55 -0400, Dennis <> wrote:

    >On 3 May 2008 21:22:53 GMT, (Richard Tobin)
    >wrote:
    >
    >>Try changing this line
    >>
    >><!DOCTYPE stylesheet [
    >>
    >>to read
    >>
    >><!DOCTYPE xsl:stylesheet [

    >
    >Still didn't work.
    >
    >Maybe I'll have to try deleting stuff until I get it to work again. This
    >used to work in IE6 until I added some stuff recently. I don't remember
    >the last time I tried it in IE6 though.


    I deleted the...

    <!DOCTYPE xsl:stylesheet [
    <!ENTITY space "<xsl:text> </xsl:text>">
    <!ENTITY cr "<xsl:text>
    </xsl:text>">
    ]>

    .... and deleted all instances of the &cr;. Now it works in IE6. For some
    reason IE6 croaks on this. I might have to go back to using...

    <xsl:text>
    </xsl:text> (or was it <xsl:text>
    </xsl:text>).

    Should this have caused a problem in IE6?

    --

    Dennis
    Dennis, May 4, 2008
    #4
  5. Dennis wrote:
    > On Sat, 03 May 2008 17:54:55 -0400, Dennis <> wrote:
    >
    >> On 3 May 2008 21:22:53 GMT, (Richard Tobin)
    >> wrote:
    >>
    >>> Try changing this line
    >>>
    >>> <!DOCTYPE stylesheet [
    >>>
    >>> to read
    >>>
    >>> <!DOCTYPE xsl:stylesheet [

    >> Still didn't work.
    >>
    >> Maybe I'll have to try deleting stuff until I get it to work again. This
    >> used to work in IE6 until I added some stuff recently. I don't remember
    >> the last time I tried it in IE6 though.

    >
    > I deleted the...
    >
    > <!DOCTYPE xsl:stylesheet [
    > <!ENTITY space "<xsl:text> </xsl:text>">
    > <!ENTITY cr "<xsl:text>
    > </xsl:text>">
    > ]>
    >
    > ... and deleted all instances of the &cr;. Now it works in IE6. For some
    > reason IE6 croaks on this. I might have to go back to using...
    >
    > <xsl:text>
    </xsl:text> (or was it <xsl:text>
    </xsl:text>).
    >
    > Should this have caused a problem in IE6?
    >


    It's a documented non-conformance of the msxml parser that entity
    replacement texts have to be namespace well formed, with namespaces
    declared within the entity.

    I think actually it's anyway better to use <xsl:text>
    </xsl:text>
    as in an xslt context hiding element structure in entities obscures the
    program and makes it harder to follow, especially in terms of white
    space stripping.

    <xsl:template match="bbb">
    &cr;
    <xsl:apply-templates...

    in the above it's a lot harder for anyone looking at the stylesheet to
    tell if the white space before and after the &cr; is a white space text
    node that will be striped, or a node with non-white characters (from a
    possible entity expansion).

    David



    --
    http://dpcarlisle.blogspot.com
    David Carlisle, May 4, 2008
    #5
  6. Dennis wrote:
    > On Sat, 03 May 2008 17:54:55 -0400, Dennis <> wrote:
    >
    >> On 3 May 2008 21:22:53 GMT, (Richard Tobin)
    >> wrote:
    >>
    >>> Try changing this line
    >>>
    >>> <!DOCTYPE stylesheet [
    >>>
    >>> to read
    >>>
    >>> <!DOCTYPE xsl:stylesheet [

    >> Still didn't work.
    >>
    >> Maybe I'll have to try deleting stuff until I get it to work again. This
    >> used to work in IE6 until I added some stuff recently. I don't remember
    >> the last time I tried it in IE6 though.

    >
    > I deleted the...
    >
    > <!DOCTYPE xsl:stylesheet [
    > <!ENTITY space "<xsl:text> </xsl:text>">
    > <!ENTITY cr "<xsl:text>
    > </xsl:text>">
    > ]>
    >
    > ... and deleted all instances of the &cr;. Now it works in IE6. For some
    > reason IE6 croaks on this. I might have to go back to using...
    >
    > <xsl:text>
    </xsl:text> (or was it <xsl:text>
    </xsl:text>).
    >
    > Should this have caused a problem in IE6?
    >


    It's a documented non-conformance of the msxml parser that entity
    replacement texts have to be namespace well formed, with namespaces
    declared within the entity.

    I think actually it's anyway better to use <xsl:text>
    </xsl:text>
    as in an xslt context hiding element structure in entities obscures the
    program and makes it harder to follow, especially in terms of white
    space stripping.

    <xsl:template match="bbb">
    &cr;
    <xsl:apply-templates...

    in the above it's a lot harder for anyone looking at the stylesheet to
    tell if the white space before and after the &cr; is a white space text
    node that will be striped, or a node with non-white characters (from a
    possible entity expansion).

    David



    --
    http://dpcarlisle.blogspot.com
    David Carlisle, May 4, 2008
    #6
  7. Dennis

    Dennis Guest

    On Sun, 04 May 2008 10:51:11 +0100, David Carlisle
    <> wrote:

    >Dennis wrote:
    >> On Sat, 03 May 2008 17:54:55 -0400, Dennis <> wrote:
    >>
    >>> On 3 May 2008 21:22:53 GMT, (Richard Tobin)
    >>> wrote:
    >>>
    >>>> Try changing this line
    >>>>
    >>>> <!DOCTYPE stylesheet [
    >>>>
    >>>> to read
    >>>>
    >>>> <!DOCTYPE xsl:stylesheet [
    >>> Still didn't work.
    >>>
    >>> Maybe I'll have to try deleting stuff until I get it to work again. This
    >>> used to work in IE6 until I added some stuff recently. I don't remember
    >>> the last time I tried it in IE6 though.

    >>
    >> I deleted the...
    >>
    >> <!DOCTYPE xsl:stylesheet [
    >> <!ENTITY space "<xsl:text> </xsl:text>">
    >> <!ENTITY cr "<xsl:text>
    >> </xsl:text>">
    >> ]>
    >>
    >> ... and deleted all instances of the &cr;. Now it works in IE6. For some
    >> reason IE6 croaks on this. I might have to go back to using...
    >>
    >> <xsl:text>
    </xsl:text> (or was it <xsl:text>
    </xsl:text>).
    >>
    >> Should this have caused a problem in IE6?
    >>

    >
    >It's a documented non-conformance of the msxml parser that entity
    >replacement texts have to be namespace well formed, with namespaces
    >declared within the entity.


    If I wanted to use entity replacement texts, how would I fix it?

    --

    Dennis
    Dennis, May 4, 2008
    #7
  8. In article <>,
    Dennis <> wrote:
    >>> <!ENTITY cr "<xsl:text>
    >>> </xsl:text>">


    >>It's a documented non-conformance of the msxml parser that entity
    >>replacement texts have to be namespace well formed, with namespaces
    >>declared within the entity.


    >If I wanted to use entity replacement texts, how would I fix it?


    You could try adding a namespace declaration to the element
    in the entity definition:

    <xsl:text xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    You wouldn't be *fixing* it though, you'd be working around
    Microsoft's bug.

    -- Richard
    --
    :wq
    Richard Tobin, May 4, 2008
    #8
  9. Dennis

    Dennis Guest

    On 4 May 2008 14:09:21 GMT, (Richard Tobin)
    wrote:

    >In article <>,
    >Dennis <> wrote:
    >>>> <!ENTITY cr "<xsl:text>
    >>>> </xsl:text>">

    >
    >>>It's a documented non-conformance of the msxml parser that entity
    >>>replacement texts have to be namespace well formed, with namespaces
    >>>declared within the entity.

    >
    >>If I wanted to use entity replacement texts, how would I fix it?

    >
    >You could try adding a namespace declaration to the element
    >in the entity definition:
    >
    > <xsl:text xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    >
    >You wouldn't be *fixing* it though, you'd be working around
    >Microsoft's bug.


    I had to go with single quotes...

    <xsl:text xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

    .... but that did the trick.

    I don't know which way I'll go yet. I just wanted to have the answer
    handy for when the time comes to decide. After I finish the initial
    stylesheet development I might decide to eliminate the carriage returns
    entirely. I want them there now for debugging (makes it easy on the
    eyes).

    Thanks,

    --

    Dennis
    Dennis, May 4, 2008
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PJ
    Replies:
    1
    Views:
    962
    Kathy Burke
    Jun 25, 2003
  2. Ivor O'Connor
    Replies:
    4
    Views:
    828
    Isofarro
    Nov 25, 2003
  3. Peter Mount
    Replies:
    4
    Views:
    933
    Peter Mount
    Jan 31, 2006
  4. Pugi!
    Replies:
    0
    Views:
    228
    Pugi!
    Feb 5, 2007
  5. timothytoe
    Replies:
    4
    Views:
    140
Loading...

Share This Page