cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Watson" <cwat...@taraserv.demon.co.uk>
Subject RE: Cocoon 2.0 release, IE5.5, XML NAMESPACE
Date Mon, 03 Dec 2001 23:35:03 GMT
Dear All

I've fixed my own problem, but only by changing source and rebuilding
cocoon, namely file
org.apache.cocoon.components.language.markup.xsp.java.xsp.xsl

lines 131 ... changed line 133

added filtering out of "xmlns:xml" namespace  in addition to the one
mentioned in the comment, thus -

        <!-- Declare namespaces that also exist on the parent (i.e. not
locally declared),
             and filter out "xmlns:xmlns" namespace produced by
Xerces+Saxon -->
        <xsl:if test="(($ns-prefix != 'xmlns') and ($ns-prefix != 'xml'))
and $parent-element/namespace::*[local-name(.) = $ns-prefix and string(.) =
$ns-uri]">
          this.contentHandler.startPrefixMapping(
            "<xsl:value-of select="$ns-prefix"/>",
            "<xsl:value-of select="$ns-uri"/>"
          );
      </xsl:if>

ALSO changed line 148 (the endPrefixMapping call) to follow suite !!!

Now I can once more use that lovely IE5.5 pretty-printing to see what my
xsp's are doing ;>

BUT ...

Have I just fixed a bug? Or is the bug in IE5.5?

Any Answers ?

-----Original Message-----
From: Christopher Watson [mailto:cwatson@taraserv.demon.co.uk]
Sent: 01 December 2001 16:05
To: Cocoon-Users (E-mail)
Subject: Cocoon 2.0 release, IE5.5, XML NAMESPACE


Dear Group

I've just started looking at Release 2.0

Looking at the output of xsp pages, they now include the namespace for xml,
i.e.
xmlns:xml="http://www.w3.org/XML/1998/namespace"

This results in the following behaviour in IE5.5 ...

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 namespace prefix is not allowed to start with the reserved string "xml".
Line 2, Position 7


<page xmlns:xml="http://www.w3.org/XML/1998/namespace"

... whereas before - event with c2rc2 there appeared the helpful nested tree
structure.

To replicate, try adding

   <map:match pattern="xsp-plain-xml/*">
    <map:generate type="serverpages" src="docs/samples/xsp/{1}.xsp"/>
    <map:serialize type="xml"/>
   </map:match>
after
   <map:match pattern="xsp-plain/*">
    <map:generate type="serverpages" src="docs/samples/xsp/{1}.xsp"/>
    <map:serialize/>
   </map:match>

in the sitemap
and try http://localhost:8080/cocoon/xsp-plain-xml/simple


A few questions ...

Is IE5.5 right to say <<The namespace prefix is not allowed to start with
the reserved string "xml".>> ?

Does IE6 or another browser allow xml with this namespace decl to be
displayed in a tree structure ?

Is there a way of supressing this namespace decl in release 2.0 ?

Any thanks gratefully received

Christopher


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message