cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Ulrich Niedermann <niederm...@isd.uni-stuttgart.de>
Subject Re: BUG?
Date Sun, 02 Jul 2000 18:51:01 GMT
Stefano Mazzocchi <stefano@apache.org> writes:

> Niclas Hedhman wrote:

[ Attributes in Processing instructions ]

> > clearly indicating that both " and ' should be allowed, as long as they
> > are matching.
> 
> Cool, so we've found a bug.... :)
> 
> Anyway volunteers to fix it (it should be pretty trivial)

The following will probably work as long as nobody uses constructs
like '"' or "'". Otherwise it will be difficult without regexps. 

The code is untested as I'm too silly to get C1 & C2 working on the
same machine. But at least it compiles :-) 

Index: src/org/apache/cocoon/Utils.java
===================================================================
RCS file: /home/cvspublic/xml-cocoon/src/org/apache/cocoon/Utils.java,v
retrieving revision 1.16
diff -c -r1.16 Utils.java
*** src/org/apache/cocoon/Utils.java	2000/06/04 20:03:35	1.16
--- src/org/apache/cocoon/Utils.java	2000/07/02 18:43:05
***************
*** 165,171 ****
      private static final void addPIPseudoAttributes(ProcessingInstruction pi, Hashtable
attributes) {
          String data = pi.getData();
  
!         Tokenizer st = new Tokenizer(data, "\"");
          try {
            while (st.hasMoreTokens()) {
                String key   = st.nextToken();     // attribute name and '='
--- 165,171 ----
      private static final void addPIPseudoAttributes(ProcessingInstruction pi, Hashtable
attributes) {
          String data = pi.getData();
  
!         Tokenizer st = new Tokenizer(data, "\"'");
          try {
            while (st.hasMoreTokens()) {
                String key   = st.nextToken();     // attribute name and '='

And the following one fixes a missing heading in the C1 HTML docs.

Index: skins/xml.apache.org/stylesheets/document2html.xsl
===================================================================
RCS file: /home/cvspublic/xml-cocoon/skins/xml.apache.org/stylesheets/document2html.xsl,v
retrieving revision 1.8
diff -c -r1.8 document2html.xsl
*** skins/xml.apache.org/stylesheets/document2html.xsl	2000/05/13 00:40:25	1.8
--- skins/xml.apache.org/stylesheets/document2html.xsl	2000/07/02 18:43:03
***************
*** 16,22 ****
      <html>
        <head>
          <script language="JavaScript" type="text/javascript" src="resources/script.js"/>
!         <title><xsl:value-of select="document/header/title"/></title>
        </head>
        <body text="#000000" link="#039acc" vlink="#0086b2" alink="#cc0000"
              topmargin="4" leftmargin="4" marginwidth="4" marginheight="4"
--- 16,22 ----
      <html>
        <head>
          <script language="JavaScript" type="text/javascript" src="resources/script.js"/>
!         <title><xsl:value-of select="(document|specification)/header/title"/></title>
        </head>
        <body text="#000000" link="#039acc" vlink="#0086b2" alink="#cc0000"
              topmargin="4" leftmargin="4" marginwidth="4" marginheight="4"

Have fun,

Uli

Mime
View raw message