jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r159391 - incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/AbstractSAXEventGenerator.java
Date Tue, 29 Mar 2005 16:31:00 GMT
Author: stefan
Date: Tue Mar 29 08:31:00 2005
New Revision: 159391

URL: http://svn.apache.org/viewcvs?view=rev&rev=159391
Log:
export: skipping xml prefix in namespace delcarations

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/AbstractSAXEventGenerator.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/AbstractSAXEventGenerator.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/AbstractSAXEventGenerator.java?view=diff&r1=159390&r2=159391
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/AbstractSAXEventGenerator.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/AbstractSAXEventGenerator.java
Tue Mar 29 08:31:00 2005
@@ -107,6 +107,10 @@
         String[] prefixes = session.getNamespacePrefixes();
         for (int i = 0; i < prefixes.length; i++) {
             String prefix = prefixes[i];
+            if (NS_XML_PREFIX.equals(prefix)) {
+                // skip 'xml' prefix as this would be an illegal namespace declaration
+                continue;
+            }
             String uri = session.getNamespaceURI(prefix);
             contentHandler.startPrefixMapping(prefix, uri);
         }
@@ -121,7 +125,12 @@
         // end namespace declarations
         String[] prefixes = session.getNamespacePrefixes();
         for (int i = 0; i < prefixes.length; i++) {
-            contentHandler.endPrefixMapping(prefixes[i]);
+            String prefix = prefixes[i];
+            if (NS_XML_PREFIX.equals(prefix)) {
+                // skip 'xml' prefix as this would be an illegal namespace declaration
+                continue;
+            }
+            contentHandler.endPrefixMapping(prefix);
         }
     }
 



Mime
View raw message