/** * Returns the extension description for the namespace URI and local name for * the XML element based on the extension point in the extension profile. * * @param extProfile extension profile * @param extPoint extension point to use from the extension profile * @param namespaceUri namespace URI of the XML element * @param localName name of the XML element */ protected ExtensionDescription getExtensionDescription( ExtensionProfile extProfile, Class<? extends ExtensionPoint> extPoint, String namespaceUri, String localName) { // find the extension manifest ExtensionManifest profManifest = getManifest(extProfile, extPoint); if (profManifest == null) { return null; } // look for an explicit match of the namespace URI and local name ExtensionDescription extDescription = profManifest.supportedExtensions.get(Pair.of(namespaceUri, localName)); // look for a match of the namespace URI with a wildcard local name if (extDescription == null) { extDescription = profManifest.supportedExtensions.get(Pair.of(namespaceUri, "*")); } return extDescription; }
/** * Returns the extension description for the namespace URI and local name for * the XML element based on the extension point in the extension profile. * * @param extProfile extension profile * @param extPoint extension point to use from the extension profile * @param namespaceUri namespace URI of the XML element * @param localName name of the XML element */ protected ExtensionDescription getExtensionDescription( ExtensionProfile extProfile, Class<? extends ExtensionPoint> extPoint, String namespaceUri, String localName) { // find the extension manifest ExtensionManifest profManifest = getManifest(extProfile, extPoint); if (profManifest == null) { return null; } // look for an explicit match of the namespace URI and local name ExtensionDescription extDescription = profManifest.supportedExtensions.get(Pair.of(namespaceUri, localName)); // look for a match of the namespace URI with a wildcard local name if (extDescription == null) { extDescription = profManifest.supportedExtensions.get(Pair.of(namespaceUri, "*")); } return extDescription; }
/** * Returns the extension description for the namespace URI and local name for * the XML element based on the extension point in the extension profile. * * @param extProfile extension profile * @param extPoint extension point to use from the extension profile * @param namespaceUri namespace URI of the XML element * @param localName name of the XML element */ protected ExtensionDescription getExtensionDescription( ExtensionProfile extProfile, Class<? extends ExtensionPoint> extPoint, String namespaceUri, String localName) { // find the extension manifest ExtensionManifest profManifest = getManifest(extProfile, extPoint); if (profManifest == null) { return null; } // look for an explicit match of the namespace URI and local name ExtensionDescription extDescription = profManifest.supportedExtensions.get(Pair.of(namespaceUri, localName)); // look for a match of the namespace URI with a wildcard local name if (extDescription == null) { extDescription = profManifest.supportedExtensions.get(Pair.of(namespaceUri, "*")); } return extDescription; }
/** * Initializes parser handler's XML blob state. Should be called by the * handler's constructor in order to honor * {@link ExtensionProfile#declareArbitraryXmlExtension(Class)}. */ protected void initializeArbitraryXml(ExtensionProfile profile, Class<? extends ExtensionPoint> extPoint, ElementHandler handler) { boolean arbitraryXml = profile.allowsArbitraryXml(); boolean mixedContent = false; ExtensionManifest profManifest = getManifest(profile, extPoint); if (profManifest != null) { if (profManifest.arbitraryXml) { arbitraryXml = profManifest.arbitraryXml; // mixedContent is only enabled if the profile manifest is present, and // supports mixed content, regardless of if the profile allows // arbitrary xml. mixedContent = profManifest.mixedContent; } } if (arbitraryXml) { handler.initializeXmlBlob( xmlBlob, mixedContent, /* fullTextIndex */false); } }
/** * Initializes parser handler's XML blob state. Should be called by the * handler's constructor in order to honor * {@link ExtensionProfile#declareArbitraryXmlExtension(Class)}. */ protected void initializeArbitraryXml(ExtensionProfile profile, Class<? extends ExtensionPoint> extPoint, ElementHandler handler) { boolean arbitraryXml = profile.allowsArbitraryXml(); boolean mixedContent = false; ExtensionManifest profManifest = getManifest(profile, extPoint); if (profManifest != null) { if (profManifest.arbitraryXml) { arbitraryXml = profManifest.arbitraryXml; // mixedContent is only enabled if the profile manifest is present, and // supports mixed content, regardless of if the profile allows // arbitrary xml. mixedContent = profManifest.mixedContent; } } if (arbitraryXml) { handler.initializeXmlBlob( xmlBlob, mixedContent, /* fullTextIndex */false); } }
/** * Initializes parser handler's XML blob state. Should be called by the * handler's constructor in order to honor * {@link ExtensionProfile#declareArbitraryXmlExtension(Class)}. */ protected void initializeArbitraryXml(ExtensionProfile profile, Class<? extends ExtensionPoint> extPoint, ElementHandler handler) { boolean arbitraryXml = profile.allowsArbitraryXml(); boolean mixedContent = false; ExtensionManifest profManifest = getManifest(profile, extPoint); if (profManifest != null) { if (profManifest.arbitraryXml) { arbitraryXml = profManifest.arbitraryXml; // mixedContent is only enabled if the profile manifest is present, and // supports mixed content, regardless of if the profile allows // arbitrary xml. mixedContent = profManifest.mixedContent; } } if (arbitraryXml) { handler.initializeXmlBlob( xmlBlob, mixedContent, /* fullTextIndex */false); } }