You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2018/06/20 22:23:39 UTC

[directory-ldap-api] branch master updated: Last drop of changes related to ERR/MSG

This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-ldap-api.git


The following commit(s) were added to refs/heads/master by this push:
     new 1cd2385  Last drop of changes related to ERR/MSG
1cd2385 is described below

commit 1cd2385daaf423163df260faed6b5bdacb14ab9f
Author: Emmanuel Lécharny <el...@symas.com>
AuthorDate: Thu Jun 21 00:23:36 2018 +0200

    Last drop of changes related to ERR/MSG
---
 .../directory/api/dsmlv2/AbstractGrammar.java      |   2 +-
 .../apache/directory/api/dsmlv2/Dsmlv2Parser.java  |   8 +-
 .../directory/api/dsmlv2/Dsmlv2ResponseParser.java |   8 +-
 .../apache/directory/api/dsmlv2/ParserUtils.java   |   8 +-
 .../dsmlv2/request/AttributeValueAssertion.java    |   3 +-
 .../api/dsmlv2/request/Dsmlv2Grammar.java          | 141 ++++++++++-----------
 .../api/dsmlv2/request/SearchRequestDsml.java      |   5 +-
 .../api/dsmlv2/response/Dsmlv2ResponseGrammar.java |  34 ++---
 .../api/dsmlv2/response/ErrorResponse.java         |   5 +-
 .../api/dsmlv2/response/SearchResponseDsml.java    |   5 +-
 .../java/org/apache/directory/api/i18n/I18n.java   |  87 +++++++------
 .../apache/directory/api/i18n/errors.properties    |  85 +++++++------
 .../apache/directory/api/i18n/messages.properties  |   3 +
 13 files changed, 210 insertions(+), 184 deletions(-)

diff --git a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractGrammar.java b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractGrammar.java
index 4029003..9ff4817 100644
--- a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractGrammar.java
+++ b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractGrammar.java
@@ -164,7 +164,7 @@ public abstract class AbstractGrammar implements Grammar
         }
         else
         {
-            throw new XmlPullParserException( I18n.err( I18n.ERR_03036, new Tag( tagName, tagType ) ), xpp, null );
+            throw new XmlPullParserException( I18n.err( I18n.ERR_03036_MISSING_TAG, new Tag( tagName, tagType ) ), xpp, null );
         }
     }
 }
diff --git a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2Parser.java b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2Parser.java
index 3b2f188..3dd3277 100644
--- a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2Parser.java
+++ b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2Parser.java
@@ -209,7 +209,7 @@ public class Dsmlv2Parser
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03037, ioe.getLocalizedMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03019_IO_EXCEPTION_OCCURED, ioe.getLocalizedMessage() ), xpp, ioe );
             }
         }
         while ( container.getState() != Dsmlv2StatesEnum.BATCHREQUEST_START_TAG );
@@ -249,7 +249,7 @@ public class Dsmlv2Parser
         }
         else
         {
-            throw new XmlPullParserException( I18n.err( I18n.ERR_03036, new Tag( tagName, tagType ) ), xpp, null );
+            throw new XmlPullParserException( I18n.err( I18n.ERR_03036_MISSING_TAG, new Tag( tagName, tagType ) ), xpp, null );
         }
     }
 
@@ -290,7 +290,7 @@ public class Dsmlv2Parser
                 }
                 catch ( IOException ioe )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03037, ioe.getLocalizedMessage() ), xpp, ioe );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03019_IO_EXCEPTION_OCCURED, ioe.getLocalizedMessage() ), xpp, ioe );
                 }
                 eventType = xpp.getEventType();
             }
@@ -323,7 +323,7 @@ public class Dsmlv2Parser
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03037, ioe.getLocalizedMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03019_IO_EXCEPTION_OCCURED, ioe.getLocalizedMessage() ), xpp, ioe );
             }
         }
         while ( container.getState() != Dsmlv2StatesEnum.BATCHREQUEST_LOOP );
diff --git a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2ResponseParser.java b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2ResponseParser.java
index 1fb3d19..54aeebd 100644
--- a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2ResponseParser.java
+++ b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2ResponseParser.java
@@ -169,7 +169,7 @@ public class Dsmlv2ResponseParser
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03037, ioe.getLocalizedMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03019_IO_EXCEPTION_OCCURED, ioe.getLocalizedMessage() ), xpp, ioe );
             }
         }
         while ( container.getState() != Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP );
@@ -202,7 +202,7 @@ public class Dsmlv2ResponseParser
         }
         else
         {
-            throw new XmlPullParserException( I18n.err( I18n.ERR_03036, new Tag( tagName, tagType ) ), xpp, null );
+            throw new XmlPullParserException( I18n.err( I18n.ERR_03036_MISSING_TAG, new Tag( tagName, tagType ) ), xpp, null );
         }
     }
 
@@ -243,7 +243,7 @@ public class Dsmlv2ResponseParser
                 }
                 catch ( IOException ioe )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03037, ioe.getLocalizedMessage() ), xpp, ioe );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03019_IO_EXCEPTION_OCCURED, ioe.getLocalizedMessage() ), xpp, ioe );
                 }
                 eventType = xpp.getEventType();
             }
@@ -276,7 +276,7 @@ public class Dsmlv2ResponseParser
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03037, ioe.getLocalizedMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03019_IO_EXCEPTION_OCCURED, ioe.getLocalizedMessage() ), xpp, ioe );
             }
         }
         while ( container.getState() != Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP );
diff --git a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/ParserUtils.java b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/ParserUtils.java
index ca89e4d..1980123 100644
--- a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/ParserUtils.java
+++ b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/ParserUtils.java
@@ -208,14 +208,14 @@ public final class ParserUtils
 
             if ( requestID < 0 )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03038, requestID ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03016_BELOW_0_REQUEST_ID, requestID ), xpp, null );
             }
 
             return requestID;
         }
         catch ( NumberFormatException nfe )
         {
-            throw new XmlPullParserException( I18n.err( I18n.ERR_03039 ), xpp, nfe );
+            throw new XmlPullParserException( I18n.err( I18n.ERR_03012_REQUEST_ID_NOT_INTEGER ), xpp, nfe );
         }
     }
 
@@ -291,7 +291,7 @@ public final class ParserUtils
 
         if ( batchRequest == null )
         {
-            throw new XmlPullParserException( I18n.err( I18n.ERR_03040 ), container.getParser(), null );
+            throw new XmlPullParserException( I18n.err( I18n.ERR_03003_UNABLE_TO_FIND_BATCH_REQUEST ), container.getParser(), null );
         }
 
         return ( batchRequest.getProcessing() == Processing.PARALLEL ) && ( batchRequest.getResponseOrder() == ResponseOrder.UNORDERED );
@@ -319,7 +319,7 @@ public final class ParserUtils
         {
             if ( LOG.isWarnEnabled() )
             {
-                LOG.warn( "Failed to create the XSLT transformer", e1 );
+                LOG.warn( I18n.msg( I18n.MSG_3000_FAILED_TO_CREATE_XSLT_TRANSFORMER ), e1 );
             }
             
             // return original document
diff --git a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AttributeValueAssertion.java b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AttributeValueAssertion.java
index 58d8db6..b6b50af 100644
--- a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AttributeValueAssertion.java
+++ b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AttributeValueAssertion.java
@@ -20,6 +20,7 @@
 package org.apache.directory.api.dsmlv2.request;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.codec.api.LdapCodecConstants;
 import org.apache.directory.api.ldap.model.entry.Value;
 import org.apache.directory.api.util.Strings;
@@ -185,7 +186,7 @@ public class AttributeValueAssertion
                 break;
 
             default:
-                throw new IllegalStateException( "Unexpected filter type " + filterType );
+                throw new IllegalStateException( I18n.err( I18n.ERR_03037_UNEXPECTED_FILTER_TYPE, filterType ) );
         }
 
         sb.append( dumpObject( assertionValue ) );
diff --git a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/Dsmlv2Grammar.java b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/Dsmlv2Grammar.java
index cf971e7..08dc01e 100644
--- a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/Dsmlv2Grammar.java
+++ b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/Dsmlv2Grammar.java
@@ -146,7 +146,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 else
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03013 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03013_UNKNOWN_PROCESSING_VALUE ), xpp, null );
                 }
             }
             else
@@ -169,7 +169,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 else
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03014 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03014_UNKNOWN_ON_ERROR_VALUE ), xpp, null );
                 }
             }
             else
@@ -192,7 +192,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 else
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03015 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03015_UNKNOWN_RESPONSE_ORDER_VALUE ), xpp, null );
                 }
             }
             else
@@ -231,7 +231,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             {
                 if ( ParserUtils.isRequestIdNeeded( container ) )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03016 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
                 }
             }
             
@@ -246,12 +246,12 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 catch ( NumberFormatException nfe )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03017 ), xpp, nfe );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03017_ABANDON_ID_NOT_INTEGER ), xpp, nfe );
                 }
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03018 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03018_ABANDON_ID_REQUIRED ), xpp, null );
             }
         }
     };
@@ -285,7 +285,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             {
                 if ( ParserUtils.isRequestIdNeeded( container ) )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03016 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
                 }
             }
             
@@ -300,12 +300,12 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 catch ( LdapInvalidDnException lide )
                 {
-                    throw new XmlPullParserException( lide.getMessage(), xpp, lide );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getMessage() ), xpp, lide );
                 }
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03019 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03001_DN_ATTRIBUTE_REQUIRED ), xpp, null );
             }
         }
     };
@@ -339,12 +339,12 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 catch ( LdapException le )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03020 ), xpp, le );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03020_CANT_ADD_ATTRIBUTE_VALUE ), xpp, le );
                 }
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03012 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
             }
         }
     };
@@ -394,7 +394,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
@@ -431,7 +431,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             {
                 if ( ParserUtils.isRequestIdNeeded( container ) )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03016 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
                 }
             }
             // principal
@@ -443,7 +443,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03021 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03021_PRINCIPAL_ATTRIBUTE_REQUIRED ), xpp, null );
             }
         }
     };
@@ -477,7 +477,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             {
                 if ( ParserUtils.isRequestIdNeeded( container ) )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03016 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
                 }
             }
 
@@ -492,12 +492,12 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 catch ( LdapInvalidDnException lide )
                 {
-                    throw new XmlPullParserException( lide.getMessage(), xpp, lide );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getMessage() ), xpp, lide );
                 }
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03019 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03001_DN_ATTRIBUTE_REQUIRED ), xpp, null );
             }
         }
     };
@@ -529,7 +529,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03012 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
             }
         }
     };
@@ -571,7 +571,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
@@ -605,7 +605,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             {
                 if ( ParserUtils.isRequestIdNeeded( container ) )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03016 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
                 }
             }
 
@@ -620,12 +620,12 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 catch ( LdapInvalidDnException lide )
                 {
-                    throw new XmlPullParserException( "" + lide.getMessage(), xpp, lide );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getMessage() ), xpp, lide );
                 }
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03019 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03001_DN_ATTRIBUTE_REQUIRED ), xpp, null );
             }
         }
     };
@@ -661,7 +661,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             {
                 if ( ParserUtils.isRequestIdNeeded( container ) )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03016 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
                 }
             }
         }
@@ -689,7 +689,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
 
                 if ( Strings.isEmpty( nextText ) )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03022 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03022_NULL_REQUEST_NAME ), xpp, null );
                 }
                 else
                 {
@@ -701,13 +701,13 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                     }
                     else
                     {
-                        throw new XmlPullParserException( "Bad oid : " + oid, xpp, null );
+                        throw new XmlPullParserException( I18n.err( I18n.ERR_03038_BAD_OID, oid ), xpp, null );
                     }
                 }
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
@@ -750,7 +750,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
@@ -784,7 +784,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             {
                 if ( ParserUtils.isRequestIdNeeded( container ) )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03016 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
                 }
             }
 
@@ -799,12 +799,12 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 catch ( LdapInvalidDnException lide )
                 {
-                    throw new XmlPullParserException( "" + lide.getMessage(), xpp, lide );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getMessage() ), xpp, lide );
                 }
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03019 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03001_DN_ATTRIBUTE_REQUIRED ), xpp, null );
             }
 
             // newrdn
@@ -818,12 +818,12 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 catch ( LdapInvalidDnException lide )
                 {
-                    throw new XmlPullParserException( "" + lide.getMessage(), xpp, lide );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getMessage() ), xpp, lide );
                 }
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03023 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03023_NEW_RDN_ATTRIBUTE_REQUESTED ), xpp, null );
             }
 
             // deleteoldrdn
@@ -841,7 +841,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 else
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03024 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03024_INCORRECT_DELETE_OLD_RDN_VALUE ), xpp, null );
                 }
             }
             else
@@ -860,7 +860,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 catch ( LdapInvalidDnException lide )
                 {
-                    throw new XmlPullParserException( "" + lide.getMessage(), xpp, lide );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getMessage() ), xpp, lide );
                 }
             }
         }
@@ -895,7 +895,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             {
                 if ( ParserUtils.isRequestIdNeeded( container ) )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03016 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
                 }
             }
 
@@ -910,12 +910,12 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 catch ( LdapInvalidDnException lide )
                 {
-                    throw new XmlPullParserException( "" + lide.getLocalizedMessage(), xpp, lide );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getLocalizedMessage() ), xpp, lide );
                 }
             }
             else
             {
-                throw new XmlPullParserException( "dn attribute is required", xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03001_DN_ATTRIBUTE_REQUIRED ), xpp, null );
             }
         }
     };
@@ -957,13 +957,12 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 else
                 {
-                    throw new XmlPullParserException(
-                        "unknown operation. Operation can be 'add', 'delete' or 'replace'.", xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03040_UNKNOWN_OPERATION ), xpp, null );
                 }
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03025 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03025_OPERATION_TTRIBUTE_REQUIRED ), xpp, null );
             }
 
             // name
@@ -975,7 +974,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03012 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
             }
         }
     };
@@ -1024,7 +1023,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
@@ -1058,7 +1057,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             {
                 if ( ParserUtils.isRequestIdNeeded( container ) )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03016 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
                 }
             }
 
@@ -1073,12 +1072,12 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 catch ( LdapInvalidDnException lide )
                 {
-                    throw new XmlPullParserException( lide.getMessage(), xpp, lide );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getMessage() ), xpp, lide );
                 }
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03019 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03001_DN_ATTRIBUTE_REQUIRED ), xpp, null );
             }
 
             // scope
@@ -1100,12 +1099,12 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 else
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03026 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03026_UNKNOWN_SCOPE ), xpp, null );
                 }
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03027 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03027_SCOPE_ATTRIBUTE_REQUIRED ), xpp, null );
             }
 
             // derefAliases
@@ -1131,12 +1130,12 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 else
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03028 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03028_UNKNOWN_DEREFALIAS_VALUE ), xpp, null );
                 }
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03029 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03029_DEREFALIA_ATTRIBUTE_REQUIRED ), xpp, null );
             }
 
             // sizeLimit
@@ -1150,7 +1149,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 catch ( NumberFormatException nfe )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03030 ), xpp, nfe );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03030_SIZE_LIMIT_NOT_INTEGER ), xpp, nfe );
                 }
             }
             else
@@ -1169,7 +1168,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 catch ( NumberFormatException nfe )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03031 ), xpp, nfe );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03031_TIME_LIMIT_NOT_INTEGER ), xpp, nfe );
                 }
             }
             else
@@ -1192,7 +1191,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 else
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03032 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03032_TYPES_ONLY_NOT_BOOLEAN ), xpp, null );
                 }
             }
             else
@@ -1227,7 +1226,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03012 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
             }
         }
     };
@@ -1273,7 +1272,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03012 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
             }
         }
     };
@@ -1320,7 +1319,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
@@ -1365,7 +1364,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
@@ -1411,7 +1410,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
@@ -1569,7 +1568,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03012 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
             }
 
             AttributeValueAssertionFilter filter = new AttributeValueAssertionFilter(
@@ -1618,7 +1617,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03012 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
             }
 
             AttributeValueAssertionFilter filter = new AttributeValueAssertionFilter(
@@ -1669,7 +1668,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03012 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
             }
 
             AttributeValueAssertionFilter filter = new AttributeValueAssertionFilter(
@@ -1718,7 +1717,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03012 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
             }
 
             AttributeValueAssertionFilter filter = new AttributeValueAssertionFilter(
@@ -1783,7 +1782,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
@@ -1827,7 +1826,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             else
             {
-                throw new XmlPullParserException( "name attribute is required", xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
             }
         }
     };
@@ -1854,7 +1853,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 
                 if ( exprNode == null )
                 {
-                    throw new IllegalStateException( "No filter element present in the DSML search request" );
+                    throw new IllegalStateException( I18n.err( I18n.ERR_03041_NO_FILTER_ELEMENT ) );
                 }
                 
                 searchRequest.setFilter( exprNode );
@@ -1891,7 +1890,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             catch ( DecoderException de )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03012 ), xpp, de );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, de );
             }
 
             searchRequestDecorator.setTerminalFilter( extensibleMatchFilter );
@@ -1913,7 +1912,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 else
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03033 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03033_DN_ATTRIBUTES_NOT_BOOLEAN ), xpp, null );
                 }
             }
             else
@@ -1978,7 +1977,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
@@ -2006,7 +2005,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             {
                 if ( !Oid.isOid( attributeValue ) )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03034 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03034_INCORRECT_TYPE_VALUE ), xpp, null );
                 }
 
                 control = codec.newControl( codec.newControl( attributeValue ) );
@@ -2014,7 +2013,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03035 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03035_TYPE_ATTRIBUTE_REQUIRED ), xpp, null );
             }
 
             // CRITICALITY
@@ -2032,7 +2031,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
                 }
                 else
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03007 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03007_INCORRECT_CRITICALITY_VALUE ), xpp, null );
                 }
             }
         }
@@ -2077,7 +2076,7 @@ public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
diff --git a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/SearchRequestDsml.java b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/SearchRequestDsml.java
index 450426a..be1fcfe 100644
--- a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/SearchRequestDsml.java
+++ b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/SearchRequestDsml.java
@@ -25,6 +25,7 @@ import java.util.List;
 
 import org.apache.directory.api.asn1.DecoderException;
 import org.apache.directory.api.dsmlv2.ParserUtils;
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.codec.api.LdapApiService;
 import org.apache.directory.api.ldap.codec.api.LdapCodecConstants;
 import org.apache.directory.api.ldap.model.entry.Value;
@@ -281,7 +282,7 @@ public class SearchRequestDsml
                             break;
 
                         default:
-                            throw new IllegalStateException( "Unexpected filter type " + filterType );
+                            throw new IllegalStateException( I18n.err( I18n.ERR_03042_UNEXPECTED_FILTER_TYPE, filterType ) );
                     }
 
                 }
@@ -408,7 +409,7 @@ public class SearchRequestDsml
                 break;
 
             default:
-                throw new IllegalStateException( "Unexpected deref alias mode " + derefAliases );
+                throw new IllegalStateException( I18n.err( I18n.ERR_03043_UNEXPECTED_DEREF_ALIAS, derefAliases ) );
         }
 
         // SizeLimit
diff --git a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/response/Dsmlv2ResponseGrammar.java b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/response/Dsmlv2ResponseGrammar.java
index 4c6d916..95444ed 100644
--- a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/response/Dsmlv2ResponseGrammar.java
+++ b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/response/Dsmlv2ResponseGrammar.java
@@ -556,12 +556,12 @@ public final class Dsmlv2ResponseGrammar extends AbstractGrammar implements Gram
                 }
                 else
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03004 ), xpp, null );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03004_UNKNOWN_TYPE ), xpp, null );
                 }
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03005 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03005_REQUIRE_ATTRIBUTE_TYPE ), xpp, null );
             }
         }
     };
@@ -780,12 +780,12 @@ public final class Dsmlv2ResponseGrammar extends AbstractGrammar implements Gram
                 }
                 catch ( NumberFormatException nfe )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03009 ), xpp, nfe );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03009_RESULT_CODE_NOT_INTEGER ), xpp, nfe );
                 }
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03010 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03010_CODE_ATTRIBUTE_REQUIRED ), xpp, null );
             }
 
             // descr
@@ -793,7 +793,7 @@ public final class Dsmlv2ResponseGrammar extends AbstractGrammar implements Gram
 
             if ( ( attributeValue != null ) && !DSMLV2_DESCR_TAGS.contains( attributeValue ) )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03011, attributeValue ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03011_DESCR_DOESNT_MATCH_VALUES, attributeValue ), xpp, null );
             }
         }
     };
@@ -839,7 +839,7 @@ public final class Dsmlv2ResponseGrammar extends AbstractGrammar implements Gram
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
@@ -900,7 +900,7 @@ public final class Dsmlv2ResponseGrammar extends AbstractGrammar implements Gram
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
@@ -1105,12 +1105,12 @@ public final class Dsmlv2ResponseGrammar extends AbstractGrammar implements Gram
                 }
                 catch ( LdapException le )
                 {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03012 ), xpp, le );
+                    throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, le );
                 }
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03012 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
             }
         }
     };
@@ -1159,7 +1159,7 @@ public final class Dsmlv2ResponseGrammar extends AbstractGrammar implements Gram
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
@@ -1195,7 +1195,7 @@ public final class Dsmlv2ResponseGrammar extends AbstractGrammar implements Gram
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
             catch ( LdapURLEncodingException luee )
             {
@@ -1247,7 +1247,7 @@ public final class Dsmlv2ResponseGrammar extends AbstractGrammar implements Gram
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
             catch ( DecoderException de )
             {
@@ -1291,7 +1291,7 @@ public final class Dsmlv2ResponseGrammar extends AbstractGrammar implements Gram
             }
             catch ( IOException ioe )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
             }
         }
     };
@@ -2084,7 +2084,7 @@ public final class Dsmlv2ResponseGrammar extends AbstractGrammar implements Gram
         }
         catch ( IOException ioe )
         {
-            throw new XmlPullParserException( I18n.err( I18n.ERR_03008, ioe.getMessage() ), xpp, ioe );
+            throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
         }
     }
     
@@ -2111,7 +2111,7 @@ public final class Dsmlv2ResponseGrammar extends AbstractGrammar implements Gram
         {
             if ( !Oid.isOid( attributeValue ) )
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03006 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03006_INCORRECT_TYPE_ATTRIBUTE_VALUE ), xpp, null );
             }
 
             control = container.getLdapCodecService().newControl( new OpaqueControl( attributeValue ) );
@@ -2119,7 +2119,7 @@ public final class Dsmlv2ResponseGrammar extends AbstractGrammar implements Gram
         }
         else
         {
-            throw new XmlPullParserException( I18n.err( I18n.ERR_03005 ), xpp, null );
+            throw new XmlPullParserException( I18n.err( I18n.ERR_03005_REQUIRE_ATTRIBUTE_TYPE ), xpp, null );
         }
         
         // CRITICALITY
@@ -2137,7 +2137,7 @@ public final class Dsmlv2ResponseGrammar extends AbstractGrammar implements Gram
             }
             else
             {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03007 ), xpp, null );
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03007_INCORRECT_CRITICALITY_VALUE ), xpp, null );
             }
         }
     }
diff --git a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/response/ErrorResponse.java b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/response/ErrorResponse.java
index 4977c54..22d69d4 100644
--- a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/response/ErrorResponse.java
+++ b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/response/ErrorResponse.java
@@ -21,6 +21,7 @@ package org.apache.directory.api.dsmlv2.response;
 
 
 import org.apache.directory.api.dsmlv2.DsmlDecorator;
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.codec.api.LdapApiService;
 import org.apache.directory.api.ldap.model.message.AbstractResponse;
 import org.apache.directory.api.ldap.model.message.MessageTypeEnum;
@@ -281,9 +282,7 @@ public class ErrorResponse extends AbstractResponse implements Response, DsmlDec
      */
     public LdapApiService getCodecService()
     {
-        throw new IllegalArgumentException( "This should not be a decorator "
-            + "but seems it was made into one. We need to do something about"
-            + "this if this exception is being raise." );
+        throw new IllegalArgumentException( I18n.err( I18n.ERR_03044_SHOULD_NOT_BE_A_DECORATOR ) );
     }
 
 
diff --git a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/response/SearchResponseDsml.java b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/response/SearchResponseDsml.java
index 8d32a56..6a9b307 100644
--- a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/response/SearchResponseDsml.java
+++ b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/response/SearchResponseDsml.java
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.directory.api.dsmlv2.DsmlDecorator;
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.codec.api.LdapApiService;
 import org.apache.directory.api.ldap.model.message.Message;
 import org.apache.directory.api.ldap.model.message.Response;
@@ -100,7 +101,7 @@ public class SearchResponseDsml extends AbstractResponseDsml<Response>
         }
         else
         {
-            throw new IllegalArgumentException( "Unidentified search resp type" );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_03045_UNIDENTIFIED_RESPONSE_TYPE ) );
         }
 
         return responses.add( response );
@@ -136,7 +137,7 @@ public class SearchResponseDsml extends AbstractResponseDsml<Response>
         }
         else
         {
-            throw new IllegalArgumentException( "Unidentified search resp type" );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_03045_UNIDENTIFIED_RESPONSE_TYPE ) );
         }
 
         return responses.remove( response );
diff --git a/i18n/src/main/java/org/apache/directory/api/i18n/I18n.java b/i18n/src/main/java/org/apache/directory/api/i18n/I18n.java
index b2bfb30..37cc126 100644
--- a/i18n/src/main/java/org/apache/directory/api/i18n/I18n.java
+++ b/i18n/src/main/java/org/apache/directory/api/i18n/I18n.java
@@ -84,43 +84,53 @@ public enum I18n
     ERR_02005_INTERNAL_ERROR( "ERR_02005_INTERNAL_ERROR" ),
     
     // dsml-parser
-    ERR_03004( "ERR_03004" ),
-    ERR_03005( "ERR_03005" ),
-    ERR_03006( "ERR_03006" ),
-    ERR_03007( "ERR_03007" ),
-    ERR_03008( "ERR_03008" ),
-    ERR_03009( "ERR_03009" ),
-    ERR_03010( "ERR_03010" ),
-    ERR_03011( "ERR_03011" ),
-    ERR_03012( "ERR_03012" ),
-    ERR_03013( "ERR_03013" ),
-    ERR_03014( "ERR_03014" ),
-    ERR_03015( "ERR_03015" ),
-    ERR_03016( "ERR_03016" ),
-    ERR_03017( "ERR_03017" ),
-    ERR_03018( "ERR_03018" ),
-    ERR_03019( "ERR_03019" ),
-    ERR_03020( "ERR_03020" ),
-    ERR_03021( "ERR_03021" ),
-    ERR_03022( "ERR_03022" ),
-    ERR_03023( "ERR_03023" ),
-    ERR_03024( "ERR_03024" ),
-    ERR_03025( "ERR_00025" ),
-    ERR_03026( "ERR_03026" ),
-    ERR_03027( "ERR_03027" ),
-    ERR_03028( "ERR_03028" ),
-    ERR_03029( "ERR_03029" ),
-    ERR_03030( "ERR_03030" ),
-    ERR_03031( "ERR_03031" ),
-    ERR_03032( "ERR_03032" ),
-    ERR_03033( "ERR_03033" ),
-    ERR_03034( "ERR_03034" ),
-    ERR_03035( "ERR_03035" ),
-    ERR_03036( "ERR_03036" ),
-    ERR_03037( "ERR_03037" ),
-    ERR_03038( "ERR_03038" ),
-    ERR_03039( "ERR_03039" ),
-    ERR_03040( "ERR_03040" ),
+    ERR_03000_REQUEST_ID_REQUIRED( "ERR_03000_REQUEST_ID_REQUIRED" ),
+    ERR_03001_DN_ATTRIBUTE_REQUIRED( "ERR_03001_DN_ATTRIBUTE_REQUIRED" ),
+    ERR_03002_NAME_ATTRIBUTE_REQUIRED( "ERR_03002_NAME_ATTRIBUTE_REQUIRED" ),
+    ERR_03003_UNABLE_TO_FIND_BATCH_REQUEST( "ERR_03003_UNABLE_TO_FIND_BATCH_REQUEST" ),
+    ERR_03004_UNKNOWN_TYPE( "ERR_03004_UNKNOWN_TYPE" ),
+    ERR_03005_REQUIRE_ATTRIBUTE_TYPE( "ERR_03005_REQUIRE_ATTRIBUTE_TYPE" ),
+    ERR_03006_INCORRECT_TYPE_ATTRIBUTE_VALUE( "ERR_03006_INCORRECT_TYPE_ATTRIBUTE_VALUE" ),
+    ERR_03007_INCORRECT_CRITICALITY_VALUE( "ERR_03007_INCORRECT_CRITICALITY_VALUE" ),
+    ERR_03008_UNEXPECTED_ERROR( "ERR_03008_UNEXPECTED_ERROR" ),
+    ERR_03009_RESULT_CODE_NOT_INTEGER( "ERR_03009_RESULT_CODE_NOT_INTEGER" ),
+    ERR_03010_CODE_ATTRIBUTE_REQUIRED( "ERR_03010_CODE_ATTRIBUTE_REQUIRED" ),
+    ERR_03011_DESCR_DOESNT_MATCH_VALUES( "ERR_03011_DESCR_DOESNT_MATCH_VALUES" ),
+    ERR_03012_REQUEST_ID_NOT_INTEGER( "ERR_03012_REQUEST_ID_NOT_INTEGER" ),
+    ERR_03013_UNKNOWN_PROCESSING_VALUE( "ERR_03013_UNKNOWN_PROCESSING_VALUE" ),
+    ERR_03014_UNKNOWN_ON_ERROR_VALUE( "ERR_03014_UNKNOWN_ON_ERROR_VALUE" ),
+    ERR_03015_UNKNOWN_RESPONSE_ORDER_VALUE( "ERR_03015_UNKNOWN_RESPONSE_ORDER_VALUE" ),
+    ERR_03016_BELOW_0_REQUEST_ID( "ERR_03016_BELOW_0_REQUEST_ID" ),
+    ERR_03017_ABANDON_ID_NOT_INTEGER( "ERR_03017_ABANDON_ID_NOT_INTEGER" ),
+    ERR_03018_ABANDON_ID_REQUIRED( "ERR_03018_ABANDON_ID_REQUIRED" ),
+    ERR_03019_IO_EXCEPTION_OCCURED( "ERR_03019_IO_EXCEPTION_OCCURED" ),
+    ERR_03020_CANT_ADD_ATTRIBUTE_VALUE( "ERR_03020_CANT_ADD_ATTRIBUTE_VALUE" ),
+    ERR_03021_PRINCIPAL_ATTRIBUTE_REQUIRED( "ERR_03021_PRINCIPAL_ATTRIBUTE_REQUIRED" ),
+    ERR_03022_NULL_REQUEST_NAME( "ERR_03022_NULL_REQUEST_NAME" ),
+    ERR_03023_NEW_RDN_ATTRIBUTE_REQUESTED( "ERR_03023_NEW_RDN_ATTRIBUTE_REQUESTED" ),
+    ERR_03024_INCORRECT_DELETE_OLD_RDN_VALUE( "ERR_03024_INCORRECT_DELETE_OLD_RDN_VALUE" ),
+    ERR_03025_OPERATION_TTRIBUTE_REQUIRED( "ERR_03025_OPERATION_TTRIBUTE_REQUIRED" ),
+    ERR_03026_UNKNOWN_SCOPE( "ERR_03026_UNKNOWN_SCOPE" ),
+    ERR_03027_SCOPE_ATTRIBUTE_REQUIRED( "ERR_03027_SCOPE_ATTRIBUTE_REQUIRED" ),
+    ERR_03028_UNKNOWN_DEREFALIAS_VALUE( "ERR_03028_UNKNOWN_DEREFALIAS_VALUE" ),
+    ERR_03029_DEREFALIA_ATTRIBUTE_REQUIRED( "ERR_03029_DEREFALIA_ATTRIBUTE_REQUIRED" ),
+    ERR_03030_SIZE_LIMIT_NOT_INTEGER( "ERR_03030_SIZE_LIMIT_NOT_INTEGER" ),
+    ERR_03031_TIME_LIMIT_NOT_INTEGER( "ERR_03031_TIME_LIMIT_NOT_INTEGER" ),
+    ERR_03032_TYPES_ONLY_NOT_BOOLEAN( "ERR_03032_TYPES_ONLY_NOT_BOOLEAN" ),
+    ERR_03033_DN_ATTRIBUTES_NOT_BOOLEAN( "ERR_03033_DN_ATTRIBUTES_NOT_BOOLEAN" ),
+    ERR_03034_INCORRECT_TYPE_VALUE( "ERR_03034_INCORRECT_TYPE_VALUE" ),
+    ERR_03035_TYPE_ATTRIBUTE_REQUIRED( "ERR_03035_TYPE_ATTRIBUTE_REQUIRED" ),
+    ERR_03036_MISSING_TAG( "ERR_03036_MISSING_TAG" ),
+    ERR_03037_UNEXPECTED_FILTER_TYPE( "ERR_03037_UNEXPECTED_FILTER_TYPE" ),
+    ERR_03038_BAD_OID( "ERR_03038_BAD_OID" ),
+    ERR_03039_PARSING_ERROR( "ERR_03039_PARSING_ERROR" ),
+    ERR_03040_UNKNOWN_OPERATION( "ERR_03040_UNKNOWN_OPERATION" ),
+    ERR_03041_NO_FILTER_ELEMENT( "ERR_03041_NO_FILTER_ELEMENT" ),
+    ERR_03042_UNEXPECTED_FILTER_TYPE( "ERR_03042_UNEXPECTED_FILTER_TYPE" ),
+    ERR_03043_UNEXPECTED_DEREF_ALIAS( "ERR_03043_UNEXPECTED_DEREF_ALIAS" ),
+    ERR_03044_SHOULD_NOT_BE_A_DECORATOR( "ERR_03044_SHOULD_NOT_BE_A_DECORATOR" ),
+    ERR_03045_UNIDENTIFIED_RESPONSE_TYPE( "ERR_03045_UNIDENTIFIED_RESPONSE_TYPE" ),
+
 
     // api-ldap-client-api   4000-4999
     // api-ldap-client-api <>            4000-4100
@@ -1025,6 +1035,9 @@ public enum I18n
     MSG_02001_FAILED_PROCESSING_REQUEST( "MSG_02001_FAILED_PROCESSING_REQUEST" ),
     MSG_02002_FAILED_TO_BIND( "MSG_02002_FAILED_TO_BIND" ),
     MSG_02003_ERROR( "MSG_02003_ERROR" ),
+    
+    // api-dsml-parser      3000-3999
+    MSG_3000_FAILED_TO_CREATE_XSLT_TRANSFORMER( "MSG_3000_FAILED_TO_CREATE_XSLT_TRANSFORMER" ),
 
     // api-ldap-client-api   4000-4999
     // api-ldap-client-api <>            4000-4100
diff --git a/i18n/src/main/resources/org/apache/directory/api/i18n/errors.properties b/i18n/src/main/resources/org/apache/directory/api/i18n/errors.properties
index 2ce83fa..d2aa4cd 100644
--- a/i18n/src/main/resources/org/apache/directory/api/i18n/errors.properties
+++ b/i18n/src/main/resources/org/apache/directory/api/i18n/errors.properties
@@ -72,44 +72,53 @@ ERR_02003_LINE_COLUMN={0} - Line {1} - Column {2}
 ERR_02004_MISSING_REQUEST_ID=A requestID must be specified to each request when Processing is Parallel and ReponseOrder is Unordered.
 ERR_02005_INTERNAL_ERROR=Internal Error: {0}
 
-# dsml-parser
-ERR_03004=Unknown type
-ERR_03005=type attribute is required
-ERR_03006=Incorrect value for ''type'' attribute. This is not an OID.
-ERR_03007=Incorrect value for ''criticality'' attribute
-ERR_03008=An unexpected error ocurred: {0}
-ERR_03009=the given resultCode is not an integer
-ERR_03010=code attribute is required
-ERR_03011=descr (''{0}'') doesn''t match with the possible values
-ERR_03012=name attribute is required
-ERR_03013=Unknown value for ''processing'' attribute.
-ERR_03014=Unknown value for ''onError'' attribute.
-ERR_03015=Unknown value for ''responseOrder'' attribute.
-ERR_03016=requestID attribute is required
-ERR_03017=the given abandonID is not an integer
-ERR_03018=abandonID attribute is required
-ERR_03019=dn attribute is required
-ERR_03020=can not add attribute value
-ERR_03021=principal attribute is required
-ERR_03022=The request name can''t be null
-ERR_03023=newrdn attribute is required
-ERR_03024=Incorrect value for ''deleteoldrdn'' attribute
-ERR_03025=operation attribute is required
-ERR_03026=unknown scope. Scope must be ''baseObject'', ''singleLevel'' or ''wholeSubtree''.
-ERR_03027=scope attribute is required
-ERR_03028=unknown derefAliases value. derefAliases must be ''neverDerefAliases'', ''derefInSearching'', ''derefFindingBaseObj'' or ''derefAlways''.
-ERR_03029=derefAliases attribute is required
-ERR_03030=the given sizeLimit is not an integer
-ERR_03031=the given timeLimit is not an integer
-ERR_03032=typesOnly must be a boolean (''true'' or ''false'').
-ERR_03033=dnAttributes must be a boolean (''true'' or ''false'').
-ERR_03034=Incorrect value for ''type'' attribute. This is not an OID.
-ERR_03035=type attribute is required
-ERR_03036=The tag {0} can''t be found at this position
-ERR_03037=An IOException occurred during parsing: {0}
-ERR_03038=The attribute requestID {0} can''t be below 0
-ERR_03039=the given requestID is not an integer
-ERR_03040=unable to find the batch request
+# dsml-parser   3000-3999
+ERR_03000_REQUEST_ID_REQUIRED=requestID attribute is required
+ERR_03001_DN_ATTRIBUTE_REQUIRED=dn attribute is required
+ERR_03002_NAME_ATTRIBUTE_REQUIRED=name attribute is required
+ERR_03003_UNABLE_TO_FIND_BATCH_REQUEST=unable to find the batch request
+ERR_03004_UNKNOWN_TYPE=Unknown type
+ERR_03005_REQUIRE_ATTRIBUTE_TYPE=type attribute is required
+ERR_03006_INCORRECT_TYPE_ATTRIBUTE_VALUE=Incorrect value for ''type'' attribute. This is not an OID.
+ERR_03007_INCORRECT_CRITICALITY_VALUE=Incorrect value for ''criticality'' attribute
+ERR_03008_UNEXPECTED_ERROR=An unexpected error ocurred: {0}
+ERR_03009_RESULT_CODE_NOT_INTEGER=the given resultCode is not an integer
+ERR_03010_CODE_ATTRIBUTE_REQUIRED=code attribute is required
+ERR_03011_DESCR_DOESNT_MATCH_VALUES=descr (''{0}'') doesn''t match with the possible values
+ERR_03012_REQUEST_ID_NOT_INTEGER=The given requestID is not an integer
+ERR_03013_UNKNOWN_PROCESSING_VALUE=Unknown value for ''processing'' attribute.
+ERR_03014_UNKNOWN_ON_ERROR_VALUE=Unknown value for ''onError'' attribute.
+ERR_03015_UNKNOWN_RESPONSE_ORDER_VALUE=Unknown value for ''responseOrder'' attribute.
+ERR_03016_BELOW_0_REQUEST_ID=The attribute requestID {0} can''t be below 0
+ERR_03017_ABANDON_ID_NOT_INTEGER=the given abandonID is not an integer
+ERR_03018_ABANDON_ID_REQUIRED=abandonID attribute is required
+ERR_03019_IO_EXCEPTION_OCCURED=An IOException occurred during parsing: {0}
+ERR_03020_CANT_ADD_ATTRIBUTE_VALUE=can not add attribute value
+ERR_03021_PRINCIPAL_ATTRIBUTE_REQUIRED=principal attribute is required
+ERR_03022_NULL_REQUEST_NAME=The request name can''t be null
+ERR_03023_NEW_RDN_ATTRIBUTE_REQUESTED=newrdn attribute is required
+ERR_03024_INCORRECT_DELETE_OLD_RDN_VALUE=Incorrect value for ''deleteoldrdn'' attribute
+ERR_03025_OPERATION_TTRIBUTE_REQUIRED=operation attribute is required
+ERR_03026_UNKNOWN_SCOPE=unknown scope. Scope must be ''baseObject'', ''singleLevel'' or ''wholeSubtree''.
+ERR_03027_SCOPE_ATTRIBUTE_REQUIRED=scope attribute is required
+ERR_03028_UNKNOWN_DEREFALIAS_VALUE=unknown derefAliases value. derefAliases must be ''neverDerefAliases'', ''derefInSearching'', ''derefFindingBaseObj'' or ''derefAlways''.
+ERR_03029_DEREFALIA_ATTRIBUTE_REQUIRED=derefAliases attribute is required
+ERR_03030_SIZE_LIMIT_NOT_INTEGER=the given sizeLimit is not an integer
+ERR_03031_TIME_LIMIT_NOT_INTEGER=the given timeLimit is not an integer
+ERR_03032_TYPES_ONLY_NOT_BOOLEAN=typesOnly must be a boolean (''true'' or ''false'').
+ERR_03033_DN_ATTRIBUTES_NOT_BOOLEAN=dnAttributes must be a boolean (''true'' or ''false'').
+ERR_03034_INCORRECT_TYPE_VALUE=Incorrect value for ''type'' attribute. This is not an OID.
+ERR_03035_TYPE_ATTRIBUTE_REQUIRED=type attribute is required
+ERR_03036_MISSING_TAG=The tag {0} can''t be found at this position
+ERR_03037_UNEXPECTED_FILTER_TYPE=Unexpected filter type {0}
+ERR_03038_BAD_OID=Bad oid: {0}
+ERR_03039_PARSING_ERROR={0}
+ERR_03040_UNKNOWN_OPERATION=Unknown operation. Operation can be ''add'', ''delete'' or ''replace''.
+ERR_03041_NO_FILTER_ELEMENT=No filter element present in the DSML search request
+ERR_03042_UNEXPECTED_FILTER_TYPE=Unexpected filter type {0}
+ERR_03043_UNEXPECTED_DEREF_ALIAS=Unexpected deref alias mode {0}
+ERR_03044_SHOULD_NOT_BE_A_DECORATOR=This should not be a decorator, but seems it was made into one.\n  We need to do something about this if this exception is being raise.
+ERR_03045_UNIDENTIFIED_RESPONSE_TYPE=Unidentified search resp type
 
 # dsml-parser
 
diff --git a/i18n/src/main/resources/org/apache/directory/api/i18n/messages.properties b/i18n/src/main/resources/org/apache/directory/api/i18n/messages.properties
index 1ed2aef..1aba719 100644
--- a/i18n/src/main/resources/org/apache/directory/api/i18n/messages.properties
+++ b/i18n/src/main/resources/org/apache/directory/api/i18n/messages.properties
@@ -57,6 +57,9 @@ MSG_02001_FAILED_PROCESSING_REQUEST=Failed to process request
 MSG_02002_FAILED_TO_BIND=Failed to bind
 MSG_02003_ERROR=Error: {0}
 
+# dsml-parser 3000-3999
+MSG_3000_FAILED_TO_CREATE_XSLT_TRANSFORMER=Failed to create the XSLT transformer
+
 # api-ldap-client-api   4000-4999
 # api-ldap-client-api <>            4000-4100
 # api-ldap-client-api api           4100-4200