Problem with IE6

R

Richard Tobin

Dennis said:
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
 
D

Dennis

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,
 
D

Dennis

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?
 
D

David Carlisle

Dennis said:
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
 
D

David Carlisle

Dennis said:
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
 
D

Dennis

Dennis said:
On 3 May 2008 21:22:53 GMT, (e-mail address 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?
 
D

Dennis

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,
 

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

Similar Threads

Problem with Firefox? 6
zend example 4
XML/XSLT problem 2
Only one table shows up with the information 2
OpenGL 2.1 API xml crap ? :( 37
xls confusion 1
Help with IE6 popups needed 0
Vista IE7 Recussion Error 1

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top