@@ -113,12 +113,13 @@ public static function loadXML($dom, $xml)
113113     * @param string|DOMDocument $xml The XML string or document which should be validated. 
114114     * @param string $schema The schema filename which should be used. 
115115     * @param bool $debug To disable/enable the debug mode 
116+      * @param string $schemaPath Change schema path 
116117     * 
117118     * @return string|DOMDocument $dom  string that explains the problem or the DOMDocument 
118119     * 
119120     * @throws Exception 
120121     */ 
121-     public  static  function  validateXML ($ xml$ schema$ debugfalse )
122+     public  static  function  validateXML ($ xml$ schema$ debugfalse ,  $ schemaPath  =  null )
122123    {
123124        assert ('is_string($xml) || $xml instanceof DOMDocument ' );
124125        assert ('is_string($schema) ' );
@@ -136,7 +137,12 @@ public static function validateXML($xml, $schema, $debug = false)
136137            }
137138        }
138139
139-         $ schemaFile__DIR__ .'/schemas/ '  . $ schema
140+         if  (isset ($ schemaPath
141+             $ schemaFile$ schemaPath$ schema
142+         } else  {
143+             $ schemaFile__DIR__  . '/schemas/ '  . $ schema
144+         }
145+ 
140146        $ oldEntityLoaderlibxml_disable_entity_loader (false );
141147        $ res$ domschemaValidate ($ schemaFile
142148        libxml_disable_entity_loader ($ oldEntityLoader
@@ -626,7 +632,7 @@ public static function getSelfRoutedURLNoQuery()
626632        if  (!empty ($ _SERVER 'REQUEST_URI ' ])) {
627633            $ route$ _SERVER 'REQUEST_URI ' ];
628634            if  (!empty ($ _SERVER 'QUERY_STRING ' ])) {
629-                 $ routeself ::str_lreplace ($ _SERVER 'QUERY_STRING ' ], '' , $ route
635+                 $ routeself ::strLreplace ($ _SERVER 'QUERY_STRING ' ], '' , $ route
630636                if  (substr ($ route1 ) == '? ' ) {
631637                    $ routesubstr ($ route0 , -1 );
632638                }
@@ -648,7 +654,7 @@ public static function getSelfRoutedURLNoQuery()
648654        return  $ selfRoutedURLNoQuery
649655    }
650656
651-     public  static  function  str_lreplace ($ search$ replace$ subject
657+     public  static  function  strLreplace ($ search$ replace$ subject
652658    {
653659        $ posstrrpos ($ subject$ search
654660
0 commit comments