Problem with IE6

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dennis

    Problem with IE6

    Why does this page...



    ....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
  • Richard Tobin

    #2
    Re: Problem with IE6

    In article <dgkp14lkh2q3kg a2gb0bed239tds4 2amdm@4ax.com>,
    Dennis <nobody@nowhere .comwrote:
    >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

    Comment

    • Dennis

      #3
      Re: Problem with IE6

      On 3 May 2008 21:22:53 GMT, richard@cogsci. ed.ac.uk (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

      Comment

      • Dennis

        #4
        Re: Problem with IE6

        On Sat, 03 May 2008 17:54:55 -0400, Dennis <nobody@nowhere .comwrote:
        >On 3 May 2008 21:22:53 GMT, richard@cogsci. ed.ac.uk (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

        Comment

        • David Carlisle

          #5
          Re: Problem with IE6

          Dennis wrote:
          On Sat, 03 May 2008 17:54:55 -0400, Dennis <nobody@nowhere .comwrote:
          >
          >On 3 May 2008 21:22:53 GMT, richard@cogsci. ed.ac.uk (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



          --

          Comment

          • David Carlisle

            #6
            Re: Problem with IE6

            Dennis wrote:
            On Sat, 03 May 2008 17:54:55 -0400, Dennis <nobody@nowhere .comwrote:
            >
            >On 3 May 2008 21:22:53 GMT, richard@cogsci. ed.ac.uk (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



            --

            Comment

            • Dennis

              #7
              Re: Problem with IE6

              On Sun, 04 May 2008 10:51:11 +0100, David Carlisle
              <david-news@dcarlisle. demon.co.ukwrot e:
              >Dennis wrote:
              >On Sat, 03 May 2008 17:54:55 -0400, Dennis <nobody@nowhere .comwrote:
              >>
              >>On 3 May 2008 21:22:53 GMT, richard@cogsci. ed.ac.uk (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

              Comment

              • Richard Tobin

                #8
                Re: Problem with IE6

                In article <nj7r14tq221ji6 49dkig4dv1dc6h5 d762b@4ax.com>,
                Dennis <nobody@nowhere .comwrote:
                >><!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

                Comment

                • Dennis

                  #9
                  Re: Problem with IE6

                  On 4 May 2008 14:09:21 GMT, richard@cogsci. ed.ac.uk (Richard Tobin)
                  wrote:
                  >In article <nj7r14tq221ji6 49dkig4dv1dc6h5 d762b@4ax.com>,
                  >Dennis <nobody@nowhere .comwrote:
                  >>><!ENTITY cr "<xsl:text>
                  >>></xsl:text>">
                  >
                  >>>It's a documented non-conformance of the msxml parser that entity
                  >>>replacemen t 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

                  Comment

                  Working...