Search Results

Search found 2 results on 1 pages for 'namepsaces'.

Page 1/1 | 1 

  • Good reasons to migrate PHP libraries to namespaces

    - by Joseph Mastey
    I have a significant number of object libraries written for PHP 5.2.5, and I'm trying to weigh the benefits of retrofitting them for namespaces. I don't have any concerns about the server PHP version at the moment, since any relevant machines are under my control, so I'm not worried about backwards compatibility. As far as the structure of the libraries, I use the same convention as Zend Framework, (Library_Module_Class_Name e.g.) so I don't currently have any naming conflicts internal to the libraries. I'd anticipate moving the Library and Module parts of those classnames to namespaces. That said, if the code is already written, is there any good reason to move over to namespaces? Thanks, Joe

    Read the article

  • NamespaceContext and using namespaces with XPath

    - by Jherico
    Resolving an xpath that includes namepsaces in Java appears to require the use of a NamespaceContext object, mapping prefixes to namespace urls and vice versa. But I can find no mechanism for getting a NamespaceContext other than implementing it myself. This seems counter-intuitive. Is there any easy way to acquire a NamespaceContext from a document, or to create one, or failing that, to forgo prefixes altogether and specify the xpath with fully qualified names?

    Read the article

1