public final void startPrefixMappingPrivate(String prefix, String uri) throws SAXException { if (uri.equals(lookupUri(prefix))) { return; } stack.getFirst().mappings.add(new PrefixMapping(uri, prefix)); }
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); }
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); }
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); }
public final void startPrefixMappingPrivate(String prefix, String uri) throws SAXException { if (uri.equals(lookupUri(prefix))) { return; } stack.getFirst().mappings.add(new PrefixMapping(uri, prefix)); }
public final void startPrefixMappingPrivate(String prefix, String uri) throws SAXException { if (uri.equals(lookupUri(prefix))) { return; } stack.getFirst().mappings.add(new PrefixMapping(uri, prefix)); }