org.vectomatic.dom.svg.utils
Class SVGPrefixResolver

java.lang.Object
  extended by org.vectomatic.dom.svg.utils.SVGPrefixResolver
All Implemented Interfaces:
XPathPrefixResolver

public class SVGPrefixResolver
extends Object
implements XPathPrefixResolver

Default implementation of the XPathPrefixResolver. It is capable of solving the commonly used 'svg' and 'xlink' prefixes.

Author:
laaglu

Field Summary
static SVGPrefixResolver INSTANCE
           
protected  Map<String,String> prefixToUri
           
 
Constructor Summary
SVGPrefixResolver()
          Constructor
 
Method Summary
 String resolvePrefix(String prefix)
          Returns the namespace URI which corresponds to this prefix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final SVGPrefixResolver INSTANCE

prefixToUri

protected Map<String,String> prefixToUri
Constructor Detail

SVGPrefixResolver

public SVGPrefixResolver()
Constructor

Method Detail

resolvePrefix

public String resolvePrefix(String prefix)
Description copied from interface: XPathPrefixResolver
Returns the namespace URI which corresponds to this prefix. This method is called by the browser XPath engine when it evaluates XPath expressions which contain prefixes (like: /foo:bar/foo:boo)

Specified by:
resolvePrefix in interface XPathPrefixResolver
Parameters:
prefix - The prefix to resolve
Returns:
The namespace URI which corresponds to this prefix


Copyright © 2012. All Rights Reserved.