This won't work. You need to keep track of the match between " and ', since it is allowed to use the opposite character inside a matching pair such as; Niclas Hans Ulrich Niedermann wrote: > Stefano Mazzocchi 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 **** > > >