Tabnine Logo
XmlSerializer$PrefixMapping
Code IndexAdd Tabnine to your IDE (free)

How to use
XmlSerializer$PrefixMapping
in
nu.validator.htmlparser.sax

Best Java code snippets using nu.validator.htmlparser.sax.XmlSerializer$PrefixMapping (Showing top 6 results out of 315)

origin: validator/htmlparser

public final void startPrefixMappingPrivate(String prefix, String uri)
    throws SAXException {
  if (uri.equals(lookupUri(prefix))) {
    return;
  }
  stack.getFirst().mappings.add(new PrefixMapping(uri, prefix));
}
origin: nu.validator.htmlparser/htmlparser

public final void startPrefixMapping(String prefix, String uri)
    throws SAXException {
  if (prefix.length() == 0 || uri.equals(lookupUri(prefix))) {
    return;
  }
  if (uri.equals(lookupUri(prefix))) {
    return;
  }
  if ("http://www.w3.org/XML/1998/namespace".equals(uri)) {
    if ("xml".equals(prefix)) {
      return;
    } else {
      throw new SAXException("Attempt to declare a reserved NS uri.");
    }
  }
  if ("http://www.w3.org/2000/xmlns/".equals(uri)) {
    throw new SAXException("Attempt to declare a reserved NS uri.");
  }
  if (uri.length() == 0 && prefix.length() != 0) {
    throw new SAXException("Can bind a prefix to no namespace.");           
  }
  checkNCName(prefix);
  Set<PrefixMapping> theSet = stack.getFirst().mappings;
  PrefixMapping mapping = new PrefixMapping(uri, prefix);
  if (theSet.contains(mapping)) {
    throw new SAXException(
        "Attempt to map one prefix to two URIs on one element.");
  }
  theSet.add(mapping);
}
origin: validator/htmlparser

public final void startPrefixMapping(String prefix, String uri)
    throws SAXException {
  if (prefix.length() == 0 || uri.equals(lookupUri(prefix))) {
    return;
  }
  if (uri.equals(lookupUri(prefix))) {
    return;
  }
  if ("http://www.w3.org/XML/1998/namespace".equals(uri)) {
    if ("xml".equals(prefix)) {
      return;
    } else {
      throw new SAXException("Attempt to declare a reserved NS uri.");
    }
  }
  if ("http://www.w3.org/2000/xmlns/".equals(uri)) {
    throw new SAXException("Attempt to declare a reserved NS uri.");
  }
  if (uri.length() == 0 && prefix.length() != 0) {
    throw new SAXException("Can bind a prefix to no namespace.");           
  }
  checkNCName(prefix);
  Set<PrefixMapping> theSet = stack.getFirst().mappings;
  PrefixMapping mapping = new PrefixMapping(uri, prefix);
  if (theSet.contains(mapping)) {
    throw new SAXException(
        "Attempt to map one prefix to two URIs on one element.");
  }
  theSet.add(mapping);
}
origin: nu.validator/htmlparser

public final void startPrefixMapping(String prefix, String uri)
    throws SAXException {
  if (prefix.length() == 0 || uri.equals(lookupUri(prefix))) {
    return;
  }
  if (uri.equals(lookupUri(prefix))) {
    return;
  }
  if ("http://www.w3.org/XML/1998/namespace".equals(uri)) {
    if ("xml".equals(prefix)) {
      return;
    } else {
      throw new SAXException("Attempt to declare a reserved NS uri.");
    }
  }
  if ("http://www.w3.org/2000/xmlns/".equals(uri)) {
    throw new SAXException("Attempt to declare a reserved NS uri.");
  }
  if (uri.length() == 0 && prefix.length() != 0) {
    throw new SAXException("Can bind a prefix to no namespace.");           
  }
  checkNCName(prefix);
  Set<PrefixMapping> theSet = stack.getFirst().mappings;
  PrefixMapping mapping = new PrefixMapping(uri, prefix);
  if (theSet.contains(mapping)) {
    throw new SAXException(
        "Attempt to map one prefix to two URIs on one element.");
  }
  theSet.add(mapping);
}
origin: nu.validator/htmlparser

public final void startPrefixMappingPrivate(String prefix, String uri)
    throws SAXException {
  if (uri.equals(lookupUri(prefix))) {
    return;
  }
  stack.getFirst().mappings.add(new PrefixMapping(uri, prefix));
}
origin: nu.validator.htmlparser/htmlparser

public final void startPrefixMappingPrivate(String prefix, String uri)
    throws SAXException {
  if (uri.equals(lookupUri(prefix))) {
    return;
  }
  stack.getFirst().mappings.add(new PrefixMapping(uri, prefix));
}
nu.validator.htmlparser.saxXmlSerializer$PrefixMapping

Most used methods

  • <init>

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setContentView (Activity)
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now