Author: vsiveton
Date: Sun Jun 14 11:03:43 2009
New Revision: 784537

URL: http://svn.apache.org/viewvc?rev=784537&view=rev
Log:
o using p-u:1.5.15 (PLXUTILS-109 and PLXUTILS-110 are included in this release)

Modified:
    maven/doxia/doxia-sitetools/trunk/pom.xml
    maven/doxia/doxia-tools/trunk/pom.xml
    
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
    maven/doxia/doxia/trunk/pom.xml

Modified: maven/doxia/doxia-sitetools/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/pom.xml?rev=784537&r1=784536&r2=784537&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/pom.xml (original)
+++ maven/doxia/doxia-sitetools/trunk/pom.xml Sun Jun 14 11:03:43 2009
@@ -186,7 +186,7 @@
       <dependency>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-utils</artifactId>
-        <version>1.5.7</version>
+        <version>1.5.15</version>
       </dependency>
     </dependencies>
   </dependencyManagement>

Modified: maven/doxia/doxia-tools/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/pom.xml?rev=784537&r1=784536&r2=784537&view=diff
==============================================================================
--- maven/doxia/doxia-tools/trunk/pom.xml (original)
+++ maven/doxia/doxia-tools/trunk/pom.xml Sun Jun 14 11:03:43 2009
@@ -123,7 +123,7 @@
       <dependency>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-utils</artifactId>
-        <version>1.5.7</version>
+        <version>1.5.15</version>
       </dependency>
     </dependencies>
   </dependencyManagement>

Modified: 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java?rev=784537&r1=784536&r2=784537&view=diff
==============================================================================
--- 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
 (original)
+++ 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
 Sun Jun 14 11:03:43 2009
@@ -145,7 +145,7 @@
         // 2 second parsing to process
         try
         {
-            XmlPullParser parser = new DoxiaMXParser();
+            XmlPullParser parser = new MXParser();
 
             parser.setInput( source );
 
@@ -1070,243 +1070,4 @@
             }
         }
     }
-
-    /**
-     * Custom MXParser to fix PLXUTILS-109 and PLXUTILS-110
-     */
-    private static class DoxiaMXParser
-        extends MXParser
-    {
-        /** {...@inheritdoc} */
-        // Fix PLXUTILS-109
-        protected char[] parseEntityRef()
-            throws XmlPullParserException, IOException
-        {
-            // entity reference 
http://www.w3.org/TR/2000/REC-xml-20001006#NT-Reference
-            // [67] Reference ::= EntityRef | CharRef
-
-            // ASSUMPTION just after &
-            entityRefName = null;
-            posStart = pos;
-            char ch = more();
-            if ( ch == '#' )
-            {
-                return numericEntity( ch );
-            }
-            else
-            {
-                return namedEntity( ch );
-            }
-        }
-
-        /** {...@inheritdoc} */
-        // Fix PLXUTILS-110
-        public void defineEntityReplacementText( String entityName,
-                                                String replacementText )
-            throws XmlPullParserException
-        {
-            //      throw new XmlPullParserException("not allowed");
-
-            if ( !replacementText.startsWith( "&#" ) && this.entityName != 
null && replacementText.length() > 1 )
-            {
-                String tmp = replacementText.substring( 1, 
replacementText.length() - 1 );
-                for ( int i = 0; i < this.entityName.length; i++ )
-                {
-                    if ( this.entityName[i] != null && 
this.entityName[i].equals( tmp ) )
-                    {
-                        replacementText = this.entityReplacement[i];
-                    }
-                }
-            }
-
-            //protected char[] entityReplacement[];
-            ensureEntityCapacity();
-
-            // this is to make sure that if interning works we will take 
advantage of it ...
-            this.entityName[entityEnd] = newString( entityName.toCharArray(), 
0, entityName.length() );
-            entityNameBuf[entityEnd] = entityName.toCharArray();
-
-            entityReplacement[entityEnd] = replacementText;
-            entityReplacementBuf[entityEnd] = replacementText.toCharArray();
-            if ( !allStringsInterned )
-            {
-                entityNameHash[ entityEnd ] =
-                    fastHash( entityNameBuf[entityEnd], 0, 
entityNameBuf[entityEnd].length );
-            }
-            ++entityEnd;
-            //TODO disallow < or & in entity replacement text (or ]]>???)
-            // TOOD keepEntityNormalizedForAttributeValue cached as well ...
-        }
-
-        private char[] namedEntity( char ch )
-                throws IOException, XmlPullParserException
-        {
-            // [68] EntityRef ::= '&' Name ';'
-            // scan anem until ;
-            if ( !isNameStartChar( ch ) )
-            {
-                throw new XmlPullParserException( "entity reference names can 
not start with character '"
-                        + printable( ch ) + "'", this, null );
-            }
-            while ( true )
-            {
-                ch = more();
-                if ( ch == ';' )
-                {
-                    break;
-                }
-                if ( !isNameChar( ch ) )
-                {
-                    throw new XmlPullParserException( "entity reference name 
can not contain character "
-                            + printable( ch ) + "'", this, null );
-                }
-            }
-            posEnd = pos - 1;
-            // determine what name maps to
-            final int len = posEnd - posStart;
-            if ( len == 2 && buf[posStart] == 'l' && buf[posStart + 1] == 't' )
-            {
-                if ( tokenize )
-                {
-                    text = "<";
-                }
-                charRefOneCharBuf[0] = '<';
-                return charRefOneCharBuf;
-                // if(paramPC || isParserTokenizing) {
-                // if(pcEnd >= pc.length) ensurePC();
-                // pc[pcEnd++] = '<';
-                // }
-            }
-            else if ( len == 3 && buf[posStart] == 'a' && buf[posStart + 1] == 
'm' && buf[posStart + 2] == 'p' )
-            {
-                if ( tokenize )
-                {
-                    text = "&";
-                }
-                charRefOneCharBuf[0] = '&';
-                return charRefOneCharBuf;
-            }
-            else if ( len == 2 && buf[posStart] == 'g' && buf[posStart + 1] == 
't' )
-            {
-                if ( tokenize )
-                {
-                    text = ">";
-                }
-                charRefOneCharBuf[0] = '>';
-                return charRefOneCharBuf;
-            }
-            else if ( len == 4 && buf[posStart] == 'a' && buf[posStart + 1] == 
'p'
-                    && buf[posStart + 2] == 'o' && buf[posStart + 3] == 's' )
-            {
-                if ( tokenize )
-                {
-                    text = "'";
-                }
-                charRefOneCharBuf[0] = '\'';
-                return charRefOneCharBuf;
-            }
-            else if ( len == 4 && buf[posStart] == 'q' && buf[posStart + 1] == 
'u'
-                    && buf[posStart + 2] == 'o' && buf[posStart + 3] == 't' )
-            {
-                if ( tokenize )
-                {
-                    text = "\"";
-                }
-                charRefOneCharBuf[0] = '"';
-                return charRefOneCharBuf;
-            }
-            else
-            {
-                final char[] result = lookuEntityReplacement( len );
-                if ( result != null )
-                {
-                    return result;
-                }
-            }
-            if ( tokenize )
-            {
-                text = null;
-            }
-            return null;
-        }
-
-        private char[] numericEntity( char ch )
-                throws IOException, XmlPullParserException
-        {
-            // parse character reference
-            char charRef = 0;
-            ch = more();
-            StringBuffer sb = new StringBuffer();
-            if ( ch == 'x' )
-            {
-                // encoded in hex
-                while ( true )
-                {
-                    ch = more();
-                    if ( ch >= '0' && ch <= '9' )
-                    {
-                        sb.append( ch );
-                        charRef = (char) ( charRef * 16 + ( ch - '0' ) );
-                    }
-                    else if ( ch >= 'a' && ch <= 'f' )
-                    {
-                        sb.append( ch );
-                        charRef = (char) ( charRef * 16 + ( ch - ( 'a' - 10 ) 
) );
-                    }
-                    else if ( ch >= 'A' && ch <= 'F' )
-                    {
-                        sb.append( ch );
-                        charRef = (char) ( charRef * 16 + ( ch - ( 'A' - 10 ) 
) );
-                    }
-                    else if ( ch == ';' )
-                    {
-                        break;
-                    }
-                    else
-                    {
-                        throw new XmlPullParserException( "character reference 
(with hex value) may not contain "
-                                + printable( ch ), this, null );
-                    }
-                }
-            }
-            else
-            {
-                // encoded in decimal
-                while ( true )
-                {
-                    if ( ch >= '0' && ch <= '9' )
-                    {
-                        charRef = (char) ( charRef * 10 + ( ch - '0' ) );
-                    }
-                    else if ( ch == ';' )
-                    {
-                        break;
-                    }
-                    else
-                    {
-                        throw new XmlPullParserException( "character reference 
(with decimal value) may not contain "
-                                + printable( ch ), this, null );
-                    }
-                    ch = more();
-                }
-            }
-            posEnd = pos - 1;
-            if ( sb.length() > 0 )
-            {
-                char[] tmp = HtmlTools.toChars( Integer.parseInt( 
sb.toString(), 16 ) );
-                charRefOneCharBuf = tmp;
-                if ( tokenize )
-                {
-                    text = newString( charRefOneCharBuf, 0, 
charRefOneCharBuf.length );
-                }
-                return charRefOneCharBuf;
-            }
-            charRefOneCharBuf[0] = charRef;
-            if ( tokenize )
-            {
-                text = newString( charRefOneCharBuf, 0, 1 );
-            }
-            return charRefOneCharBuf;
-        }
-    }
 }

Modified: maven/doxia/doxia/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/pom.xml?rev=784537&r1=784536&r2=784537&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/pom.xml (original)
+++ maven/doxia/doxia/trunk/pom.xml Sun Jun 14 11:03:43 2009
@@ -229,7 +229,7 @@
       <dependency>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-utils</artifactId>
-        <version>1.5.7</version>
+        <version>1.5.15</version>
       </dependency>
     </dependencies>
   </dependencyManagement>


Reply via email to