Changeset 3

Show
Ignore:
Timestamp:
08/25/06 20:33:18 (2 years ago)
Author:
schst
Message:

Fixed parse errors

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/XJConf/ext/xinc/XInclude.php

    r2 r3  
    66/** 
    77 * Very basic xInclude mechanism 
    8  *  
     8 * 
    99 * @author Stephan Schmidt <stephan.schmidt@schlund.de> 
    1010 */ 
     
    1717    /** 
    1818     * Namespace of the extension 
    19      *  
     19     * 
    2020     * @var  string 
    2121     */ 
     
    2323 
    2424    /** 
    25      * Get the namspace URI  
    26      *  
     25     * Get the namspace URI 
     26     * 
    2727     * @return  string 
    2828     */ 
     
    3434    /** 
    3535     * Handle an opening tag. 
    36      *  
     36     * 
    3737     * Currently this does not do anything. 
    38      *  
     38     * 
    3939     * Future versions should check, whether the file exists and skip all 
    4040     * child elements. 
    41      *  
     41     * 
    4242     * @param  XmlParser  $parser 
    4343     * @param  Tag        $tag 
     
    5050    /** 
    5151     * Handle a closing tag. 
    52      *  
     52     * 
    5353     * Does the actual x-include. 
    54      *  
     54     * 
    5555     * @param   XmlParser  $parser 
    5656     * @param   Tag        $tag 
     
    6464            throw new UnknownTagException('Unknown tag <' + $tag->getName() . '> in XInclude namespace.'); 
    6565        } 
    66          
     66 
    6767        $href = $tag->getAttribute('href'); 
    6868        if (null == $href) { 
    6969            return null; 
    7070        } 
    71          
     71 
    7272        if (substr($href, 0, 1) != '/') { 
    7373            $href = dirname($reader->getCurrentFile()) . '/' . $href; 
    7474        } 
    75          
     75 
    7676        try { 
    77             reader.parse($href); 
     77            $reader->parse($href); 
    7878            return null; 
    7979        } catch (Exception $e) { 
    80             throw new XIncludeException('Could not xInclude ' . href . ': ' . $e->getMessage()); 
    81         }               
     80            throw new XIncludeException('Could not xInclude ' . $href . ': ' . $e->getMessage()); 
     81        } 
    8282    } 
    8383}