Node
* and Property
.
*
* @author Markus Nix NamespaceException
.
*
* On the other hand, taking a prefix that is already assigned to a URI and re-assigning it to a new URI
* in effect unregisters that URI. Therefore, the same restrictions apply to this operation as to
* NamespaceRegistry.unregisterNamespace
:
*
jcr
, nt
, mix
,
* sv
) to a new URI will throw a NamespaceException
.
* NAME
or PATH
property)
* will throw a NamespaceException
. This includes prefixes in use within in-content node type definitions.
* xml
". These prefixes are reserved by the
* XML specification.
* NamespaceException
.
* UnsupportedRepositoryOperationException
.
*
* A RepositoryException
is thrown if another error occurs.
*
* @param prefix The prefix to be mapped.
* @param uri The URI to be mapped.
* @throws NamespaceException if an illegal attempt is made to register a mapping.
* @throws UnsupportedRepositoryOperationException in a level 1 implementation
* @throws RepositoryException if another error occurs.
*/
public function registerNamespace( $prefix, $uri );
/**
* Removes a namespace mapping from the registry. The following restriction apply:
* jcr
, nt
,
* mix
, sv
) will throw a NamespaceException
.
* NAME
or PATH
property)
* will throw a NamespaceException
. This includes prefixes in use within in-content node type
* definitions.
* NamespaceException
.
* NamespaceException
.
* UnsupportedRepositoryOperationException
.
*
* A RepositoryException
is thrown if another error occurs.
*
* @param prefix The prefix of the mapping to be removed.
* @throws NamespaceException if an illegal attempt is made to remove a mapping.
* @throws UnsupportedRepositoryOperationException in a level 1 implementation
* @throws RepositoryException if another error occurs.
*/
public function unregisterNamespace( $prefix );
/**
* Returns an array holding all currently registered prefixes.
* @return a string array
* @throws RepositoryException if an error occurs.
*/
public function getPrefixes();
/**
* Returns an array holding all currently registered URIs.
* @return a string array
* @throws RepositoryException if an error occurs.
*/
public function getURIs();
/**
* Returns the URI to which the given prefix is mapped.
* @param prefix a string
* @return a string
* @throws NamespaceException if the prefix is unknown.
* @throws RepositoryException is another error occurs
*/
public function getURI( $prefix );
/**
* Returns the prefix to which the given URI is mapped
*
* @param uri a string
* @return a string
* @throws NamespaceException if the URI is unknown.
* @throws RepositoryException is another error occurs
*/
public function getPrefix( $uri );
}
?>