Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Problem with IE6

Reply
Thread Tools

Problem with IE6

 
 
Dennis
Guest
Posts: n/a
 
      05-03-2008
Why does this page...

http://kowallekfamily.com/genealogy/.../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
 
Reply With Quote
 
 
 
 
Richard Tobin
Guest
Posts: n/a
 
      05-03-2008
In article <(E-Mail Removed)>,
Dennis <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
 
Dennis
Guest
Posts: n/a
 
      05-03-2008
On 3 May 2008 21:22:53 GMT, http://www.velocityreviews.com/forums/(E-Mail Removed) (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
 
Reply With Quote
 
Dennis
Guest
Posts: n/a
 
      05-04-2008
On Sat, 03 May 2008 17:54:55 -0400, Dennis <(E-Mail Removed)> wrote:

>On 3 May 2008 21:22:53 GMT, (E-Mail Removed) (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
 
Reply With Quote
 
David Carlisle
Guest
Posts: n/a
 
      05-04-2008
Dennis wrote:
> On Sat, 03 May 2008 17:54:55 -0400, Dennis <(E-Mail Removed)> wrote:
>
>> On 3 May 2008 21:22:53 GMT, (E-Mail Removed) (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
 
Reply With Quote
 
David Carlisle
Guest
Posts: n/a
 
      05-04-2008
Dennis wrote:
> On Sat, 03 May 2008 17:54:55 -0400, Dennis <(E-Mail Removed)> wrote:
>
>> On 3 May 2008 21:22:53 GMT, (E-Mail Removed) (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
 
Reply With Quote
 
Dennis
Guest
Posts: n/a
 
      05-04-2008
On Sun, 04 May 2008 10:51:11 +0100, David Carlisle
<(E-Mail Removed)> wrote:

>Dennis wrote:
>> On Sat, 03 May 2008 17:54:55 -0400, Dennis <(E-Mail Removed)> wrote:
>>
>>> On 3 May 2008 21:22:53 GMT, (E-Mail Removed) (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
 
Reply With Quote
 
Richard Tobin
Guest
Posts: n/a
 
      05-04-2008
In article <(E-Mail Removed)>,
Dennis <(E-Mail Removed)> 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 xmlnssl="http://www.w3.org/1999/XSL/Transform">

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

-- Richard
--
:wq
 
Reply With Quote
 
Dennis
Guest
Posts: n/a
 
      05-04-2008
On 4 May 2008 14:09:21 GMT, (E-Mail Removed) (Richard Tobin)
wrote:

>In article <(E-Mail Removed)>,
>Dennis <(E-Mail Removed)> 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 xmlnssl="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 xmlnssl='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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IE6 Garbage Collection and general IE6 slowness problems timothytoe Javascript 4 06-03-2008 05:17 PM
AJAX problem: slow response using IE6 on Win2000 versus IE6 on XP Pugi! Javascript 0 02-05-2007 10:34 AM
IE6 SP1 rendering vs IE6 SP2 rendering Peter Mount HTML 4 01-31-2006 08:01 AM
Bug in IE6 , cant remove ie6 to replace Ockerr Computer Support 2 01-21-2005 04:01 PM
Just one ie6 template that works with ie6!? Ivor O'Connor HTML 4 11-25-2003 09:16 PM



Advertisments