@API(type=INTERNAL,
src=PUBLIC)
public class ValueProviderLoader
extends java.lang.Object
Constructor and Description |
---|
ValueProviderLoader() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
buildGenericAttrKey(java.lang.String attrLocalName)
Builds the key that identifies the element or attribute for which we provide
a value.
|
static java.lang.String |
buildGenericElementKey(java.lang.String elementLocalName)
Builds the key that identifies the element or attribute for which we provide
a value.
|
static java.util.Map<java.lang.String,java.util.List<ValueProvider>> |
loadConfiguration(org.xml.sax.InputSource configurationSource)
Loads the XML configuration file.
|
public static java.util.Map<java.lang.String,java.util.List<ValueProvider>> loadConfiguration(org.xml.sax.InputSource configurationSource)
configurationSource
- Source from which to load the configuration.buildGenericAttrKey(String)
or buildGenericElementKey(String)
.
For each attribute/element the possible value providers are sorted based on their specificity. That means that
when searching for a provider you should find the first one that matches. In a real life use case there aren't
many rules written on the same local name (but different namespaces) so you will get the provider with
minimum or tests.
key: el_para values: provider(para, "http://docbook.org/ns/docbook") - matches a para from a specific namespace provider(para) - matches a para from any namespace
public static java.lang.String buildGenericElementKey(java.lang.String elementLocalName)
elementLocalName
- The element local name to generate a key for.public static java.lang.String buildGenericAttrKey(java.lang.String attrLocalName)
attrLocalName
- Local attribute name.© Copyright SyncRO Soft SRL 2002 - 2015. All rights reserved.