Index: kernel/classes/datatypes/ezxmltext/ezxmloutputhandler.php
===================================================================
--- kernel/classes/datatypes/ezxmltext/ezxmloutputhandler.php	(revision 24108)
+++ kernel/classes/datatypes/ezxmltext/ezxmloutputhandler.php	(working copy)
@@ -48,7 +48,6 @@
     {
         $this->XMLData = $xmlData;
         $this->AliasedHandler = null;
-        // use of $aliasedType is deprecated as of 4.1 and setting is ignored in aliased_handler
         $this->AliasedType = $aliasedType;
 
         if ( is_object( $contentObjectAttribute ) )
@@ -102,7 +101,6 @@
             } break;
             case 'aliased_type':
             {
-                eZDebug::writeWarning( "'aliased_type' is deprecated as of 4.1 and not in use anymore, meaning it will always return false.", __METHOD__ );
                 return $this->AliasedType;
             } break;
             case 'view_template_name':
Index: kernel/classes/datatypes/ezxmltext/ezxmltext.php
===================================================================
--- kernel/classes/datatypes/ezxmltext/ezxmltext.php	(revision 24108)
+++ kernel/classes/datatypes/ezxmltext/ezxmltext.php	(working copy)
@@ -86,11 +86,11 @@
 
             case 'pdf_output' :
             {
-                if ( $this->XMLOutputHandler === null )
+                if ( $this->PDFOutputHandler === null )
                 {
-                    $this->XMLOutputHandler = $this->outputHandler( $this->XMLData, 'ezpdf', true, $this->ContentObjectAttribute );
+                    $this->PDFOutputHandler = $this->outputHandler( $this->XMLData, 'ezpdf', true, $this->ContentObjectAttribute );
                 }
-                return $this->XMLOutputHandler;
+                return $this->PDFOutputHandler;
             }break;
 
             case 'xml_data' :
@@ -136,9 +136,10 @@
                               'iniVariable'   => 'HandlerClass',
                               'callMethod'    => 'isValid',
                               'handlerParams' => array( $xmlData,
-                                                        false,
+                                                        $type,
                                                         $contentObjectAttribute ),
-                              'aliasVariable' => ( $useAlias ? 'AliasClasses' : null ) );
+                              'aliasVariable' => ( $useAlias ? 'AliasClasses' : null ),
+                              'aliasOptionalIndex' => ( $type ? $type : null ) );
 
         $options = new ezpExtensionOptions( $optionArray );
 
@@ -159,9 +160,10 @@
                               'iniVariable'   => 'HandlerClass',
                               'callMethod'    => 'isValid',
                               'handlerParams' => array( $xmlData,
-                                                        false,
+                                                        $type,
                                                         $contentObjectAttribute ),
-                              'aliasVariable' => ( $useAlias ? 'AliasClasses' : null )  );
+                              'aliasVariable' => ( $useAlias ? 'AliasClasses' : null ),
+                              'aliasOptionalIndex' => ( $type ? $type : null ) );
 
         $options = new ezpExtensionOptions( $optionArray );
 
Index: kernel/private/options/ezpextensionoptions.php
===================================================================
--- kernel/private/options/ezpextensionoptions.php	(revision 24108)
+++ kernel/private/options/ezpextensionoptions.php	(working copy)
@@ -40,6 +40,9 @@
  *
  * @property string $aliasVariable
  *      Default : null
+ *      
+  * @property string $aliasOptionalIndex
+ *      Default : null
  *
  * @throws ezcBasePropertyNotFoundException
  *         If $options contains an undefined property
@@ -63,6 +66,7 @@
         $this->handlerParams  = null;
         $this->aliasSection   = null;
         $this->aliasVariable  = null;
+        $this->aliasOptionalIndex = null;
 
         parent::__construct( $options );
     }
@@ -85,6 +89,7 @@
             case 'callMethod':
             case 'aliasSection':
             case 'aliasVariable':
+            case 'aliasOptionalIndex':
                 if( $value !== null and !is_string( $value ) )
                 {
                     throw new ezcBaseValueException( $name, $value );
Index: lib/ezutils/classes/ezextension.php
===================================================================
--- lib/ezutils/classes/ezextension.php	(revision 24108)
+++ lib/ezutils/classes/ezextension.php	(working copy)
@@ -399,6 +399,7 @@
         $handlerParams = $options->handlerParams;
         $aliasSection  = $options->aliasSection;
         $aliasVariable = $options->aliasVariable;
+        $aliasOptionalIndex = $options->aliasOptionalIndex;
 
         $ini = eZINI::instance( $iniFile );
 
@@ -426,7 +427,11 @@
                 $aliasSection = $iniSection;
             }
             $aliasHandlers = $ini->variable( $aliasSection, $aliasVariable );
-            if ( is_array( $aliasHandlers ) && isset( $aliasHandlers[ $handlers ] ) )
+            if ( $aliasOptionalIndex !== null && isset( $aliasHandlers[ $aliasOptionalIndex ] ) )
+            {
+                $handlers = array( $aliasHandlers[ $aliasOptionalIndex ], $handlers );
+            }
+            else if ( isset( $aliasHandlers[ $handlers ] ) )
             {
                 $handlers = array( $aliasHandlers[ $handlers ], $handlers );
             }
Index: settings/ezxml.ini
===================================================================
--- settings/ezxml.ini	(revision 24108)
+++ settings/ezxml.ini	(working copy)
@@ -33,6 +33,7 @@
 HandlerClass=eZXHTMLXMLOutput
 # HandlerClass=eZPlainXMLOutput
 AliasClasses[]
+AliasClasses[ezpdf]=eZPDFXMLOutput
 # AliasClasses[eZXHTMLXMLOutput]=eZPlainXMLOutput
 
 [TagSettings]
