Class ContextProviderImpl

  • All Implemented Interfaces:
    SerializationContext, org.relaxng.datatype.ValidationContext

    public final class ContextProviderImpl
    extends java.lang.Object
    implements org.relaxng.datatype.ValidationContext, SerializationContext
    dummy implementation of ValidationContextProvider.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.w3c.dom.Element element  
      static java.lang.String XMLNS_URI  
    • Constructor Summary

      Constructors 
      Constructor Description
      ContextProviderImpl​(org.w3c.dom.Element parent)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected static java.lang.String findPredeclaredPrefix​(org.w3c.dom.Element e, java.lang.String uri)
      finds a prefix for this URI.
      java.lang.String getBaseUri()  
      java.lang.String getNamespacePrefix​(java.lang.String uri)
      get namespace prefix for the given namespace URI.
      boolean isNotation​(java.lang.String name)  
      boolean isUnparsedEntity​(java.lang.String name)  
      java.lang.String resolveNamespacePrefix​(java.lang.String prefix)  
      protected static java.lang.String resolvePrefix​(org.w3c.dom.Element e, java.lang.String prefix)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • element

        protected final org.w3c.dom.Element element
    • Constructor Detail

      • ContextProviderImpl

        public ContextProviderImpl​(org.w3c.dom.Element parent)
    • Method Detail

      • getNamespacePrefix

        public java.lang.String getNamespacePrefix​(java.lang.String uri)
        Description copied from interface: SerializationContext
        get namespace prefix for the given namespace URI. this method is used to convert QName. It is a responsibility of the callee to ensure that the returned prefix is properly declared.
        Specified by:
        getNamespacePrefix in interface SerializationContext
        Returns:
        prefix for this namespace URI. return null to indicate that this namespace URI is the default name space. In this case, QNames are converted into unqualified names (just the local names only as NCNames).
      • resolveNamespacePrefix

        public java.lang.String resolveNamespacePrefix​(java.lang.String prefix)
        Specified by:
        resolveNamespacePrefix in interface org.relaxng.datatype.ValidationContext
      • isUnparsedEntity

        public boolean isUnparsedEntity​(java.lang.String name)
        Specified by:
        isUnparsedEntity in interface org.relaxng.datatype.ValidationContext
      • isNotation

        public boolean isNotation​(java.lang.String name)
        Specified by:
        isNotation in interface org.relaxng.datatype.ValidationContext
      • getBaseUri

        public java.lang.String getBaseUri()
        Specified by:
        getBaseUri in interface org.relaxng.datatype.ValidationContext
      • findPredeclaredPrefix

        protected static java.lang.String findPredeclaredPrefix​(org.w3c.dom.Element e,
                                                                java.lang.String uri)
        finds a prefix for this URI. If no prefix is declared for this URI, returns null.
      • resolvePrefix

        protected static java.lang.String resolvePrefix​(org.w3c.dom.Element e,
                                                        java.lang.String prefix)